summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-02-23 19:16:36 +0000
committerTim Angus <tim@ngus.net>2003-02-23 19:16:36 +0000
commit63b76c006f1ae19cc68dece317ccbdd6def2549e (patch)
tree37d15801a4ca355cb017a3abeb7d11c3b5300a53 /src
parent15bd652f76560d93e8c5516d59180872cba05bb0 (diff)
* Fixed mutually recursive mine loop
Diffstat (limited to 'src')
-rw-r--r--src/game/g_buildable.c5
-rw-r--r--src/game/g_combat.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index f64d7307..2881982b 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -1314,6 +1314,9 @@ void HFM_Touch( gentity_t *self, gentity_t *other, trace_t *trace )
if( self->health <= 0 )
return;
+ if( other && other->client && other->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ return;
+
//go boom
G_Damage( self, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE );
}
@@ -1333,6 +1336,8 @@ void HFM_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int da
dir[ 0 ] = dir[ 1 ] = 0;
dir[ 2 ] = -1;
+ self->takedamage = qfalse;
+
//do a bit of radius damage
G_RadiusDamage( self->s.pos.trBase, self->parent, self->splashDamage,
self->splashRadius, self, self->splashMethodOfDeath );
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 391c09b6..a7cf150b 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -230,7 +230,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
AddScore( self, -1 );
}
- if( self->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ if( attacker && attacker->client && self->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
{
int clientNum = attacker->client->ps.clientNum;
float denominator, numerator = self->credits[ clientNum ];
@@ -980,7 +980,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
}
// do the damage
- if(take)
+ if( take )
{
targ->health = targ->health - take;
if( targ->client )
@@ -997,7 +997,7 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
if( client )
targ->flags |= FL_NO_KNOCKBACK;
- if (targ->health < -999)
+ if( targ->health < -999 )
targ->health = -999;
targ->enemy = attacker;