From c1da521a42a4902a7f788015a74dcbebdf578293 Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Sat, 10 Oct 2009 05:31:29 +0000 Subject: * Fix adding to the build timer when deconstructing with g_markdeconstruct 0 (thanks Rezyn) * Fix *not* adding to the build timer when marking things for deconstruction with g_markdeconstruct>0 (thanks Rezyn) * Fix /destroy not working with g_friendlyBuildableFire 0 --- src/game/g_cmds.c | 11 +++++------ src/game/g_combat.c | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index ce3a5b36..b822e8b9 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1727,15 +1727,14 @@ void Cmd_Destroy_f( gentity_t *ent ) } else { + if( !g_cheats.integer ) // add a bit to the build timer + { + ent->client->ps.stats[ STAT_MISC ] += + BG_Buildable( traceEnt->s.modelindex )->buildTime / 4; + } G_LogDestruction( traceEnt, ent, MOD_DECONSTRUCT ); G_FreeEntity( traceEnt ); } - - if( !g_cheats.integer ) - { - ent->client->ps.stats[ STAT_MISC ] += - BG_Buildable( traceEnt->s.modelindex )->buildTime / 4; - } } } } diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 80278f9a..aabcbcbe 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1028,7 +1028,8 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, { if( targ->buildableTeam == attacker->client->pers.teamSelection ) { - if( !g_friendlyBuildableFire.integer ) + if( !g_friendlyBuildableFire.integer && mod != MOD_DECONSTRUCT + && mod != MOD_SUICIDE ) return; } -- cgit