mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 07:31:03 +00:00
- SW: Interpolate player's pbob_amt
.
This commit is contained in:
parent
baa6516e8c
commit
8fec35b278
3 changed files with 3 additions and 2 deletions
|
@ -1183,7 +1183,7 @@ void drawscreen(PLAYER* pp, double interpfrac, bool sceneonly)
|
|||
{
|
||||
if (cl_viewbob)
|
||||
{
|
||||
tpos.Z += camerapp->pbob_amt + interpolatedvalue(pp->obob_z, pp->bob_z, interpfrac);
|
||||
tpos.Z += interpolatedvalue(pp->obob_z + pp->opbob_amt, pp->bob_z + pp->pbob_amt, interpfrac);
|
||||
}
|
||||
|
||||
// recoil only when not in camera
|
||||
|
|
|
@ -588,7 +588,7 @@ struct PLAYER
|
|||
SECTOR_OBJECT* sop; // will either be sop_remote or sop_control
|
||||
|
||||
double hiz, loz;
|
||||
double pbob_amt;
|
||||
double opbob_amt, pbob_amt;
|
||||
|
||||
int jump_count, jump_speed; // jumping
|
||||
double z_speed;
|
||||
|
|
|
@ -1774,6 +1774,7 @@ void DoPlayerRecoil(PLAYER* pp)
|
|||
void DoPlayerSpriteBob(PLAYER* pp, double player_height, double bobamt, short bob_speed)
|
||||
{
|
||||
pp->bob_ndx = (pp->bob_ndx + (synctics << bob_speed)) & 2047;
|
||||
pp->opbob_amt = pp->pbob_amt;
|
||||
pp->pbob_amt = bobamt * BobVal(pp->bob_ndx);
|
||||
pp->actor->spr.pos.Z = pp->pos.Z + player_height + pp->pbob_amt;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue