mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Made mesh update on node addition asynchronous on client, to reduce frametime spikes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user