Change qw's punchangle to a vector.

Consistency with nq :) (however, only pitch works in qw).
This commit is contained in:
Bill Currie 2012-06-01 08:17:24 +09:00
parent d561d5587d
commit e6ce44fde7
3 changed files with 8 additions and 7 deletions

View file

@ -224,7 +224,7 @@ typedef struct {
vec3_t simvel;
vec3_t simangles;
float punchangle; // temporary view kick from weapon firing
vec3_t punchangle; // temporary view kick from weapon firing
// pitch drifting vars
float idealpitch;

View file

@ -1584,11 +1584,11 @@ CL_ParseServerMessage (void)
// svc_cutscene (same value as svc_smallkick)
case svc_smallkick:
cl.punchangle = -2;
cl.punchangle[PITCH] = -2;
break;
case svc_bigkick:
cl.punchangle = -4;
cl.punchangle[PITCH] = -4;
break;
case svc_updateping:

View file

@ -657,7 +657,8 @@ V_CalcRefdef (void)
view->skin = 0;
// set up the refresh position
r_data->refdef->viewangles[PITCH] += cl.punchangle;
VectorAdd (r_data->refdef->viewangles, cl.punchangle,
r_data->refdef->viewangles);
// smooth out stair step ups
if ((cl.onground != -1) && (cl.simorg[2] - oldz > 0)) {
@ -683,9 +684,9 @@ V_CalcRefdef (void)
static void
DropPunchAngle (void)
{
cl.punchangle -= 10 * host_frametime;
if (cl.punchangle < 0)
cl.punchangle = 0;
cl.punchangle[PITCH] -= 10 * host_frametime;
if (cl.punchangle[PITCH] < 0)
cl.punchangle[PITCH] = 0;
}
/*