use RepairIndicator rather than renderer hack

This commit is contained in:
Chris Forbes
2010-01-02 17:52:24 +13:00
parent 3b53f692df
commit 6b1857e0b6
4 changed files with 32 additions and 16 deletions

View File

@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRa.Game.Effects;
namespace OpenRa.Game.Traits
{
@@ -43,10 +44,6 @@ namespace OpenRa.Game.Traits
isRepairing = !isRepairing;
}
}
public bool IsRepairing(){
return isRepairing;
}
int remainingTicks;
@@ -62,8 +59,10 @@ namespace OpenRa.Game.Traits
if (!self.Owner.TakeCash(cost))
{
remainingTicks = 1;
return;
}
Game.world.AddFrameEndTask(w => w.Add(new RepairIndicator(self)));
self.InflictDamage(self, -hpToRepair, Rules.WarheadInfo["Super"]);
if (self.Health == self.Info.Strength)
{