mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
VoxelManipulator code cleanup (#15114)
* Cache node in voxel area index when possible The index function according to the MSVC profiler actually takes up a significant time slice (around ~5% of total time for the process) during normal game-play. Might not be accurate but still good to not recalculate it twice. * Remove `setNodeNoRef` from VM * VM: remove old commented out print statement
This commit is contained in:
parent
074700b35e
commit
486dc3288d
2 changed files with 16 additions and 19 deletions
|
@ -87,7 +87,7 @@ void TestVoxelManipulator::testVoxelManipulator(const NodeDefManager *nodedef)
|
|||
v.print(infostream, nodedef);
|
||||
|
||||
infostream << "*** Setting (-1,0,-1)=2 ***" << std::endl;
|
||||
v.setNodeNoRef(v3s16(-1,0,-1), MapNode(t_CONTENT_GRASS));
|
||||
v.setNode(v3s16(-1,0,-1), MapNode(t_CONTENT_GRASS));
|
||||
|
||||
v.print(infostream, nodedef);
|
||||
UASSERT(v.getNode(v3s16(-1,0,-1)).getContent() == t_CONTENT_GRASS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue