summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
authorMichael Levin <risujin@fastmail.fm>2009-10-03 11:18:16 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:14:51 +0000
commitbafa9e30bf24fcd05a1fe73b00091ac476ab0828 (patch)
tree59803f3ccbfc23fa8f6063e07afac4e8be19c23e /src/game/g_buildable.c
parent6bff95c5978a0d4e0cb7e99232a1e61678fcf81b (diff)
* Mass Driver will only shoot through players and buildables
* Killing buildables nets a reward (tweak in tremulous.h) * Removed some spurious comments and unused defines from tremulous.h
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 33803877..2dc55253 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -631,6 +631,7 @@ Called when an alien spawn dies
*/
void ASpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod )
{
+ G_RewardAttackers( self );
G_SetBuildableAnim( self, BANIM_DESTROY1, qtrue );
G_SetIdleBuildableAnim( self, BANIM_DESTROYED );
@@ -646,20 +647,14 @@ void ASpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
if( attacker && attacker->client )
{
- if( attacker->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
- {
- if( self->s.modelindex == BA_A_OVERMIND )
- G_AddCreditToClient( attacker->client, OVERMIND_VALUE, qtrue );
- else if( self->s.modelindex == BA_A_SPAWN )
- G_AddCreditToClient( attacker->client, ASPAWN_VALUE, qtrue );
- }
- else
+ if( attacker->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
{
G_TeamCommand( PTE_ALIENS,
va( "print \"%s ^3DESTROYED^7 by teammate %s^7\n\"",
BG_FindHumanNameForBuildable( self->s.modelindex ),
attacker->client->pers.netname ) );
}
+
G_LogPrintf( "Decon: %i %i %i: %s destroyed %s by %s\n",
attacker->client->ps.clientNum, self->s.modelindex, mod,
attacker->client->pers.netname,
@@ -874,6 +869,7 @@ exploding.
*/
void AGeneric_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod )
{
+ G_RewardAttackers( self );
G_SetBuildableAnim( self, BANIM_DESTROY1, qtrue );
G_SetIdleBuildableAnim( self, BANIM_DESTROYED );
@@ -1470,6 +1466,8 @@ void AHovel_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
{
vec3_t dir;
+ G_RewardAttackers( self );
+
VectorCopy( self->s.origin2, dir );
//do a bit of radius damage
@@ -2476,7 +2474,7 @@ Called when a human spawn dies
*/
void HSpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod )
{
- //pretty events and cleanup
+ G_RewardAttackers( self );
G_SetBuildableAnim( self, BANIM_DESTROY1, qtrue );
G_SetIdleBuildableAnim( self, BANIM_DESTROYED );
@@ -2497,20 +2495,14 @@ void HSpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
if( attacker && attacker->client )
{
- if( attacker->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
- {
- if( self->s.modelindex == BA_H_REACTOR )
- G_AddCreditToClient( attacker->client, REACTOR_VALUE, qtrue );
- else if( self->s.modelindex == BA_H_SPAWN )
- G_AddCreditToClient( attacker->client, HSPAWN_VALUE, qtrue );
- }
- else
+ if( attacker->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
{
G_TeamCommand( PTE_HUMANS,
va( "print \"%s ^3DESTROYED^7 by teammate %s^7\n\"",
BG_FindHumanNameForBuildable( self->s.modelindex ),
attacker->client->pers.netname ) );
}
+
G_LogPrintf( "Decon: %i %i %i: %s destroyed %s by %s\n",
attacker->client->ps.clientNum, self->s.modelindex, mod,
attacker->client->pers.netname,