mirror of
https://github.com/nzp-team/quakespasm.git
synced 2024-11-10 06:32:03 +00:00
Fixed ADS viewmodel [PITCH] changing with joy input on Vita/NX.
This commit is contained in:
parent
d0d656ce55
commit
92cc54eea2
3 changed files with 18 additions and 14 deletions
|
@ -296,8 +296,8 @@ void CL_AdjustAngles (void)
|
|||
up = CL_KeyState (&in_lookup);
|
||||
down = CL_KeyState(&in_lookdown);
|
||||
|
||||
cl.viewangles[PITCH] -= speed*cl_pitchspeed.value * up;
|
||||
cl.viewangles[PITCH] += speed*cl_pitchspeed.value * down;
|
||||
cl.viewangles[PITCH] -= speed*cl_pitchspeed.value *up; // *up
|
||||
cl.viewangles[PITCH] += speed*cl_pitchspeed.value *down; //down
|
||||
|
||||
if (up || down)
|
||||
V_StopPitchDrift ();
|
||||
|
@ -317,7 +317,7 @@ void CL_AdjustAngles (void)
|
|||
// vita gyro support by rinnegatamante (originally from vitaquake)
|
||||
// creds to the switch-examples for nx support
|
||||
if (motioncam.value) {
|
||||
if (gyromode.value && cl.stats[STAT_ZOOM] == 0 || client_sprinting == 1) //sB fix gyro activating while sprinting.
|
||||
if (gyromode.value && cl.stats[STAT_ZOOM] == 0 && client_sprinting == 1) //sB fix gyro activating while sprinting.
|
||||
return;
|
||||
|
||||
#ifdef VITA
|
||||
|
|
|
@ -1965,9 +1965,9 @@ void SCR_UpdateScreen (void)
|
|||
if(scr_fov.value > (GetWeaponZoomAmmount() + 1))//+1 for accounting for floating point inaccurraces
|
||||
{
|
||||
scr_fov.value += ((original_fov - GetWeaponZoomAmmount()) - scr_fov.value) * 0.25;
|
||||
//scr_fov_viewmodel.value += ((original_view_fov - GetWeaponZoomAmmount()) - scr_fov_viewmodel.value) * 0.25;
|
||||
scr_fov_viewmodel.value += ((original_view_fov - GetWeaponZoomAmmount()) - scr_fov_viewmodel.value) * 0.25;
|
||||
Cvar_SetValue("fov",scr_fov.value);
|
||||
//Cvar_SetValue("r_viewmodel_fov", scr_fov_viewmodel.value);
|
||||
Cvar_SetValue("r_viewmodel_fov", scr_fov_viewmodel.value);
|
||||
}
|
||||
}
|
||||
else if (cl.stats[STAT_ZOOM] == 2)
|
||||
|
|
|
@ -800,13 +800,14 @@ void CalcGunAngle (void)
|
|||
cl.viewent.angles[YAW] = (r_refdef.viewangles[YAW] + yaw) - (angledelta((r_refdef.viewangles[YAW] + yaw) - OldYawTheta ) * 0.6);//0.6
|
||||
}
|
||||
|
||||
cl.viewent.angles[PITCH] = -1 * ((r_refdef.viewangles[PITCH] + pitch) - (angledelta((r_refdef.viewangles[PITCH] + pitch) + OldPitchTheta ) * 0.2));
|
||||
cl.viewent.angles[PITCH] = -1 * ((r_refdef.viewangles[PITCH] + pitch) - (angledelta((r_refdef.viewangles[PITCH] + pitch) + OldPitchTheta ) * 0.2)); //sB something here...
|
||||
|
||||
OldYawTheta = cl.viewent.angles[YAW];
|
||||
OldPitchTheta = cl.viewent.angles[PITCH];
|
||||
|
||||
/*
|
||||
//cl.viewent.angles[YAW] = r_refdef.viewangles[YAW] + yaw;
|
||||
//cl.viewent.angles[PITCH] = - (r_refdef.viewangles[PITCH] + pitch);
|
||||
|
||||
cl.viewent.angles[PITCH] = - (angledelta(r_refdef.viewangles[PITCH] + pitch));
|
||||
cl.viewent.angles[ROLL] -= v_idlescale.value * sin(cl.time*v_iroll_cycle.value) * v_iroll_level.value;
|
||||
cl.viewent.angles[PITCH] -= v_idlescale.value * sin(cl.time*v_ipitch_cycle.value) * v_ipitch_level.value;
|
||||
cl.viewent.angles[YAW] -= v_idlescale.value * sin(cl.time*v_iyaw_cycle.value) * v_iyaw_level.value;
|
||||
|
@ -814,8 +815,11 @@ void CalcGunAngle (void)
|
|||
cl.viewent2.angles[ROLL] = cl.viewent.angles[ROLL] -= v_idlescale.value * sinf(cl.time*v_iroll_cycle.value * 2) * v_iroll_level.value;
|
||||
cl.viewent2.angles[PITCH] = cl.viewent.angles[PITCH] -= v_idlescale.value * sinf(cl.time*v_ipitch_cycle.value * 2) * v_ipitch_level.value;
|
||||
cl.viewent2.angles[YAW] = cl.viewent.angles[YAW] -= v_idlescale.value * sinf(cl.time*v_iyaw_cycle.value * 2) * v_iyaw_level.value;
|
||||
*/
|
||||
|
||||
|
||||
cl.viewent2.angles[ROLL] = cl.viewent.angles[ROLL] -= v_idlescale.value * sinf(cl.time*v_iroll_cycle.value * 2) * v_iroll_level.value;
|
||||
cl.viewent2.angles[PITCH] = cl.viewent.angles[PITCH] -= v_idlescale.value * sinf(cl.time*v_ipitch_cycle.value * 2) * v_ipitch_level.value;
|
||||
cl.viewent2.angles[YAW] = cl.viewent.angles[YAW] -= v_idlescale.value * sinf(cl.time*v_iyaw_cycle.value * 2) * v_iyaw_level.value;
|
||||
|
||||
//Evaluating total offset
|
||||
CWeaponRot[PITCH] -= cl.viewent.angles[PITCH];
|
||||
|
@ -1237,7 +1241,7 @@ void V_CalcRefdef (void)
|
|||
}
|
||||
//Side offset
|
||||
cADSOfs [0] += (ADSOffset[0] - cADSOfs[0]) * 0.25;
|
||||
cADSOfs [1] = (ADSOffset[1] /*- cADSOfs[1]*/) * 0.25; // naievil -- removed this because it caused some viewmodel errors
|
||||
cADSOfs [1] += (ADSOffset[1] - cADSOfs[1]) * 0.25; // naievil -- removed "- cADSOfs[1]" because it caused some viewmodel errors. sB re-enabled it for now.
|
||||
|
||||
temp_right[0] *= cADSOfs[0];
|
||||
temp_right[1] *= cADSOfs[0];
|
||||
|
@ -1245,7 +1249,7 @@ void V_CalcRefdef (void)
|
|||
|
||||
temp_up[0] *= cADSOfs[1];
|
||||
temp_up[1] *= cADSOfs[1];
|
||||
temp_up[2] *= (cADSOfs[1] * 4); // motolegacy -- another vmodel hack: standard ADS offsets don't go up enough
|
||||
temp_up[2] *= cADSOfs[1]; // motolegacy -- another vmodel hack: standard ADS offsets don't go up enough. sB was cADSOfs[1]
|
||||
|
||||
view->origin[0] +=(temp_right[0] + temp_up[0]);
|
||||
view->origin[1] +=(temp_right[1] + temp_up[1]);
|
||||
|
|
Loading…
Reference in a new issue