prevent infantry going prone due to tib damage

This commit is contained in:
Chris Forbes
2010-10-06 17:37:23 +13:00
parent 1390bb7428
commit ce5cf93077
3 changed files with 4 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ namespace OpenRA.GameRules
[FieldLoader.Load] public readonly int Damage = 0; // how much (raw) damage to deal [FieldLoader.Load] public readonly int Damage = 0; // how much (raw) damage to deal
[FieldLoader.Load] public readonly int Delay = 0; // delay in ticks before dealing the damage. 0=instant (old model) [FieldLoader.Load] public readonly int Delay = 0; // delay in ticks before dealing the damage. 0=instant (old model)
[FieldLoader.Load] public readonly DamageModel DamageModel = DamageModel.Normal; // which damage model to use [FieldLoader.Load] public readonly DamageModel DamageModel = DamageModel.Normal; // which damage model to use
[FieldLoader.Load] public readonly bool PreventProne = false; // whether we should prevent prone response in infantry.
public float EffectivenessAgainst(Actor self) public float EffectivenessAgainst(Actor self)
{ {

View File

@@ -30,7 +30,8 @@ namespace OpenRA.Mods.RA
public void Damaged(Actor self, AttackInfo e) public void Damaged(Actor self, AttackInfo e)
{ {
if (e.Damage > 0) /* fix to allow healing via `damage` */ if (e.Damage > 0) /* fix to allow healing via `damage` */
remainingProneTime = defaultProneTime; if (!e.Warhead.PreventProne)
remainingProneTime = defaultProneTime;
} }
public void Tick(Actor self) public void Tick(Actor self)

View File

@@ -662,3 +662,4 @@ Tiberium:
Spread: 1 Spread: 1
InfDeath: 4 InfDeath: 4
Damage: 5 Damage: 5
PreventProne: yes