Added cvar v_camroll.
This commit is contained in:
parent
d577f378e2
commit
b34bd0298d
1 changed files with 12 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
var int autocvar_v_cambob = FALSE;
|
||||
var int autocvar_v_camroll = TRUE;
|
||||
|
||||
void View_Init(void)
|
||||
{
|
||||
|
@ -99,6 +100,16 @@ void View_CalcBob(void)
|
|||
pSeat->fBob = bound(-7, fBob, 4);
|
||||
}
|
||||
|
||||
float View_CalcRoll(void)
|
||||
{
|
||||
float roll;
|
||||
makevectors(view_angles);
|
||||
|
||||
roll = dotproduct(pSeat->vPlayerVelocity, v_right);
|
||||
roll *= 0.02f;
|
||||
return autocvar_v_camroll ? roll : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
View_CalcCameraBob
|
||||
|
@ -238,6 +249,7 @@ void View_DrawViewModel(void)
|
|||
addentity(eViewModel);
|
||||
}
|
||||
View_CalcCamBob();
|
||||
view_angles[2] = View_CalcRoll();
|
||||
}
|
||||
|
||||
void View_PostDraw(void)
|
||||
|
|
Loading…
Reference in a new issue