From a6baf6e8784bef8c49ec05d94c7fc2006314569d Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Thu, 9 Jun 2011 22:22:42 +0000 Subject: * (bug 4997) Use spherical regions for hive and boost ranges instead of boxes (/dev/humancontroller) --- src/game/g_active.c | 3 +++ src/game/g_buildable.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src') 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 ) -- cgit