diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2011-06-09 22:22:42 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:18:09 +0000 |
commit | a6baf6e8784bef8c49ec05d94c7fc2006314569d (patch) | |
tree | 94dae39b965da558a555b4a7a9bb60b6133e58f4 /src | |
parent | d91c84bb9a099ee7f5fbf04997b26461265494a8 (diff) |
* (bug 4997) Use spherical regions for hive and boost ranges instead of boxes (/dev/humancontroller)
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_active.c | 3 | ||||
-rw-r--r-- | src/game/g_buildable.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index 6a149f90..dbc00741 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1417,6 +1417,9 @@ void ClientThink_real( gentity_t *ent ) { gentity_t *boost = &g_entities[ entityList[ i ] ]; + if( Distance( client->ps.origin, boost->s.origin ) > REGEN_BOOST_RANGE ) + continue; + if( modifier < BOOSTER_REGEN_MOD && boost->s.eType == ET_BUILDABLE && boost->s.modelindex == BA_A_BOOSTER && boost->spawned && boost->health > 0 && boost->powered ) diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 6db80081..8cf1d6cd 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -1250,6 +1250,9 @@ static qboolean AHive_CheckTarget( gentity_t *self, gentity_t *enemy ) // Check if the tip of the hive can see the target VectorMA( self->s.pos.trBase, self->r.maxs[ 2 ], self->s.origin2, tip_origin ); + if( Distance( tip_origin, enemy->s.origin ) > HIVE_SENSE_RANGE ) + return qfalse; + trap_Trace( &trace, tip_origin, NULL, NULL, enemy->s.pos.trBase, self->s.number, MASK_SHOT ); if( trace.fraction < 1.0f && trace.entityNum != enemy->s.number ) |