diff --git a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm index f42eb2c3697..1280f1516fd 100644 --- a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm +++ b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm @@ -4,7 +4,7 @@ #define CHUNK_SIZE 16 // Only chunk sizes that are to the power of 2. E.g: 2, 4, 8, 16, etc.. /// Takes a position, transforms it into a chunk bounded position. Indexes at 1 so it'll land on actual turfs always -#define GET_CHUNK_COORD(v) (FLOOR(v, CHUNK_SIZE) + 1) +#define GET_CHUNK_COORD(v) (max((FLOOR(v, CHUNK_SIZE)), 1)) GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new()) /datum/cameranet