From 8f10e3ac814f33e2ce4785575a89c411261437aa Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 9 Apr 2010 23:51:02 +1200 Subject: [PATCH] Fix double-load bug --- OpenRA.Game/Game.cs | 2 -- OpenRA.Mods.RA/DefaultShellmapScript.cs | 13 ++----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index a239dae2f1..fcf4b6caf7 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -136,8 +136,6 @@ namespace OpenRA LoadModPackages(manifest); Timer.Time( "load assemblies, packages: {0}" ); Game.packageChangePending = false; - - LoadMap(manifest.ShellmapUid); } public static void ChangeMap(string mapName) diff --git a/OpenRA.Mods.RA/DefaultShellmapScript.cs b/OpenRA.Mods.RA/DefaultShellmapScript.cs index 040144efe8..aeea999973 100644 --- a/OpenRA.Mods.RA/DefaultShellmapScript.cs +++ b/OpenRA.Mods.RA/DefaultShellmapScript.cs @@ -29,21 +29,12 @@ namespace OpenRA.Mods.RA public object Create(Actor self) { return new DefaultShellmapScript(); } } - class DefaultShellmapScript : ITick, ILoadWorldHook + class DefaultShellmapScript: ILoadWorldHook { public void WorldLoaded(World w) { - // Set the viewport location Game.MoveViewport(new int2(85,65)); - } - - // Rude hack around the multiple-creation bug: - // wait long enough for the transient copies to die before starting - int initialDelay = 20; - public void Tick(Actor self) - { - if (initialDelay > 0 && --initialDelay == 0) - Sound.PlayMusic("hell226m.aud"); + Sound.PlayMusic("hell226m.aud"); } } }