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.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index af100a9..8fde03a 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -990,6 +990,18 @@ void EntityControlable::action(btScalar seconds)
void EntityControlable::frame(float seconds)
{
EntityDynamic::frame(seconds);
+
+ // update zone keepalive bounding box
+ if (owner() && (owner()->control() == this) && zone()) {
+
+ // add player controlable to keepalive bounding box
+ if (!zone()->keepalive_run()) {
+ zone()->keepalive_box().assign(location());
+ zone()->set_keepalive_run(true);
+ } else {
+ zone()->keepalive_box().expand(location());
+ }
+ }
}