mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-12-23 16:32:49 +00:00
fix replay black screen and replays exiting in the wrong menus
This commit is contained in:
parent
c3cbc30b29
commit
e7c86cc05e
3 changed files with 10 additions and 12 deletions
|
|
@ -355,6 +355,13 @@ class MarbleGame {
|
|||
paused = false;
|
||||
if (watching) {
|
||||
canvas.setContent(Type.createInstance(replayExitGui, []));
|
||||
|
||||
setPreviewMission(lastMis, () -> {
|
||||
#if js
|
||||
var pointercontainer = js.Browser.document.querySelector("#pointercontainer");
|
||||
pointercontainer.hidden = false;
|
||||
#end
|
||||
});
|
||||
} else {
|
||||
if (Net.isMP) {
|
||||
if (weDisconnecting) {
|
||||
|
|
|
|||
|
|
@ -1546,18 +1546,7 @@ class MarbleWorld extends Scheduler {
|
|||
}
|
||||
this.setCursorLock(false);
|
||||
var misFile = haxe.io.Path.withoutExtension(haxe.io.Path.withoutDirectory(mission.path));
|
||||
this.dispose();
|
||||
MarbleGame.instance.setPreviewMission(misFile, () -> {
|
||||
#if !js
|
||||
MarbleGame.canvas.setContent(new ReplayCenterGui());
|
||||
#end
|
||||
#if js
|
||||
MarbleGame.canvas.setContent(new MainMenuGui());
|
||||
var pointercontainer = js.Browser.document.querySelector("#pointercontainer");
|
||||
pointercontainer.hidden = false;
|
||||
#end
|
||||
});
|
||||
|
||||
MarbleGame.instance.quitMission();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,6 +134,8 @@ class PreviewWorld extends Scheduler {
|
|||
_loadToken++;
|
||||
var groupName = (misname + "group").toLowerCase();
|
||||
var group = levelGroups.get(groupName);
|
||||
if (group == null)
|
||||
group = levelGroups.get("urban"); // Use this as fallback
|
||||
if (group != null) {
|
||||
destroyAllObjects();
|
||||
this.currentMission = misname;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue