Преглед изворни кода

Merge pull request #4497 from IvanSavenko/beta_fix

Add missing changes from master branch to beta
Ivan Savenko пре 1 година
родитељ
комит
f2592c20db

+ 6 - 5
ChangeLog.md

@@ -11,29 +11,30 @@
 
 # 1.5.5 -> 1.5.6
 
-# Stability
+### Stability
 * Fixed possible crash on transferring hero to next campaign scenario if hero has combined artifact some components of which can be transferred
 * Fixed possible crash on transferring hero to next campaign scenario that has creature with faction limiter in his army
 * Fixed possible crash on application shutdown due to incorrect destruction order of UI entities
 
-# Multiplayer
+### Multiplayer
 * Mod compatibility issues when joining a lobby room now use color coding to make them less easy to miss.
 * Incompatible mods are now placed before compatible mods when joining lobby room.
 * Fixed text overflow in online lobby interface
 * Fixed jittering simultaneous turns slider after moving it twice over short period
+* Fixed non-functioning slider in invite to game room dialog
 
-# Interface
+### Interface
 * Fixed some shortcuts that were not active during the enemy's turn, such as Thieves' Guild.
 * Game now correctly uses melee damage calculation when forcing a melee attack with a shooter.
 * Game will now close all open dialogs on start of our turn, to avoid bugs like locked right-click popups
 
-# Map Objects
+### Map Objects
 * Spells the hero can't learn are no longer hidden when received from a rewardable object, such as the Pandora Box
 * Spells that cannot be learned are now displayed with gray text in the name of the spell.
 * Configurable objects with scouted state such as Witch Hut in HotA now correctly show their reward on right click after vising them but refusing to accept reward
 * Right-click tooltip on map dwelling now always shows produced creatures. Player that owns the dwelling can also see number of creatures available for recruit
 
-# Modding
+### Modding
 * Fixed possible crash on invalid SPELL_LIKE_ATTACK bonus
 * Added compatibility check when loading maps with old names for boats
 

+ 1 - 1
client/adventureMap/AdventureMapInterface.cpp

@@ -374,7 +374,7 @@ void AdventureMapInterface::onEnemyTurnStarted(PlayerColor playerID, bool isHuma
 	mapAudio->onEnemyTurnStarted();
 	widget->getMinimap()->setAIRadar(!isHuman);
 	widget->getInfoBar()->startEnemyTurn(playerID);
-	setState(isHuman ? EAdventureState::OTHER_HUMAN_PLAYER_TURN : EAdventureState::AI_PLAYER_TURN);
+	setState(isHuman ? EAdventureState::MAKING_TURN : EAdventureState::AI_PLAYER_TURN);
 }
 
 void AdventureMapInterface::setState(EAdventureState state)

+ 6 - 7
client/adventureMap/AdventureMapShortcuts.cpp

@@ -518,7 +518,7 @@ bool AdventureMapShortcuts::optionCanVisitObject()
 	auto * hero = LOCPLINT->localState->getCurrentHero();
 	auto objects = LOCPLINT->cb->getVisitableObjs(hero->visitablePos());
 
-	assert(vstd::contains(objects,hero));
+	//assert(vstd::contains(objects,hero));
 	return objects.size() > 1; // there is object other than our hero
 }
 
@@ -553,26 +553,25 @@ bool AdventureMapShortcuts::optionSpellcasting()
 
 bool AdventureMapShortcuts::optionInMapView()
 {
-	return state == EAdventureState::MAKING_TURN || state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
+	return state == EAdventureState::MAKING_TURN;
 }
 
 bool AdventureMapShortcuts::optionInWorldView()
 {
-	return state == EAdventureState::WORLD_VIEW || state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
+	return state == EAdventureState::WORLD_VIEW;
 }
 
 bool AdventureMapShortcuts::optionSidePanelActive()
 {
-return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
+return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW;
 }
 
 bool AdventureMapShortcuts::optionMapScrollingActive()
 {
-	return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
+	return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW;
 }
 
 bool AdventureMapShortcuts::optionMapViewActive()
 {
-	return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::CASTING_SPELL
-		|| state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
+	return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::CASTING_SPELL;
 }

+ 0 - 1
client/adventureMap/AdventureState.h

@@ -15,7 +15,6 @@ enum class EAdventureState
 	HOTSEAT_WAIT,
 	MAKING_TURN,
 	AI_PLAYER_TURN,
-	OTHER_HUMAN_PLAYER_TURN,
 	CASTING_SPELL,
 	WORLD_VIEW
 };

+ 1 - 1
client/globalLobby/GlobalLobbyInviteWindow.cpp

@@ -94,7 +94,7 @@ GlobalLobbyInviteWindow::GlobalLobbyInviteWindow()
 	};
 
 	listBackground = std::make_shared<TransparentFilledRectangle>(Rect(8, 48, 220, 324), ColorRGBA(0, 0, 0, 64), ColorRGBA(64, 80, 128, 255), 1);
-	accountList = std::make_shared<CListBox>(createAccountCardCallback, Point(10, 50), Point(0, 40), 8, 0, 0, 1 | 4, Rect(200, 0, 320, 320));
+	accountList = std::make_shared<CListBox>(createAccountCardCallback, Point(10, 50), Point(0, 40), 8, CSH->getGlobalLobby().getActiveAccounts().size(), 0, 1 | 4, Rect(200, 0, 320, 320));
 
 	buttonClose = std::make_shared<CButton>(Point(86, 384), AnimationPath::builtin("MuBchck"), CButton::tooltip(), [this]() { close(); }, EShortcut::GLOBAL_RETURN );