From 680a87085ae5c4104996274f11a3d05f81d77075 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 3 Feb 2022 00:06:40 +0100 Subject: [PATCH] - SW: remap LIGHT_Tics to the otherwise unused spritetype::detail. We should not hijack a coordinate for this due to access rights for scripting and potential value ranme issues. Since this value is never loaded from a map this is safe. --- source/games/sw/src/light.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/sw/src/light.h b/source/games/sw/src/light.h index 768fdae588e..5f68f8392c4 100644 --- a/source/games/sw/src/light.h +++ b/source/games/sw/src/light.h @@ -47,7 +47,7 @@ inline void LIGHT_DirChange(DSWActor* sp) { sp->spr.extra ^= SPRX_BOOL10; } int8_t& LIGHT_FloorShade(DSWActor* a) { return a->spr.xoffset; } int8_t& LIGHT_CeilingShade(DSWActor* a) { return a->spr.yoffset; } -int& LIGHT_Tics(DSWActor* a) { return a->spr.pos.Z; } +int16_t& LIGHT_Tics(DSWActor* a) { return a->spr.detail; } inline int LIGHT_DiffuseNum(DSWActor* sp) { return SP_TAG3(sp); } inline int16_t LIGHT_DiffuseMult(DSWActor* sp) { return SP_TAG4((sp)); }