- SW: Fix interpolation issues with sword, fists and heart.

This commit is contained in:
Mitchell Richters 2020-08-18 20:49:12 +10:00
parent 5cc30ad7c6
commit 78e0e94f58

View file

@ -1093,8 +1093,7 @@ pSwordSlideDown(PANEL_SPRITEp psp)
// NOT still holding down the fire key - stop swinging // NOT still holding down the fire key - stop swinging
pSetState(psp, psp->PresentState); pSetState(psp, psp->PresentState);
psp->ox = psp->x = SWORD_XOFF; psp->ox = psp->x = SWORD_XOFF;
psp->oy = psp->y = SWORD_YOFF; psp->oy = psp->y = SWORD_YOFF + tileHeight(psp->picndx);
psp->y += tileHeight(psp->picndx);
psp->yorig = psp->y; psp->yorig = psp->y;
} }
} }
@ -1179,8 +1178,7 @@ pSwordSlideDownR(PANEL_SPRITEp psp)
// NOT still holding down the fire key - stop swinging // NOT still holding down the fire key - stop swinging
pSetState(psp, psp->PresentState); pSetState(psp, psp->PresentState);
psp->ox = psp->x = SWORD_XOFF; psp->ox = psp->x = SWORD_XOFF;
psp->oy = psp->y = SWORD_YOFF; psp->oy = psp->y = SWORD_YOFF + tileHeight(psp->picndx);
psp->y += tileHeight(psp->picndx);
psp->yorig = psp->y; psp->yorig = psp->y;
} }
} }
@ -2045,6 +2043,9 @@ pUziClip(PANEL_SPRITEp oclip)
x += nx; x += nx;
y += ny; y += ny;
oclip->ox = oclip->x;
oclip->oy = oclip->y;
oclip->xfract = LSW(x); oclip->xfract = LSW(x);
oclip->x = x / (double)(FRACUNIT); oclip->x = x / (double)(FRACUNIT);
oclip->yfract = LSW(y); oclip->yfract = LSW(y);
@ -4765,9 +4766,6 @@ pHeartRest(PANEL_SPRITEp psp)
psp->yorig = HEART_YOFF; psp->yorig = HEART_YOFF;
} }
psp->oy = psp->y;
psp->y = psp->yorig;
pHeartBobSetup(psp); pHeartBobSetup(psp);
pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP)); pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP));
@ -4802,9 +4800,6 @@ pHeartAction(PANEL_SPRITEp psp)
psp->yorig = 200; psp->yorig = 200;
} }
psp->oy = psp->y;
psp->y = psp->yorig;
pHeartBobSetup(psp); pHeartBobSetup(psp);
pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP)); pWeaponBob(psp, PLAYER_MOVING(psp->PlayerP));
} }
@ -6323,8 +6318,7 @@ pFistSlideDown(PANEL_SPRITEp psp)
// NOT still holding down the fire key - stop swinging // NOT still holding down the fire key - stop swinging
pSetState(psp, psp->PresentState); pSetState(psp, psp->PresentState);
psp->ox = psp->x = FIST_XOFF; psp->ox = psp->x = FIST_XOFF;
psp->oy = psp->y = FIST_YOFF; psp->oy = psp->y = FIST_YOFF + tileHeight(psp->picndx);
psp->y += tileHeight(psp->picndx);
psp->yorig = psp->y; psp->yorig = psp->y;
} }
} }
@ -6436,8 +6430,7 @@ pFistSlideDownR(PANEL_SPRITEp psp)
// NOT still holding down the fire key - stop swinging // NOT still holding down the fire key - stop swinging
pSetState(psp, psp->PresentState); pSetState(psp, psp->PresentState);
psp->ox = psp->x = FIST_XOFF; psp->ox = psp->x = FIST_XOFF;
psp->oy = psp->y = FIST_YOFF; psp->oy = psp->y = FIST_YOFF + tileHeight(psp->picndx);
psp->y += tileHeight(psp->picndx);
psp->yorig = psp->y; psp->yorig = psp->y;
} }
} }