summaryrefslogtreecommitdiff
path: root/src/game/g_combat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r--src/game/g_combat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 93237e96..527e3068 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -894,7 +894,7 @@ dflags these flags are used to control how T_Damage works
DAMAGE_RADIUS damage was indirect (from a nearby explosion)
DAMAGE_NO_ARMOR armor does not protect from this damage
DAMAGE_NO_KNOCKBACK do not affect velocity, just view angles
- DAMAGE_NO_PROTECTION kills godmode, armor, everything
+ DAMAGE_NO_PROTECTION kills everything except godmode
============
*/
@@ -1000,6 +1000,10 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
}
}
+ // check for godmode
+ if( targ->flags & FL_GODMODE )
+ return;
+
// don't do friendly fire on movement attacks
if( ( mod == MOD_LEVEL4_TRAMPLE || mod == MOD_LEVEL3_POUNCE ||
mod == MOD_LEVEL4_CRUSH ) &&
@@ -1060,10 +1064,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
G_BroadcastEvent( EV_DCC_ATTACK, 0 );
}
}
-
- // check for godmode
- if ( targ->flags & FL_GODMODE )
- return;
}
// add to the attacker's hit counter