From 106d0cb0cf884dd7a2920564852c001e13af1568 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 8 Nov 2010 15:24:41 +0000 Subject: fixes crash on jumpgate usage, streamlined keepalive/upkeep frame cycle --- src/core/entity.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/core/entity.cc') 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()); + } + } } -- cgit v1.2.3