mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fix frame_msec possibly being zero in cl_input.c.
This fixes a mouse freezing bug.
This commit is contained in:
parent
dacfa6ae55
commit
aba9f25744
1 changed files with 6 additions and 0 deletions
|
@ -726,6 +726,12 @@ void CL_CreateNewCommands( void ) {
|
|||
|
||||
frame_msec = com_frameTime - old_com_frameTime;
|
||||
|
||||
// if running over 1000fps, act as if each frame is 1ms
|
||||
// prevents divisions by zero
|
||||
if ( frame_msec < 1 ) {
|
||||
frame_msec = 1;
|
||||
}
|
||||
|
||||
// if running less than 5fps, truncate the extra time to prevent
|
||||
// unexpected moves after a hitch
|
||||
if ( frame_msec > 200 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue