Fix double-load bug
This commit is contained in:
@@ -136,8 +136,6 @@ namespace OpenRA
|
|||||||
LoadModPackages(manifest);
|
LoadModPackages(manifest);
|
||||||
Timer.Time( "load assemblies, packages: {0}" );
|
Timer.Time( "load assemblies, packages: {0}" );
|
||||||
Game.packageChangePending = false;
|
Game.packageChangePending = false;
|
||||||
|
|
||||||
LoadMap(manifest.ShellmapUid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ChangeMap(string mapName)
|
public static void ChangeMap(string mapName)
|
||||||
|
|||||||
@@ -29,20 +29,11 @@ namespace OpenRA.Mods.RA
|
|||||||
public object Create(Actor self) { return new DefaultShellmapScript(); }
|
public object Create(Actor self) { return new DefaultShellmapScript(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class DefaultShellmapScript : ITick, ILoadWorldHook
|
class DefaultShellmapScript: ILoadWorldHook
|
||||||
{
|
{
|
||||||
public void WorldLoaded(World w)
|
public void WorldLoaded(World w)
|
||||||
{
|
{
|
||||||
// Set the viewport location
|
|
||||||
Game.MoveViewport(new int2(85,65));
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user