1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Remove emerge and speedup addArea by using memcopy instead of one by one assignment

This commit is contained in:
sapier 2014-06-09 13:29:22 +02:00
parent d5de0cbf71
commit 8ad83767cf
4 changed files with 83 additions and 112 deletions

View file

@ -46,7 +46,7 @@ void clearLightAndCollectSources(VoxelManipulator &v, VoxelArea a,
VoxelArea required_a = a;
required_a.pad(v3s16(0,0,0));
// Make sure we have access to it
v.emerge(a);
v.addArea(a);
for(s32 x=a.MinEdge.X; x<=a.MaxEdge.X; x++)
for(s32 z=a.MinEdge.Z; z<=a.MaxEdge.Z; z++)
@ -85,7 +85,7 @@ SunlightPropagateResult propagateSunlight(VoxelManipulator &v, VoxelArea a,
VoxelArea required_a = a;
required_a.pad(v3s16(0,1,0));
// Make sure we have access to it
v.emerge(a);
v.addArea(a);
s16 max_y = a.MaxEdge.Y;
s16 min_y = a.MinEdge.Y;