Render shellmap / don't assume Game.Localplayer exists

This commit is contained in:
Paul Chote
2010-04-09 20:11:29 +12:00
parent 36a6123dd2
commit 1078fc380a
6 changed files with 10 additions and 14 deletions

View File

@@ -44,13 +44,12 @@ namespace OpenRA.Traits
public void Render()
{
var shroud = Game.world.LocalPlayer.Shroud;
var map = Game.world.Map;
for (int y = map.YOffset; y < map.YOffset + map.Height; y++)
for (int x = map.XOffset; x < map.XOffset + map.Width; x++)
{
if (!shroud.IsExplored(new int2(x, y))) continue;
if (Game.world.LocalPlayer != null && !Game.world.LocalPlayer.Shroud.IsExplored(new int2(x, y))) continue;
var c = content[x, y];
if (c.image != null)