mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Fix frame_msec possibly being zero in cl_input.c.
This fixes a mouse freezing bug.
This commit is contained in:
parent
2b2f1aeaa1
commit
41791c662f
1 changed files with 6 additions and 0 deletions
|
@ -632,6 +632,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…
Reference in a new issue