summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
authormtiusane <mtiusane@users.noreply.github.com>2015-02-21 00:41:53 +0200
committermtiusane <mtiusane@users.noreply.github.com>2015-02-21 00:41:53 +0200
commit8222c5a05274a77b3f4873738565e0ca4bc94295 (patch)
tree64998d2f606e6a9d2a004142db9d17a7e9e07789 /src/game/g_buildable.c
parent7f4a2f5a73b086a42b4c139d16fee7622cbdf6ba (diff)
parent84745a87a8c36ab4f87d2514b7fcee6733544504 (diff)
Merge pull request #20 from ppetr/rets-vs-acids
Rets vs acids
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 18a0fae..dbe1f1d 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1505,7 +1505,9 @@ void AAcidTube_Think( gentity_t *self )
if (enemy->client && enemy->client->notrackEndTime >= level.time)
continue;
- if( enemy->client && enemy->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS )
+ if( ( enemy->client && enemy->client->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) ||
+ ( enemy->s.eType == ET_BUILDABLE &&
+ BG_Buildable( enemy->s.modelindex )->team == TEAM_HUMANS ) )
{
// start the attack animation
if( level.time >= self->timestamp + ACIDTUBE_REPEAT_ANIM )
@@ -2891,9 +2893,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;