mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-02-16 16:51:16 +00:00
Misc. fixes.
This commit is contained in:
parent
7da71c8673
commit
3db83b18d7
2 changed files with 14 additions and 33 deletions
|
@ -280,16 +280,8 @@ void CL_AdjustAngles (void)
|
||||||
if (up || down)
|
if (up || down)
|
||||||
V_StopPitchDrift ();
|
V_StopPitchDrift ();
|
||||||
|
|
||||||
if (cl.viewangles[PITCH] > 80)
|
cl.viewangles[PITCH] = bound( -70, cl.viewangles[PITCH], 80);
|
||||||
cl.viewangles[PITCH] = 80;
|
cl.viewangles[ROLL] = bound( -50, cl.viewangles[ROLL], 50);
|
||||||
if (cl.viewangles[PITCH] < -70)
|
|
||||||
cl.viewangles[PITCH] = -70;
|
|
||||||
|
|
||||||
if (cl.viewangles[ROLL] > 50)
|
|
||||||
cl.viewangles[ROLL] = 50;
|
|
||||||
if (cl.viewangles[ROLL] < -50)
|
|
||||||
cl.viewangles[ROLL] = -50;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -123,7 +123,8 @@ V_CalcRoll (vec3_t angles, vec3_t velocity)
|
||||||
|
|
||||||
(desc)
|
(desc)
|
||||||
*/
|
*/
|
||||||
float V_CalcBob (void)
|
float
|
||||||
|
V_CalcBob ( void )
|
||||||
{
|
{
|
||||||
#ifdef QUAKEWORLD
|
#ifdef QUAKEWORLD
|
||||||
static double bobtime;
|
static double bobtime;
|
||||||
|
@ -160,10 +161,7 @@ float V_CalcBob (void)
|
||||||
bob = sqrt(cl.velocity[0]*cl.velocity[0] + cl.velocity[1]*cl.velocity[1]) * cl_bob->value;
|
bob = sqrt(cl.velocity[0]*cl.velocity[0] + cl.velocity[1]*cl.velocity[1]) * cl_bob->value;
|
||||||
#endif
|
#endif
|
||||||
bob = bob*0.3 + bob*0.7*sin(cycle);
|
bob = bob*0.3 + bob*0.7*sin(cycle);
|
||||||
if (bob > 4)
|
bob = bound( -7, bob, 4);
|
||||||
bob = 4;
|
|
||||||
else if (bob < -7)
|
|
||||||
bob = -7;
|
|
||||||
return bob;
|
return bob;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -409,9 +407,10 @@ V_ParseDamage ( void )
|
||||||
void
|
void
|
||||||
V_cshift_f ( void )
|
V_cshift_f ( void )
|
||||||
{
|
{
|
||||||
cshift_empty.destcolor[0] = atoi(Cmd_Argv(1));
|
int i;
|
||||||
cshift_empty.destcolor[1] = atoi(Cmd_Argv(2));
|
|
||||||
cshift_empty.destcolor[2] = atoi(Cmd_Argv(3));
|
for ( i=0 ; i<3 ; i++ )
|
||||||
|
cshift_empty.destcolor[i] = atoi(Cmd_Argv(i+1));
|
||||||
cshift_empty.percent = atoi(Cmd_Argv(4));
|
cshift_empty.percent = atoi(Cmd_Argv(4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,16 +514,12 @@ V_CalcBlend ( void )
|
||||||
b = 0;
|
b = 0;
|
||||||
a = 0;
|
a = 0;
|
||||||
|
|
||||||
for (j=0 ; j<NUM_CSHIFTS ; j++)
|
for (j=0 ; j<NUM_CSHIFTS ; j++) {
|
||||||
{
|
|
||||||
if (!gl_cshiftpercent->value)
|
if (!gl_cshiftpercent->value)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
a2 = ((cl.cshifts[j].percent * gl_cshiftpercent->value) / 100.0) / 255.0;
|
a2 = ((cl.cshifts[j].percent * gl_cshiftpercent->value) / 100.0) / 255.0;
|
||||||
|
|
||||||
// a2 = (cl.cshifts[j].percent/2)/255.0; // from qw
|
|
||||||
// a2 = cl.cshifts[j].percent/255.0; // from uq
|
|
||||||
|
|
||||||
if (!a2)
|
if (!a2)
|
||||||
continue;
|
continue;
|
||||||
a = a + a2*(1-a);
|
a = a + a2*(1-a);
|
||||||
|
@ -574,15 +569,11 @@ CalcGunAngle ( void )
|
||||||
pitch = -r_refdef.viewangles[PITCH];
|
pitch = -r_refdef.viewangles[PITCH];
|
||||||
|
|
||||||
yaw = angledelta(yaw - r_refdef.viewangles[YAW]) * 0.4;
|
yaw = angledelta(yaw - r_refdef.viewangles[YAW]) * 0.4;
|
||||||
if (yaw > 10)
|
yaw = bound(-10, yaw, 10);
|
||||||
yaw = 10;
|
|
||||||
if (yaw < -10)
|
|
||||||
yaw = -10;
|
|
||||||
pitch = angledelta(-pitch - r_refdef.viewangles[PITCH]) * 0.4;
|
pitch = angledelta(-pitch - r_refdef.viewangles[PITCH]) * 0.4;
|
||||||
if (pitch > 10)
|
pitch = bound(-10, pitch, 10);
|
||||||
pitch = 10;
|
|
||||||
if (pitch < -10)
|
|
||||||
pitch = -10;
|
|
||||||
move = host_frametime*20;
|
move = host_frametime*20;
|
||||||
if ( yaw > oldyaw ) {
|
if ( yaw > oldyaw ) {
|
||||||
if (oldyaw + move < yaw)
|
if (oldyaw + move < yaw)
|
||||||
|
@ -1104,5 +1095,3 @@ V_Init ( void )
|
||||||
|
|
||||||
BuildGammaTable (v_gamma->value); // no gamma yet
|
BuildGammaTable (v_gamma->value); // no gamma yet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue