mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Avoid problems when bobcycle is 0.
This commit is contained in:
parent
2e1abf9fa7
commit
933155ce88
1 changed files with 7 additions and 2 deletions
|
@ -117,8 +117,13 @@ float V_CalcBob (void)
|
|||
float bob;
|
||||
float cycle;
|
||||
|
||||
cycle = cl.time - (int)(cl.time/cl_bobcycle.value)*cl_bobcycle.value;
|
||||
cycle /= cl_bobcycle.value;
|
||||
if (!cl_bobcycle.value)
|
||||
cycle = 0;
|
||||
else
|
||||
{
|
||||
cycle = cl.time - (int)(cl.time/cl_bobcycle.value)*cl_bobcycle.value;
|
||||
cycle /= cl_bobcycle.value;
|
||||
}
|
||||
if (cycle < cl_bobup.value)
|
||||
cycle = M_PI * cycle / cl_bobup.value;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue