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;
|
paused = false;
|
||||||
if (watching) {
|
if (watching) {
|
||||||
canvas.setContent(Type.createInstance(replayExitGui, []));
|
canvas.setContent(Type.createInstance(replayExitGui, []));
|
||||||
|
|
||||||
|
setPreviewMission(lastMis, () -> {
|
||||||
|
#if js
|
||||||
|
var pointercontainer = js.Browser.document.querySelector("#pointercontainer");
|
||||||
|
pointercontainer.hidden = false;
|
||||||
|
#end
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
if (Net.isMP) {
|
if (Net.isMP) {
|
||||||
if (weDisconnecting) {
|
if (weDisconnecting) {
|
||||||
|
|
|
||||||
|
|
@ -1546,18 +1546,7 @@ class MarbleWorld extends Scheduler {
|
||||||
}
|
}
|
||||||
this.setCursorLock(false);
|
this.setCursorLock(false);
|
||||||
var misFile = haxe.io.Path.withoutExtension(haxe.io.Path.withoutDirectory(mission.path));
|
var misFile = haxe.io.Path.withoutExtension(haxe.io.Path.withoutDirectory(mission.path));
|
||||||
this.dispose();
|
MarbleGame.instance.quitMission();
|
||||||
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
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,8 @@ class PreviewWorld extends Scheduler {
|
||||||
_loadToken++;
|
_loadToken++;
|
||||||
var groupName = (misname + "group").toLowerCase();
|
var groupName = (misname + "group").toLowerCase();
|
||||||
var group = levelGroups.get(groupName);
|
var group = levelGroups.get(groupName);
|
||||||
|
if (group == null)
|
||||||
|
group = levelGroups.get("urban"); // Use this as fallback
|
||||||
if (group != null) {
|
if (group != null) {
|
||||||
destroyAllObjects();
|
destroyAllObjects();
|
||||||
this.currentMission = misname;
|
this.currentMission = misname;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue