only specify neibhors if the state did change

This commit is contained in:
mcrcortex
2025-10-02 19:13:04 +10:00
parent 1d53f658a7
commit f846ec0825

View File

@@ -104,7 +104,7 @@ public class WorldUpdater {
//Bitmask of neighboring sections
//Note, this may be zero (this is more likely to occure at higher lod levels) if it doesnt face any neighbors
int neighbors = 0;
{
if (didStateChange) {
neighbors |= ((section.y^(section.y-1))>>(lvl+1))==0?0:1<<0;//Down
neighbors |= ((section.y^(section.y+1))>>(lvl+1))==0?0:1<<1;//Up
neighbors |= ((section.x^(section.x-1))>>(lvl+1))==0?0:1<<2;//-x