Fix a small mistake in rotateZ for fully connected branches

fixes issue noted in https://github.com/PixelGuys/Cubyz/pull/1714#pullrequestreview-3120808175
This commit is contained in:
IntegratedQuantum 2025-08-17 20:46:33 +02:00
parent 95333133fb
commit 16bfb33c71

View File

@ -324,7 +324,7 @@ pub fn rotateZ(data: u16, angle: Degrees) u16 {
rotationTable[a][i] = new.enabledConnections;
}
};
if(data >= 0b111111) return 0;
if(data > 0b111111) return 0;
const rotationIndex = (data & 0b111100) >> 2;
const upDownFlags = data & 0b000011;
return rotationTable[@intFromEnum(angle)][rotationIndex] | upDownFlags;