ソースを参照

Fix stack reactivation leading to broken spellcasting

Ivan Savenko 2 年 前
コミット
15b588b164

+ 2 - 1
client/battle/CBattleInterface.cpp

@@ -181,6 +181,7 @@ CBattleInterface::CBattleInterface(const CCreatureSet *army1, const CCreatureSet
 		{
 			CCS->musich->playMusicFromSet("battle", true, true);
 			battleActionsStarted = true;
+			activateStack();
 			controlPanel->blockUI(settings["session"]["spectate"].Bool());
 			battleIntroSoundChannel = -1;
 		}
@@ -944,7 +945,7 @@ void CBattleInterface::show(SDL_Surface *to)
 
 	//activation of next stack, if any
 	//TODO: should be moved to the very start of this method?
-	activateStack();
+	//activateStack();
 }
 
 void CBattleInterface::showBattlefieldObjects(std::shared_ptr<CCanvas> canvas, const BattleHex & location )

+ 1 - 1
client/battle/CBattleStacksController.cpp

@@ -390,7 +390,7 @@ void CBattleStacksController::stackActivated(const CStack *stack) //TODO: check
 	stackToActivate = stack;
 	owner->waitForAnims();
 	if (stackToActivate) //during waiting stack may have gotten activated through show
-		activateStack();
+		owner->activateStack();
 }
 
 void CBattleStacksController::stackRemoved(uint32_t stackID)