mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Replace std::list by std::vector into timerUpdate calls
This commit is contained in:
parent
24315db6ef
commit
3c91ad8fc2
3 changed files with 9 additions and 10 deletions
|
@ -434,7 +434,7 @@ void Client::step(float dtime)
|
|||
const float map_timer_and_unload_dtime = 5.25;
|
||||
if(m_map_timer_and_unload_interval.step(dtime, map_timer_and_unload_dtime)) {
|
||||
ScopeProfiler sp(g_profiler, "Client: map timer and unload");
|
||||
std::list<v3s16> deleted_blocks;
|
||||
std::vector<v3s16> deleted_blocks;
|
||||
m_env.getMap().timerUpdate(map_timer_and_unload_dtime,
|
||||
g_settings->getFloat("client_unload_unused_data_timeout"),
|
||||
&deleted_blocks);
|
||||
|
@ -444,8 +444,8 @@ void Client::step(float dtime)
|
|||
NOTE: This loop is intentionally iterated the way it is.
|
||||
*/
|
||||
|
||||
std::list<v3s16>::iterator i = deleted_blocks.begin();
|
||||
std::list<v3s16> sendlist;
|
||||
std::vector<v3s16>::iterator i = deleted_blocks.begin();
|
||||
std::vector<v3s16> sendlist;
|
||||
for(;;) {
|
||||
if(sendlist.size() == 255 || i == deleted_blocks.end()) {
|
||||
if(sendlist.empty())
|
||||
|
@ -462,7 +462,7 @@ void Client::step(float dtime)
|
|||
*pkt << (u8) sendlist.size();
|
||||
|
||||
u32 k = 0;
|
||||
for(std::list<v3s16>::iterator
|
||||
for(std::vector<v3s16>::iterator
|
||||
j = sendlist.begin();
|
||||
j != sendlist.end(); ++j) {
|
||||
*pkt << *j;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue