add limit for steps to avoid runaway memory consumption by collision handling
This commit is contained in:
parent
c691d619c2
commit
12e9f3d010
|
@ -199,6 +199,10 @@ collisionMoveResult collisionMoveSimple(Map *map, IGameDef *gamedef,
|
||||||
/*
|
/*
|
||||||
Calculate new velocity
|
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;
|
speed_f += accel_f * dtime;
|
||||||
|
|
||||||
// If there is no speed, there are no collisions
|
// If there is no speed, there are no collisions
|
||||||
|
|
Loading…
Reference in New Issue