diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-24 16:02:09 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-24 16:02:09 +0000 |
commit | a704318f507f486ac04834747eb209d0a9410702 (patch) | |
tree | b6f3f6df4b285be0b9c6e91c0486271daf0bb6ee /src/core/entity.cc | |
parent | c2a6f7c2ee6245109c897ee23b093b5277a30594 (diff) |
keepalive optimizations, r_lights engine variable, OpenGL VBO support
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index c76b23a..c99c186 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -14,6 +14,7 @@ #include "core/cvar.h" #include "core/application.h" #include "core/gameinterface.h" +#include "core/gameserver.h" #include "BulletCollision/CollisionShapes/btBoxShape.h" @@ -596,6 +597,12 @@ void EntityDynamic::frame(float seconds) return; } + if (flag_is_set(KeepAlive)) { + if ((keepalive_time() > 0.0f) && (keepalive_time() < server()->time())) { + die(); + } + } + // transfer bullet state to entity state if (entity_body) { // this makes sure an update is sent if speed goes to 0 in the next step |