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;
|
||||
haxe.Timer.delay(() -> {
|
||||
if (failed) {
|
||||
var loadGui:MultiplayerLoadingGui = cast MarbleGame.canvas.content;
|
||||
if (loadGui != null) {
|
||||
loadGui.setErrorStatus("Failed to connect to server");
|
||||
Net.disconnect();
|
||||
if (MarbleGame.canvas.content is MultiplayerLoadingGui) {
|
||||
var loadGui:MultiplayerLoadingGui = cast MarbleGame.canvas.content;
|
||||
if (loadGui != null) {
|
||||
loadGui.setErrorStatus("Failed to connect to server");
|
||||
}
|
||||
}
|
||||
Net.disconnect();
|
||||
}
|
||||
}, 15000);
|
||||
Net.joinServer(inviteCodeInput.text.text, true, () -> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue