summaryrefslogtreecommitdiff
path: root/src/game/g_buildable.c
diff options
context:
space:
mode:
authorPetr Pudlak <petr.mvd@gmail.com>2014-09-20 18:54:42 +0200
committerPetr Pudlak <petr.mvd@gmail.com>2014-09-20 19:54:58 +0200
commit0238f457f4200a92e99e3be0a61a9870ea8ae560 (patch)
tree2c52784f73f3cddbc4de3dcb134b8409ec458ae5 /src/game/g_buildable.c
parent43ea36ac9bea52cd058c81a8697878c508a0eb4b (diff)
Add a separate mode of death for no-BP building suicides
Diffstat (limited to 'src/game/g_buildable.c')
-rw-r--r--src/game/g_buildable.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 90df479..72d4d3c 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -527,15 +527,15 @@ G_Suicide
let the given buildable suicide
================
*/
-void G_Suicide( gentity_t *self )
+void G_Suicide( gentity_t *self, meansOfDeath_t death )
{
const gentity_t *parent = self->parentNode;
if( parent )
G_Damage( self, NULL, g_entities + parent->killedBy, NULL, NULL,
- self->health, 0, MOD_NOCREEP );
+ self->health, 0, death );
else
- G_Damage( self, NULL, NULL, NULL, NULL, self->health, 0, MOD_NOCREEP );
+ G_Damage( self, NULL, NULL, NULL, NULL, self->health, 0, death );
}
/*
@@ -978,7 +978,7 @@ void AGeneric_CreepCheck( gentity_t *self )
{
if( !G_FindCreep( self ) )
{
- G_Suicide( self );
+ G_Suicide( self, MOD_NOCREEP );
return;
}
G_CreepSlow( self );
@@ -2331,7 +2331,7 @@ static qboolean G_SuicideIfNoPower( gentity_t *self )
self->count = level.time;
else if( ( level.time - self->count ) >= HUMAN_BUILDABLE_INACTIVE_TIME )
{
- G_Suicide( self );
+ G_Suicide( self, MOD_NOCREEP );
return qtrue;
}
}