summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 93514727..0f6a84d2 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -445,6 +445,14 @@ void ASpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
self->think = ASpawn_Blast;
self->nextthink = level.time + 5000; //wait .5 seconds before damaging others
+ if( attacker && attacker->client )
+ {
+ if( self->s.modelindex == BA_A_OVERMIND )
+ attacker->client->ps.persistant[ PERS_CREDIT ] += OVERMIND_VALUE;
+ else if( self->s.modelindex == BA_A_SPAWN )
+ attacker->client->ps.persistant[ PERS_CREDIT ] += ASPAWN_VALUE;
+ }
+
trap_LinkEntity( self );
}
@@ -1691,6 +1699,14 @@ void HSpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
self->nextthink = level.time + HUMAN_DETONATION_DELAY;
self->powered = qfalse; //free up power
+ if( attacker && attacker->client )
+ {
+ if( self->s.modelindex == BA_H_REACTOR )
+ attacker->client->ps.persistant[ PERS_CREDIT ] += REACTOR_VALUE;
+ else if( self->s.modelindex == BA_H_SPAWN )
+ attacker->client->ps.persistant[ PERS_CREDIT ] += HSPAWN_VALUE;
+ }
+
trap_LinkEntity( self );
}