Core: Added basic support for Spectators

TODO: Someone modify the files for cnc (chrome / rules)
This commit is contained in:
geckosoft
2010-10-31 03:57:03 +01:00
parent b9c40ad3ce
commit 030bd4b28d
18 changed files with 418 additions and 186 deletions

View File

@@ -14,8 +14,9 @@ namespace OpenRA.Mods.RA
{
public class OpenWidgetAtGameStartInfo : ITraitInfo
{
public readonly string Widget = "INGAME_ROOT";
public readonly string Widget = "INGAME_ROOT";
public readonly string ObserverWidget = "";
public object Create(ActorInitializer init) { return new OpenWidgetAtGameStart(this); }
}
@@ -29,9 +30,10 @@ namespace OpenRA.Mods.RA
public void WorldLoaded(World world)
{
// Todo: custom observer ui?
if (world.LocalPlayer != null)
world.OpenWindow(Info.Widget);
world.OpenWindow(Info.Widget);
else if (Info.ObserverWidget != null)
world.OpenWindow(Info.ObserverWidget);
}
}
}