[issue #140]
fix bug with friendly fire being disabled with custom callbacks on IW4x
This commit is contained in:
parent
43ac1218cc
commit
cad2952c46
@ -230,15 +230,15 @@ Process_Hit( type, attacker, sHitLoc, sMeansOfDeath, iDamage, sWeapon )
|
||||
|
||||
Callback_PlayerDamage( eInflictor, attacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
|
||||
{
|
||||
if ( level.teamBased && isDefined( attacker ) && ( self != attacker ) && isDefined( attacker.team ) && ( self.pers[ "team" ] == attacker.team ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( self.health - iDamage > 0 )
|
||||
{
|
||||
isFriendlyFire = level.teamBased && isDefined( attacker ) && ( self != attacker ) && isDefined( attacker.team ) && ( self.pers[ "team" ] == attacker.team );
|
||||
|
||||
if ( !isFriendlyFire )
|
||||
{
|
||||
self Process_Hit( "Damage", attacker, sHitLoc, sMeansOfDeath, iDamage, sWeapon );
|
||||
}
|
||||
}
|
||||
|
||||
self maps\mp\gametypes\_damage::Callback_PlayerDamage( eInflictor, attacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user