From a704318f507f486ac04834747eb209d0a9410702 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 24 Oct 2010 16:02:09 +0000 Subject: keepalive optimizations, r_lights engine variable, OpenGL VBO support --- src/core/entity.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/core/entity.cc') 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 -- cgit v1.2.3