diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/cl_input.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/cl_input.c b/src/client/cl_input.c index 48bf51df..7a917df2 100644 --- a/src/client/cl_input.c +++ b/src/client/cl_input.c @@ -633,6 +633,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 ) { |