Fix double-load bug

This commit is contained in:
Paul Chote
2010-04-09 23:51:02 +12:00
committed by Chris Forbes
parent 0047b961b3
commit 8f10e3ac81
2 changed files with 2 additions and 13 deletions

View File

@@ -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)

View File

@@ -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");
}
}
}