1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-11-11 03:45:01 -05:00

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

View File

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