fix rendering bug when cl_bobcycle was set to zero (sf.net bug/41)

fix taken from Kevin Shanahan's Tyr-Quake
This commit is contained in:
Ozkan Sezer 2021-03-31 23:51:10 +03:00
parent 7f0757588d
commit f88bdb7d0b

View file

@ -116,6 +116,9 @@ float V_CalcBob (void)
float bob;
float cycle;
if (!cl_bobcycle.value) /* Avoid divide-by-zero, don't bob */
return 0.0f;
cycle = cl.time - (int)(cl.time/cl_bobcycle.value)*cl_bobcycle.value;
cycle /= cl_bobcycle.value;
if (cycle < cl_bobup.value)