Core: Added the attacker to IDamageModifier' GetDamageModifier

This commit is contained in:
geckosoft
2010-10-25 15:06:36 +02:00
committed by Chris Forbes
parent 2640603f6c
commit e7c61fac5c
8 changed files with 8 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA.Effects
public void Tick( World world )
{
if (a.IsDead() || b.GetDamageModifier(null) > 0)
if (a.IsDead() || b.GetDamageModifier(null, null) > 0)
world.AddFrameEndTask(w => w.Remove(this));
}

View File

@@ -69,7 +69,7 @@ namespace OpenRA.Mods.RA
}
}
public float GetDamageModifier(WarheadInfo warhead)
public float GetDamageModifier(Actor attacker, WarheadInfo warhead)
{
return Level > 0 ? 1 / Info.ArmorModifier[Level - 1] : 1;
}

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA
class Invulnerable : IDamageModifier
{
public float GetDamageModifier( WarheadInfo warhead )
public float GetDamageModifier( Actor attacker, WarheadInfo warhead )
{
return 0.0f;
}

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA
RemainingTicks--;
}
public float GetDamageModifier( WarheadInfo warhead )
public float GetDamageModifier(Actor attacker, WarheadInfo warhead)
{
return (RemainingTicks > 0) ? 0.0f : 1.0f;
}

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Mods.RA
--remainingProneTime;
}
public float GetDamageModifier( WarheadInfo warhead )
public float GetDamageModifier(Actor attacker, WarheadInfo warhead )
{
return IsProne ? proneDamage : 1f;
}

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.RA
class TeslaInstantKills : IDamageModifier
{
public float GetDamageModifier( WarheadInfo warhead )
public float GetDamageModifier(Actor attacker, WarheadInfo warhead )
{
if( warhead != null && warhead.InfDeath == 5 )
return 1000f;