From 5e501bae0767124adee00f8f0db0334b32422342 Mon Sep 17 00:00:00 2001 From: Monster Iestyn <iestynjealous@ntlworld.com> Date: Thu, 21 Sep 2023 13:19:38 +0100 Subject: [PATCH] v.getSpritePatch/v.getSprite2Patch fix: Fix offset inconsistency between rotated sprites and non-rotated sprites This was caused by rotated sprites having FEETADJUST offsets applied, when non-rotated sprites did not. FEETADJUST is not actually needed in the HUD, so I've removed it from the rotated sprites (thankfully this is also the easiest way to fix it too) --- src/lua_hudlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 6eec912733..899e5a2dcc 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -517,7 +517,7 @@ static int libd_getSpritePatch(lua_State *L) INT32 rot = R_GetRollAngle(rollangle); if (rot) { - patch_t *rotsprite = Patch_GetRotatedSprite(sprframe, frame, angle, sprframe->flip & (1<<angle), true, &spriteinfo[i], rot); + patch_t *rotsprite = Patch_GetRotatedSprite(sprframe, frame, angle, sprframe->flip & (1<<angle), false, &spriteinfo[i], rot); LUA_PushUserdata(L, rotsprite, META_PATCH); lua_pushboolean(L, false); lua_pushboolean(L, true); @@ -629,7 +629,7 @@ static int libd_getSprite2Patch(lua_State *L) INT32 rot = R_GetRollAngle(rollangle); if (rot) { - patch_t *rotsprite = Patch_GetRotatedSprite(sprframe, frame, angle, sprframe->flip & (1<<angle), true, &skins[i].sprinfo[j], rot); + patch_t *rotsprite = Patch_GetRotatedSprite(sprframe, frame, angle, sprframe->flip & (1<<angle), false, &skins[i].sprinfo[j], rot); LUA_PushUserdata(L, rotsprite, META_PATCH); lua_pushboolean(L, false); lua_pushboolean(L, true); -- GitLab