Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc7
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