diff options
author | Tim Angus <tim@ngus.net> | 2002-02-07 22:48:12 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2002-02-07 22:48:12 +0000 |
commit | c5cae84d6cf86421d358778403df57e1e36effeb (patch) | |
tree | 894a93eb79fc28800183d843668018a5c8be8e04 /src/game/g_buildable.c | |
parent | c7f239a68ae042d023d075c6ac94e172205e69c5 (diff) |
Buildable sounds
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r-- | src/game/g_buildable.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 9944f55f..3ae84654 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -454,10 +454,61 @@ void ASpawn_Pain( gentity_t *self, gentity_t *attacker, int damage ) + + //================================================================================== + + +/* +================ +AOvermind_Think + +think function for Alien Acid Tube +================ +*/ +void AOvermind_Think( gentity_t *self ) +{ + int entityList[ MAX_GENTITIES ]; + vec3_t range = { 200, 200, 200 }; + vec3_t mins, maxs; + int i, num; + gentity_t *enemy; + + VectorAdd( self->s.origin, range, maxs ); + VectorSubtract( self->s.origin, range, mins ); + + //do some damage + num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES ); + for( i = 0; i < num; i++ ) + { + enemy = &g_entities[ entityList[ i ] ]; + + if( enemy->client && enemy->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) + { + self->timestamp = level.time; + G_SelectiveRadiusDamage( self->s.pos.trBase, self, self->splashDamage, + self->splashRadius, self, MOD_SHOTGUN, PTE_ALIENS ); + G_setBuildableAnim( self, BANIM_ATTACK1, qfalse ); + } + } + + self->nextthink = level.time + BG_FindNextThinkForBuildable( self->s.modelindex ); +} + + + + + + +//================================================================================== + + + + + /* ================ ABarricade_Pain @@ -1984,6 +2035,7 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin case BA_A_HIVEMIND: built->die = ASpawn_Die; + built->think = AOvermind_Think; built->pain = ASpawn_Pain; break; |