Made it so camera roll is only calculated when the player movetype is MOVETYPE_WALK

This commit is contained in:
Marco Cawthorne 2019-09-04 03:14:41 +02:00
parent 9726d25eaf
commit 205cd5856f

View file

@ -104,7 +104,7 @@ float View_CalcRoll(void)
{
float roll;
makevectors(view_angles);
roll = dotproduct(pSeat->vPlayerVelocity, v_right);
roll *= 0.02f;
return autocvar_v_camroll ? roll : 0;
@ -249,7 +249,10 @@ void View_DrawViewModel(void)
addentity(eViewModel);
}
View_CalcCamBob();
view_angles[2] = View_CalcRoll();
if (pl.movetype == MOVETYPE_WALK) {
view_angles[2] = View_CalcRoll();
}
}
void View_PostDraw(void)