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:
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
|
||||
|
Loading…
Reference in New Issue
Block a user