mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-08 17:32:14 +00:00
FF/no-FF fixes. g_friendlyFire 0 = no FF, 1 = FF, 2 = no FF + knockback
This commit is contained in:
parent
dfa3a47fdd
commit
4109f03f9e
1 changed files with 11 additions and 1 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.37 2002/01/31 01:53:30 jbravo
|
||||||
|
// FF/no-FF fixes. g_friendlyFire 0 = no FF, 1 = FF, 2 = no FF + knockback
|
||||||
|
//
|
||||||
// Revision 1.36 2002/01/12 20:02:16 hal9000
|
// Revision 1.36 2002/01/12 20:02:16 hal9000
|
||||||
// Verify we have a valid client pointer before using its members
|
// Verify we have a valid client pointer before using its members
|
||||||
//
|
//
|
||||||
|
@ -1343,6 +1346,12 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
|
||||||
return; // JBravo: No dmg during LCA
|
return; // JBravo: No dmg during LCA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// JBravo: FF control
|
||||||
|
if (targ != attacker && targ->client && attacker->client &&
|
||||||
|
targ->client->sess.sessionTeam == attacker->client->sess.sessionTeam &&
|
||||||
|
!g_friendlyFire.integer)
|
||||||
|
return;
|
||||||
|
|
||||||
// the intermission has allready been qualified for, so don't
|
// the intermission has allready been qualified for, so don't
|
||||||
// allow any extra scoring
|
// allow any extra scoring
|
||||||
if ( level.intermissionQueued ) {
|
if ( level.intermissionQueued ) {
|
||||||
|
@ -1596,7 +1605,8 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
|
||||||
#else
|
#else
|
||||||
if ( targ != attacker && OnSameTeam (targ, attacker) ) {
|
if ( targ != attacker && OnSameTeam (targ, attacker) ) {
|
||||||
#endif
|
#endif
|
||||||
if ( !g_friendlyFire.integer ) {
|
// JBravo: more FF tweaks
|
||||||
|
if ( g_friendlyFire.integer == 2 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue