diff options
author | Petr Pudlak <petr.mvd@gmail.com> | 2015-02-19 22:11:18 +0100 |
---|---|---|
committer | Petr Pudlak <petr.mvd@gmail.com> | 2015-02-20 12:17:57 +0100 |
commit | 487154dd6c254351f405a85a4264e97b2a141323 (patch) | |
tree | 697c01fe45cfd56ae2bedc40a1e9290aa68f6e3a /src/game/g_buildable.c | |
parent | 7f4a2f5a73b086a42b4c139d16fee7622cbdf6ba (diff) |
Let turrets also target any alien buildings
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 18a0fae..7247d9a 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2891,9 +2891,20 @@ qboolean HMGTurret_CheckTarget( gentity_t *self, gentity_t *target, trace_t tr; vec3_t dir, end; - if( !target || target->health <= 0 || !target->client || - target->client->pers.teamSelection != TEAM_ALIENS ) - return qfalse; + if( !target || target->health <= 0 ) + return qfalse; + + if( target->client ) + { + if( target->client->pers.teamSelection != TEAM_ALIENS ) + return qfalse; + } + else + { + if( !( target->s.eType == ET_BUILDABLE && + BG_Buildable( target->s.modelindex )->team == TEAM_ALIENS ) ) + return qfalse; + } if( target->flags & FL_NOTARGET ) return qfalse; |