- some renamings of bob_amt to isolate the one in SECTOR_OBJECT

This commit is contained in:
Christoph Oelckers 2022-09-04 00:02:00 +02:00
parent 973c9b89a9
commit 86c557653b
4 changed files with 12 additions and 12 deletions

View file

@ -1354,7 +1354,7 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
fixedhoriz thoriz;
sectortype* tsect;
short i,j;
int bob_amt = 0;
int bobamt = 0;
int quake_z, quake_x, quake_y;
short quake_ang;
extern bool FAF_DebugView;
@ -1452,7 +1452,7 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
}
else
{
bob_amt = camerapp->pbob_amt * zworldtoint;
bobamt = camerapp->pbob_amt * zworldtoint;
if (CameraTestMode)
{
@ -1464,7 +1464,7 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
{
if (cl_viewbob)
{
tz += bob_amt;
tz += bobamt;
tz += interpolatedvalue(pp->obob_z, pp->bob_z, smoothratio) * zworldtoint;
}

View file

@ -6344,9 +6344,9 @@ void pWeaponBob(PANEL_SPRITE* psp, short condition)
// proportion
double bob_ndx = (psp->sin_ndx + 512) & 1023;
// base bob_amt on the players velocity - Max of 128
double bob_amt = bobvel / psp->bob_height_divider;
ydiff = bob_amt * bsinf(bob_ndx, -14);
// base bob amt on the players velocity - Max of 128
double bobamt = bobvel / psp->bob_height_divider;
ydiff = bobamt * bsinf(bob_ndx, -14);
}
// Back up current coordinates for interpolating.

View file

@ -1640,10 +1640,10 @@ void DoPlayerRecoil(PLAYER* pp)
// for wading
void DoPlayerSpriteBob(PLAYER* pp, double player_height, double bob_amt, short bob_speed)
void DoPlayerSpriteBob(PLAYER* pp, double player_height, double bobamt, short bob_speed)
{
pp->bob_ndx = (pp->bob_ndx + (synctics << bob_speed)) & 2047;
pp->pbob_amt = bob_amt * DAngle::fromBuild(pp->bob_ndx).Sin();
pp->pbob_amt = bobamt * DAngle::fromBuild(pp->bob_ndx).Sin();
pp->actor->spr.pos.Z = pp->pos.Z + player_height + pp->pbob_amt;
}
@ -3471,13 +3471,13 @@ void DoPlayerBeginFly(PLAYER* pp)
NewStateGroup(pp->actor, sg_PlayerNinjaFly);
}
int GetSinNdx(int range, int bob_amt)
int GetSinNdx(int range, int bobamt)
{
int amt;
amt = Z(512) / range;
return bob_amt * amt;
return bobamt * amt;
}
void PlayerWarpUpdatePos(PLAYER* pp)
@ -4382,7 +4382,7 @@ void DoPlayerDive(PLAYER* pp)
// player is moving
else
{
// if bob_amt is approx 0
// if bob amt is approx 0
if (abs(pp->pbob_amt) < 1)
{
pp->pbob_amt = 0;

View file

@ -2394,7 +2394,7 @@ DVector2 DoTrack(SECTOR_OBJECT* sop, short locktics)
sop->zdelta = tpoint->tag_high;
break;
case TRACK_ZRATE:
sop->z_rate = Z(tpoint->tag_high);
sop->z_rate = Z(tpoint->tag_high); // looks like a bug. z_rate is pixel based.
break;
case TRACK_ZUP:
sop->flags &= ~(SOBJ_ZDOWN | SOBJ_ZUP);