don't pass world to Widget.Tick, either

This commit is contained in:
Bob
2010-10-11 20:21:15 +13:00
parent e0afc08e5f
commit 0873741983
9 changed files with 16 additions and 17 deletions

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.RA.Widgets
get { return new Rectangle((int)(paletteOrigin.X) - 24, (int)(paletteOrigin.Y), 215, 48 * numActualRows); }
}
public override void Tick(World world)
public override void Tick()
{
VisibleQueues.Clear();
@@ -101,7 +101,7 @@ namespace OpenRA.Mods.RA.Widgets
TickPaletteAnimation(world);
base.Tick(world);
base.Tick();
}
void TickPaletteAnimation(World world)

View File

@@ -121,7 +121,7 @@ namespace OpenRA.Mods.RA.Widgets
public override void DrawInner()
{
if( world.LocalPlayer == null ) return;
if( world == null || world.LocalPlayer == null ) return;
radarCollection = "radar-" + world.LocalPlayer.Country.Race;
@@ -155,13 +155,12 @@ namespace OpenRA.Mods.RA.Widgets
Game.Renderer.DisableScissor();
}
}
}
int updateTicks = 0;
public override void Tick(World w)
public override void Tick()
{
var w = Game.world;
if( world != w )
SetWorld( w );