mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix this cast crash
This commit is contained in:
parent
ff13e2e7e4
commit
3c5b3aef07
1 changed files with 6 additions and 4 deletions
|
|
@ -163,11 +163,13 @@ class JoinServerGui extends GuiImage {
|
||||||
var failed = true;
|
var failed = true;
|
||||||
haxe.Timer.delay(() -> {
|
haxe.Timer.delay(() -> {
|
||||||
if (failed) {
|
if (failed) {
|
||||||
var loadGui:MultiplayerLoadingGui = cast MarbleGame.canvas.content;
|
if (MarbleGame.canvas.content is MultiplayerLoadingGui) {
|
||||||
if (loadGui != null) {
|
var loadGui:MultiplayerLoadingGui = cast MarbleGame.canvas.content;
|
||||||
loadGui.setErrorStatus("Failed to connect to server");
|
if (loadGui != null) {
|
||||||
Net.disconnect();
|
loadGui.setErrorStatus("Failed to connect to server");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Net.disconnect();
|
||||||
}
|
}
|
||||||
}, 15000);
|
}, 15000);
|
||||||
Net.joinServer(inviteCodeInput.text.text, true, () -> {
|
Net.joinServer(inviteCodeInput.text.text, true, () -> {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue