Pass WorldRenderer to AnimationWithOffset.OffsetFunc.

This commit is contained in:
Paul Chote
2013-03-31 19:56:11 +13:00
parent 7c21459b48
commit 2f80cd5f92
12 changed files with 16 additions and 16 deletions

View File

@@ -47,7 +47,7 @@ namespace OpenRA.Mods.RA.Render
muzzleFlashes.Add("muzzle{0}".F(muzzleFlashes.Count), new AnimationWithOffset(
muzzleFlash,
() => PPos.FromWPosHackZ(WPos.Zero + a.MuzzleOffset(self, barrel)).ToFloat2(),
wr => PPos.FromWPosHackZ(WPos.Zero + a.MuzzleOffset(self, barrel)).ToFloat2(),
() => !isShowing));
}
}
@@ -63,7 +63,7 @@ namespace OpenRA.Mods.RA.Render
{
foreach (var a in muzzleFlashes.Values)
if (a.DisableFunc == null || !a.DisableFunc())
yield return a.Image(self, wr.Palette("effect"));
yield return a.Image(self, wr, wr.Palette("effect"));
}
public void Tick(Actor self)