- calcviewpitch(): Set `scaleAdjust` to default to 1 in prototype like other functions in gameinput.cpp.

This commit is contained in:
Mitchell Richters 2021-01-02 09:32:19 +11:00
parent dac08a2cb9
commit 3a801cbf5c
4 changed files with 4 additions and 4 deletions

View File

@ -272,4 +272,4 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerHorizon& w,
void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlInfo* const hidInput, double const scaleAdjust, int const drink_amt = 0, bool const allowstrafe = true, double const turnscale = 1);
void sethorizon(fixedhoriz* horiz, float const horz, ESyncBits* actions, double const scaleAdjust = 1);
void applylook(PlayerAngle* angle, float const avel, ESyncBits* actions, double const scaleAdjust = 1);
void calcviewpitch(vec2_t const pos, fixedhoriz* horizoff, binangle const ang, bool const aimmode, bool const canslopetilt, int const cursectnum, double const scaleAdjust, bool const climbing = false);
void calcviewpitch(vec2_t const pos, fixedhoriz* horizoff, binangle const ang, bool const aimmode, bool const canslopetilt, int const cursectnum, double const scaleAdjust = 1, bool const climbing = false);

View File

@ -193,7 +193,7 @@ inline double get16thOfHoriz(int const snum, bool const interpolate, double cons
return (!interpolate ? ps[snum].horizon.sum() : ps[snum].horizon.interpolatedsum(smoothratio)).asq16() * (0.0625 / FRACUNIT);
}
inline void doslopetilting(player_struct* p, double const scaleAdjust)
inline void doslopetilting(player_struct* p, double const scaleAdjust = 1)
{
bool const canslopetilt = p->on_ground && sector[p->cursectnum].lotag != ST_2_UNDERWATER && (sector[p->cursectnum].floorstat & 2);
calcviewpitch(p->pos.vec2, &p->horizon.horizoff, p->angle.ang, p->aim_mode == 0, canslopetilt, p->cursectnum, scaleAdjust);

View File

@ -2779,7 +2779,7 @@ void processinput_d(int snum)
if (SyncInput())
{
p->horizon.backup();
doslopetilting(p, 1);
doslopetilting(p);
}
if (chz.type == kHitSprite)

View File

@ -3461,7 +3461,7 @@ void processinput_r(int snum)
if (SyncInput())
{
p->horizon.backup();
doslopetilting(p, 1);
doslopetilting(p);
}
if (chz.type == kHitSprite)