- Remove all remaining legacy wrappers.

This commit is contained in:
Mitchell Richters 2022-12-05 12:28:33 +11:00 committed by Christoph Oelckers
parent a7a5d4b946
commit 1aad5eacfa
6 changed files with 6 additions and 17 deletions

View file

@ -115,14 +115,6 @@ struct PlayerAngles
}
}
// Legacy, to be removed.
DAngle horizLERPSUM(double const interpfrac) { return interpolatedvalue(ZzOLDHORIZON() + PrevViewAngles.Pitch, ZzHORIZON() + ViewAngles.Pitch, interpfrac); }
DAngle angSUM(const double interpfrac) { return ZzANGLE() + angLERPLOOKANG(interpfrac); }
DAngle angLERPSUM(double const interpfrac) { return interpolatedvalue(ZzOLDANGLE() + PrevViewAngles.Yaw, ZzANGLE() + ViewAngles.Yaw, interpfrac); }
DAngle angLERPANG(double const interpfrac) { return interpolatedvalue(ZzOLDANGLE(), ZzANGLE(), interpfrac); }
DAngle angLERPLOOKANG(double const interpfrac) { return interpolatedvalue(PrevViewAngles.Yaw, ViewAngles.Yaw, interpfrac); }
private:
// DRotator indices.
enum : unsigned

View file

@ -446,8 +446,7 @@ static void DrawMap(PLAYER* pPlayer, const double interpfrac)
setViewport(Hud_Stbar);
tm = 1;
}
auto ang = !SyncInput() ? pPlayer->Angles.angSUM(interpfrac) : pPlayer->Angles.angLERPSUM(interpfrac);
DrawOverheadMap(pPlayer->actor->interpolatedpos(interpfrac).XY(), ang, interpfrac);
DrawOverheadMap(pPlayer->actor->interpolatedpos(interpfrac).XY(), pPlayer->Angles.getRenderAngles(interpfrac).Yaw, interpfrac);
if (tm)
setViewport(hud_size);
}

View file

@ -273,8 +273,8 @@ void drawoverlays(double interpfrac)
}
else
{
cposxy = interpolatedvalue(pp->GetActor()->getPrevPosWithOffsetZ(), pp->GetActor()->getPosWithOffsetZ(), interpfrac).XY();
cang = !SyncInput() ? pp->Angles.ZzANGLE() : interpolatedvalue(pp->Angles.ZzOLDANGLE(), pp->Angles.ZzANGLE(), interpfrac);
cposxy = pp->GetActor()->interpolatedpos(interpfrac).XY();
cang = pp->Angles.getRenderAngles(interpfrac).Yaw;
}
}
else

View file

@ -230,8 +230,7 @@ void displayweapon_d(int snum, double interpfrac)
auto offpair = p->Angles.getWeaponOffsets(interpfrac);
auto offsets = offpair.first;
auto horiz = !SyncInput() ? p->Angles.getPitchWithView(interpfrac) : p->Angles.horizLERPSUM(interpfrac);
auto pitchoffset = interpolatedvalue(0., 16., horiz / DAngle90);
auto pitchoffset = interpolatedvalue(0., 16., p->Angles.getRenderAngles(interpfrac).Pitch / DAngle90);
auto yawinput = getavel(snum) * (1. / 16.);
auto angle = -offpair.second;
auto weapon_xoffset = 160 - 90 - (BobVal(512 + weapon_sway * 0.5) * (16384. / 1536.)) - 58 - p->weapon_ang;

View file

@ -55,8 +55,7 @@ void DrawMap(double const interpfrac)
if (!nFreeze && automapMode != am_off)
{
auto pPlayerActor = PlayerList[nLocalPlayer].pActor;
auto ang = !SyncInput() ? PlayerList[nLocalPlayer].Angles.angSUM(interpfrac) : PlayerList[nLocalPlayer].Angles.angLERPSUM(interpfrac);
DrawOverheadMap(pPlayerActor->interpolatedpos(interpfrac).XY(), ang, interpfrac);
DrawOverheadMap(pPlayerActor->interpolatedpos(interpfrac).XY(), PlayerList[nLocalPlayer].Angles.getRenderAngles(interpfrac).Yaw, interpfrac);
}
}

View file

@ -812,7 +812,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub
{
pp = tActor->user.PlayerP;
tsp->pos = pp->actor->getRenderPos(interpfrac);
tsp->Angles.Yaw = pp->Angles.angLERPANG(interpfrac);
tsp->Angles.Yaw = pp->actor->interpolatedyaw(interpfrac);
}
}