mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Merge pull request #431 from sapier/dtime_clamping
add limit for (collision handling) steps to avoid runaway memory consumption
This commit is contained in:
commit
f9a8efb992
@ -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