mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- Duke: Move Duke-exclusive code from PlayerHorizon
struct into displayweapon_d()
and clamp tangent to handle high pitches.
* Clamped range is slightly higher than original (200 vs. 256), however when tested with idle knuckle cracking, etc, hands were drawn not above the screen unlike unclamped tangent.
This commit is contained in:
parent
dbdcdb934f
commit
13d643deb5
2 changed files with 1 additions and 4 deletions
|
@ -42,9 +42,6 @@ struct PlayerHorizon
|
|||
void unlockinput() { inputdisabled = false; }
|
||||
bool movementlocked() { return targetset() || inputdisabled; }
|
||||
|
||||
// Draw code helpers.
|
||||
double horizsumfrac(double const interpfrac) { return (!SyncInput() ? sum() : interpolatedsum(interpfrac)).Tan() * 8.; }
|
||||
|
||||
// Ticrate playsim adjustment setters and processor.
|
||||
void addadjustment(DAngle const value)
|
||||
{
|
||||
|
|
|
@ -231,7 +231,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
}
|
||||
|
||||
plravel = getavel(snum) * (1. / 16.);
|
||||
horiz16th = p->horizon.horizsumfrac(interpfrac);
|
||||
horiz16th = clamp((!SyncInput() ? p->horizon.sum() : p->horizon.interpolatedsum(interpfrac)).Tan(), -2., 2.) * 8.;
|
||||
look_anghalf = p->angle.look_anghalf(interpfrac);
|
||||
looking_arc = p->angle.looking_arc(interpfrac);
|
||||
hard_landing *= 8.;
|
||||
|
|
Loading…
Reference in a new issue