- SW: Remove getViewHeightDiff() call in player sprite draw code.

* I added this when removing the player's pos vector in lieu of the sprite vector to further smooth out the sprite's Z in chase cam mode, but it just doesn't look good.
This commit is contained in:
Mitchell Richters 2023-03-15 18:24:01 +11:00
parent fb97e3c6ca
commit 39624da390
3 changed files with 2 additions and 7 deletions

View file

@ -781,7 +781,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub
if (pp->Flags & (PF_VIEW_FROM_OUTSIDE)) if (pp->Flags & (PF_VIEW_FROM_OUTSIDE))
tsp->cstat |= (CSTAT_SPRITE_TRANSLUCENT); tsp->cstat |= (CSTAT_SPRITE_TRANSLUCENT);
auto pos = pp->si.plusZ(tsp->pos.Z + pp->getViewHeightDiff()); auto pos = pp->si.plusZ(tsp->pos.Z);
if (pp->Flags & (PF_CLIMBING)) if (pp->Flags & (PF_CLIMBING))
{ {

View file

@ -1892,11 +1892,6 @@ struct PLAYER
uint8_t WpnReloadState; uint8_t WpnReloadState;
double getViewHeightDiff()
{
return actor->viewzoffset + height;
}
void posZset(const double val) void posZset(const double val)
{ {
actor->spr.pos.Z = val - actor->viewzoffset; actor->spr.pos.Z = val - actor->viewzoffset;

View file

@ -1485,7 +1485,7 @@ void DoPlayerSetWadeDepth(PLAYER* pp)
void DoPlayerViewOffset(PLAYER* pp) void DoPlayerViewOffset(PLAYER* pp)
{ {
pp->actor->viewzoffset -= pp->getViewHeightDiff() * 0.375; pp->actor->viewzoffset -= (pp->actor->viewzoffset + pp->height) * 0.375;
} }
void DoPlayerHeight(PLAYER* pp) void DoPlayerHeight(PLAYER* pp)