Skip to content
Snippets Groups Projects
Commit 12e9f3d0 authored by sapier's avatar sapier
Browse files

add limit for steps to avoid runaway memory consumption by collision handling

parent c691d619
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