Mop up remaining "race" private variables

This commit is contained in:
Pavel Penev
2015-08-17 00:38:10 +03:00
parent 2b359b54c7
commit 663c9239df
3 changed files with 9 additions and 9 deletions

View File

@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Common.Traits
}
}
readonly string race;
readonly string faction;
readonly RenderSpritesInfo info;
readonly List<AnimationWrapper> anims = new List<AnimationWrapper>();
string cachedImage;
@@ -145,7 +145,7 @@ namespace OpenRA.Mods.Common.Traits
public RenderSprites(ActorInitializer init, RenderSpritesInfo info)
{
this.info = info;
race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : init.Self.Owner.Faction.InternalName;
faction = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : init.Self.Owner.Faction.InternalName;
}
public string GetImage(Actor self)
@@ -153,7 +153,7 @@ namespace OpenRA.Mods.Common.Traits
if (cachedImage != null)
return cachedImage;
return cachedImage = info.GetImage(self.Info, self.World.Map.SequenceProvider, race);
return cachedImage = info.GetImage(self.Info, self.World.Map.SequenceProvider, faction);
}
public void UpdatePalette()