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

This commit is contained in:
sapier 2013-01-16 23:27:11 +00:00
parent c691d619c2
commit 12e9f3d010

@ -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