projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c691d61
)
add limit for steps to avoid runaway memory consumption by collision handling
author
sapier
<Sapier at GMX dot net>
Wed, 16 Jan 2013 23:27:11 +0000
(23:27 +0000)
committer
sapier
<Sapier at GMX dot net>
Wed, 16 Jan 2013 23:27:11 +0000
(23:27 +0000)
src/collision.cpp
patch
|
blob
|
history
diff --git
a/src/collision.cpp
b/src/collision.cpp
index 143b559fa7e427e3e7a3078e9f2ddc82a370da86..eb948e3c36a1f9252bc0621aa4a8df8af136bb90 100644
(file)
--- a/
src/collision.cpp
+++ b/
src/collision.cpp
@@
-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