Skip to content
Snippets Groups Projects
Commit f9a8efb9 authored by kwolekr's avatar kwolekr
Browse files

Merge pull request #431 from sapier/dtime_clamping

add limit for (collision handling) steps to avoid runaway memory consumption 
parents 7f240aea 12e9f3d0
No related branches found
No related tags found
No related merge requests found
......@@ -199,6 +199,10 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
/*
Calculate new velocity
*/
if( dtime > 0.5 ) {
infostream<<"collisionMoveSimple: WARNING: maximum step interval exceeded, lost movement details!"<<std::endl;
dtime = 0.5;
}
speed_f += accel_f * dtime;
// If there is no speed, there are no collisions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment