mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- SW: Promote recoil_horizoff
to Q16.16 to avoid down-scaling only to upscale.
This commit is contained in:
parent
e36c9fc78c
commit
2e2ca03812
3 changed files with 3 additions and 3 deletions
|
@ -1729,7 +1729,7 @@ drawscreen(PLAYERp pp, double smoothratio)
|
|||
tz += pp->obob_z + xs_CRoundToInt(fmulscale16(pp->bob_z - pp->obob_z, smoothratio));
|
||||
|
||||
// recoil only when not in camera
|
||||
tq16horiz = tq16horiz + IntToFixed(pp->recoil_horizoff);
|
||||
tq16horiz = tq16horiz + pp->recoil_horizoff;
|
||||
tq16horiz = max(tq16horiz, IntToFixed(PLAYER_HORIZ_MIN));
|
||||
tq16horiz = min(tq16horiz, IntToFixed(PLAYER_HORIZ_MAX));
|
||||
}
|
||||
|
|
|
@ -886,7 +886,7 @@ struct PLAYERstruct
|
|||
short recoil_amt;
|
||||
short recoil_speed;
|
||||
short recoil_ndx;
|
||||
short recoil_horizoff;
|
||||
fixed_t recoil_horizoff;
|
||||
|
||||
int oldposx,oldposy,oldposz;
|
||||
int RevolveX, RevolveY;
|
||||
|
|
|
@ -2012,7 +2012,7 @@ DoPlayerRecoil(PLAYERp pp)
|
|||
}
|
||||
|
||||
// move pp->q16horiz up and down
|
||||
pp->recoil_horizoff = ((pp->recoil_amt * sintable[pp->recoil_ndx]) >> 14);
|
||||
pp->recoil_horizoff = (pp->recoil_amt * sintable[pp->recoil_ndx]) << 2;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue