1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Made mesh update on node addition asynchronous on client, to reduce frametime spikes

This commit is contained in:
Perttu Ahola 2011-04-06 10:28:39 +03:00
parent 212f34db82
commit e56d166337
2 changed files with 13 additions and 3 deletions

View file

@ -1800,14 +1800,15 @@ void Client::addNode(v3s16 p, MapNode n)
catch(InvalidPositionException &e)
{}
TimeTaker timer2("Client::addNode(): updateMeshes");
//TimeTaker timer2("Client::addNode(): updateMeshes");
for(core::map<v3s16, MapBlock * >::Iterator
i = modified_blocks.getIterator();
i.atEnd() == false; i++)
{
v3s16 p = i.getNode()->getKey();
m_env.getClientMap().updateMeshes(p, m_env.getDayNightRatio());
//m_env.getClientMap().updateMeshes(p, m_env.getDayNightRatio());
addUpdateMeshTaskWithEdge(p);
}
}