From 78e0e94f5859a9edd70504e0e72bfbfa048c1548 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 18 Aug 2020 20:49:12 +1000 Subject: [PATCH] - SW: Fix interpolation issues with sword, fists and heart. --- source/sw/src/panel.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/source/sw/src/panel.cpp b/source/sw/src/panel.cpp index 35de0bef3..01a983e00 100644 --- a/source/sw/src/panel.cpp +++ b/source/sw/src/panel.cpp @@ -1093,8 +1093,7 @@ pSwordSlideDown(PANEL_SPRITEp psp) // NOT still holding down the fire key - stop swinging pSetState(psp, psp->PresentState); psp->ox = psp->x = SWORD_XOFF; - psp->oy = psp->y = SWORD_YOFF; - psp->y += tileHeight(psp->picndx); + psp->oy = psp->y = SWORD_YOFF + tileHeight(psp->picndx); psp->yorig = psp->y; } } @@ -1179,8 +1178,7 @@ pSwordSlideDownR(PANEL_SPRITEp psp) // NOT still holding down the fire key - stop swinging pSetState(psp, psp->PresentState); psp->ox = psp->x = SWORD_XOFF; - psp->oy = psp->y = SWORD_YOFF; - psp->y += tileHeight(psp->picndx); + psp->oy = psp->y = SWORD_YOFF + tileHeight(psp->picndx); psp->yorig = psp->y; } } @@ -2045,6 +2043,9 @@ pUziClip(PANEL_SPRITEp oclip) x += nx; y += ny; + oclip->ox = oclip->x; + oclip->oy = oclip->y; + oclip->xfract = LSW(x); oclip->x = x / (double)(FRACUNIT); oclip->yfract = LSW(y); @@ -4765,9 +4766,6 @@ pHeartRest(PANEL_SPRITEp psp) psp->yorig = HEART_YOFF; } - psp->oy = psp->y; - psp->y = psp->yorig; - pHeartBobSetup(psp); pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP)); @@ -4802,9 +4800,6 @@ pHeartAction(PANEL_SPRITEp psp) psp->yorig = 200; } - psp->oy = psp->y; - psp->y = psp->yorig; - pHeartBobSetup(psp); pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP)); } @@ -6323,8 +6318,7 @@ pFistSlideDown(PANEL_SPRITEp psp) // NOT still holding down the fire key - stop swinging pSetState(psp, psp->PresentState); psp->ox = psp->x = FIST_XOFF; - psp->oy = psp->y = FIST_YOFF; - psp->y += tileHeight(psp->picndx); + psp->oy = psp->y = FIST_YOFF + tileHeight(psp->picndx); psp->yorig = psp->y; } } @@ -6436,8 +6430,7 @@ pFistSlideDownR(PANEL_SPRITEp psp) // NOT still holding down the fire key - stop swinging pSetState(psp, psp->PresentState); psp->ox = psp->x = FIST_XOFF; - psp->oy = psp->y = FIST_YOFF; - psp->y += tileHeight(psp->picndx); + psp->oy = psp->y = FIST_YOFF + tileHeight(psp->picndx); psp->yorig = psp->y; } }