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)
This commit is contained in:
Monster Iestyn 2023-09-21 13:19:38 +01:00
parent a373d96d07
commit 5e501bae07

View file

@ -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);