Make the view offsets make sense.

Now the gun doesn't move around strangely when looking up and down with
view offsets set.
This commit is contained in:
Bill Currie 2012-06-02 13:55:26 +09:00
parent c4d7b65a05
commit 84b5869b30

View file

@ -607,7 +607,6 @@ V_CalcRefdef (void)
float bob;
static float oldz = 0;
int i;
vec3_t angles;
vec3_t forward, right, up;
vec_t *origin = ent->origin;
vec_t *viewangles = cl.viewangles;
@ -632,12 +631,7 @@ V_CalcRefdef (void)
V_AddIdle ();
// offsets
angles[PITCH] = -ent->angles[PITCH]; // because entity pitches are
// actually backward
angles[YAW] = ent->angles[YAW];
angles[ROLL] = ent->angles[ROLL];
AngleVectors (angles, forward, right, up);
AngleVectors (viewangles, forward, right, up);
// don't allow cheats in multiplayer
// FIXME check for dead