TreeCache dies; trees & MINE have unitinfo
This commit is contained in:
@@ -26,7 +26,8 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
public void BuildingComplete(Actor self)
|
||||
{
|
||||
self.Owner.ChangePower(unitInfo.Power);
|
||||
if (self.Owner != null)
|
||||
self.Owner.ChangePower(unitInfo.Power);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,8 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
public override IEnumerable<Tuple<Sprite, float2, int>> Render(Actor self)
|
||||
{
|
||||
yield return Tuple.New(anim.Image, 24f * (float2)self.Location, self.Owner.Palette);
|
||||
var pal = self.Owner == null ? 0 : self.Owner.Palette;
|
||||
yield return Tuple.New(anim.Image, 24f * (float2)self.Location, pal);
|
||||
}
|
||||
|
||||
public virtual void Damaged(Actor self, DamageState state)
|
||||
|
||||
Reference in New Issue
Block a user