mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-30 07:50:54 +00:00
- Duke: Get rid of two InputPacket wrappers.
This commit is contained in:
parent
82d029fe28
commit
e45d485eb2
2 changed files with 5 additions and 15 deletions
|
@ -39,9 +39,9 @@ source as it is released.
|
|||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
inline static double getavel(int snum)
|
||||
inline static double getavel(DDukePlayer* const p)
|
||||
{
|
||||
return PlayerInputAngVel(snum) * (2048. / 360.);
|
||||
return p->cmd.ucmd.avel * (2048. / 360.);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -72,7 +72,7 @@ static void displayloogie(DDukePlayer* p, double const interpfrac)
|
|||
{
|
||||
const double a = fabs(BobVal((loogi + i) * 32.) * 90);
|
||||
const double z = 4096. + ((loogi + i) * 512.);
|
||||
const double x = -getavel(p->GetPlayerNum()) + BobVal((loogi + i) * 64.) * 16;
|
||||
const double x = -getavel(p) + BobVal((loogi + i) * 64.) * 16;
|
||||
|
||||
hud_drawsprite((p->loogie[i].X + x), (200 + p->loogie[i].Y - y), (z - (i << 8)) / 65536., a - 22.5, TexMan.CheckForTexture("LOOGIE", ETextureType::Any), 0, 0, 0);
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
auto offpair = p->Angles.getWeaponOffsets(interpfrac);
|
||||
auto offsets = offpair.first;
|
||||
auto pitchoffset = 16. * (p->Angles.getRenderAngles(interpfrac).Pitch / DAngle90);
|
||||
auto yawinput = getavel(snum) * (1. / 16.);
|
||||
auto yawinput = getavel(p) * (1. / 16.);
|
||||
auto angle = offpair.second;
|
||||
auto weapon_xoffset = 160 - 90 - (BobVal(512 + weapon_sway * 0.5) * (16384. / 1536.)) - 58 - p->weapon_ang;
|
||||
auto shade = min(p->GetActor()->spr.shade, (int8_t)24);
|
||||
|
|
|
@ -147,21 +147,11 @@ inline float PlayerInputForwardVel(int pl)
|
|||
return getPlayer(pl)->cmd.ucmd.fvel;
|
||||
}
|
||||
|
||||
inline float PlayerInputAngVel(int pl)
|
||||
{
|
||||
return getPlayer(pl)->cmd.ucmd.avel;
|
||||
}
|
||||
|
||||
inline DAngle GetPlayerHorizon(int pl)
|
||||
{
|
||||
return DAngle::fromDeg(getPlayer(pl)->cmd.ucmd.horz);
|
||||
}
|
||||
|
||||
inline void clearfriction()
|
||||
{
|
||||
for (int i = 0; i != -1; i = connectpoint2[i])
|
||||
{
|
||||
getPlayer(i)->fric.X = getPlayer(i)->fric.Y = 0;
|
||||
getPlayer(i)->fric.Zero();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue