diff --git a/build.gradle b/build.gradle index a6ad50ead..7851fe7dc 100644 --- a/build.gradle +++ b/build.gradle @@ -64,8 +64,8 @@ allprojects { } if (branch == 'master') { - if (indexOfSeparator > -1) { - throw new RuntimeException("Can't build snapshot in master branch.") + if (indexOfSeparator > (-1)) { + throw new RuntimeException("Can't build snapshot in master branch: " + gitVersion) } } else { mainVersion += '-SNAPSHOT' diff --git a/illaclient/src/main/java/illarion/client/gui/controller/LoginScreenController.java b/illaclient/src/main/java/illarion/client/gui/controller/LoginScreenController.java index 8bbe71976..d019a1790 100644 --- a/illaclient/src/main/java/illarion/client/gui/controller/LoginScreenController.java +++ b/illaclient/src/main/java/illarion/client/gui/controller/LoginScreenController.java @@ -173,9 +173,8 @@ public void onStartScreen() { Music illarionTheme = SongFactory.getInstance().getSong(2, engine.getAssets().getSoundsManager()); audioPlayer.setLastMusic(illarionTheme); if (IllaClient.getCfg().getBoolean("musicOn")) { - if (illarionTheme != null) { + if (illarionTheme != null) { // may be null in case OpenAL is not working if (!audioPlayer.isCurrentMusic(illarionTheme)) { - // may be null in case OpenAL is not working audioPlayer.playMusic(illarionTheme); } } @@ -260,7 +259,6 @@ public void onLoginButtonClicked(String topic, ButtonClickedEvent event) { * This function triggers the login process. It will request the character list of the player from the server. */ private void login() { - nifty.showPopup(screen, popupReceiveChars.getId(), null); Login login = Login.getInstance(); login.setLoginData(nameTxt.getRealText(), passwordTxt.getRealText()); @@ -273,11 +271,14 @@ private void login() { login.storeData(savePassword.isChecked()); if (login.isCharacterListRequired()) { + String receiveCharsPopupId = popupReceiveChars.getId(); + + nifty.showPopup(screen, receiveCharsPopupId, null); + login.requestCharacterList(errorCode -> { lastErrorCode = errorCode; receivedLoginResponse = true; - - nifty.closePopup(popupReceiveChars.getId()); + nifty.closePopup(receiveCharsPopupId); }); } else { engine.getSounds().stopMusic(15); diff --git a/illaclient/src/main/java/illarion/client/resources/SongFactory.java b/illaclient/src/main/java/illarion/client/resources/SongFactory.java index c6ab60026..41809f388 100644 --- a/illaclient/src/main/java/illarion/client/resources/SongFactory.java +++ b/illaclient/src/main/java/illarion/client/resources/SongFactory.java @@ -136,7 +136,7 @@ public void storeResource(@Nonnull IdWrapper resource) { int clipID = resource.getId(); String music = resource.getObject(); - songsBuilder.put(clipID, music); + songsBuilder.put(clipID, SONG_DIR + music); } /** diff --git a/illaclient/src/main/java/illarion/client/world/movement/MoveAnimator.java b/illaclient/src/main/java/illarion/client/world/movement/MoveAnimator.java index 9cbb14479..51d2c1149 100644 --- a/illaclient/src/main/java/illarion/client/world/movement/MoveAnimator.java +++ b/illaclient/src/main/java/illarion/client/world/movement/MoveAnimator.java @@ -95,14 +95,30 @@ private void scheduleTask(@Nonnull MoveAnimatorTask task) { void scheduleEarlyMove(@Nonnull CharMovementMode mode, @Nonnull ServerCoordinate target, int duration) { if (uncomfirmedMoveTask != null) { - log.warn(marker, "Scheduling another early move is not possible as there is already one set."); + log.warn(marker, + "Scheduling another early move is not possible as there is already one set. Scheduled Move: {}, NewTarget: {}. Try repairing by canceling all pending moves.", + uncomfirmedMoveTask, + target); + + boolean hasRequestedTurn = lastRequestedTurn != null; + + int lastTurnId = 0; + if (hasRequestedTurn) { + lastTurnId = lastRequestedTurn.getServerId(); + } + + cancelAll(); + + if (hasRequestedTurn) { + scheduleTurn(Direction.fromServerId(lastTurnId)); + } } else { - log.debug(marker, "Scheduling a early move. Mode: {}, Target: {}, Duration: {}ms", mode, - target, duration); - MovingTask task = new MovingTask(this, mode, target, duration); - uncomfirmedMoveTask = task; - scheduleTask(task); + log.debug(marker, "Scheduling an early move. Mode: {}, Target: {}, Duration: {}ms", mode, target, duration); } + + MovingTask task = new MovingTask(this, mode, target, duration); + uncomfirmedMoveTask = task; + scheduleTask(task); } /** diff --git a/illaclient/src/main/resources/illarion/client/gui/xml/login.xml b/illaclient/src/main/resources/illarion/client/gui/xml/login.xml index 3d81a0324..653b8e303 100644 --- a/illaclient/src/main/resources/illarion/client/gui/xml/login.xml +++ b/illaclient/src/main/resources/illarion/client/gui/xml/login.xml @@ -20,8 +20,8 @@ - - + + - - + + diff --git a/illaclient/src/main/resources/logback.xml b/illaclient/src/main/resources/logback.xml index 968fbd45b..47f040fbc 100644 --- a/illaclient/src/main/resources/logback.xml +++ b/illaclient/src/main/resources/logback.xml @@ -19,7 +19,6 @@ %-5p - %d{ISO8601} - [%t]: %m%n - diff --git a/versions.gradle b/versions.gradle index 4ce1a48ee..3c90dd44a 100644 --- a/versions.gradle +++ b/versions.gradle @@ -17,7 +17,7 @@ ext { slf4jVersion = '1.7.25' logbackVersion = '1.2.2' janinoVersion = '3.0.7' - illarionResourcesVersion = '2.1.25.13-SNAPSHOT' + illarionResourcesVersion = '2.1.26-SNAPSHOT' niftyGuiVersion = '1.4.2' insubstantialVersion = '7.3' }