more fixes
This commit is contained in:
@@ -142,6 +142,8 @@ namespace OpenRA
|
||||
|
||||
public void Tick(World world)
|
||||
{
|
||||
if (!Game.IsStarted) return;
|
||||
|
||||
TickPaletteAnimation();
|
||||
TickRadarAnimation();
|
||||
|
||||
|
||||
@@ -262,19 +262,21 @@ namespace OpenRA
|
||||
|
||||
public static void IssueOrder(Order o) { orderManager.IssueOrder(o); } /* avoid exposing the OM to mod code */
|
||||
|
||||
public static bool IsStarted { get { return orderManager.GameStarted; } }
|
||||
|
||||
public static void StartGame()
|
||||
{
|
||||
if( Game.orderManager.GameStarted ) return;
|
||||
Game.chat.Reset();
|
||||
if( orderManager.GameStarted ) return;
|
||||
chat.Reset();
|
||||
|
||||
// todo: only spawn a neutral player + a player for each client
|
||||
for (int i = 0; i < 8; i++)
|
||||
world.players[i] = new Player(world, i, LobbyInfo.Clients.FirstOrDefault(a => a.Index == i));
|
||||
|
||||
foreach (var gs in Game.world.WorldActor.traits.WithInterface<IGameStarted>())
|
||||
foreach (var gs in world.WorldActor.traits.WithInterface<IGameStarted>())
|
||||
gs.GameStarted(world);
|
||||
|
||||
Game.viewport.GoToStartLocation( Game.world.LocalPlayer );
|
||||
Game.viewport.GoToStartLocation( world.LocalPlayer );
|
||||
orderManager.StartGame();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
[Settings]
|
||||
NetworkHost=localhost
|
||||
NetworkPort=1234
|
||||
InitialMods=ra
|
||||
InitialMods=ra
|
||||
Width=800
|
||||
Height=600
|
||||
Fullscreen=no
|
||||
Reference in New Issue
Block a user