diff options
| author | Stijn Buys <ingar@osirion.org> | 2010-11-08 15:24:41 +0000 | 
|---|---|---|
| committer | Stijn Buys <ingar@osirion.org> | 2010-11-08 15:24:41 +0000 | 
| commit | 106d0cb0cf884dd7a2920564852c001e13af1568 (patch) | |
| tree | 74e813e9f57a1c43e4946850e860bd1a94ae5346 /src/core/entity.cc | |
| parent | b7dc0938eb7d59f928bbcf2a3a4877a6f60940e5 (diff) | |
fixes crash on jumpgate usage,  streamlined keepalive/upkeep frame cycle
Diffstat (limited to 'src/core/entity.cc')
| -rw-r--r-- | src/core/entity.cc | 12 | 
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()); +		} +	}  } | 
