diff --git a/client/CMT.cpp b/client/CMT.cpp index 0a10fb17a..13b31c89f 100644 --- a/client/CMT.cpp +++ b/client/CMT.cpp @@ -178,7 +178,7 @@ int main(int argc, char * argv[]) ("spectate-ignore-hero", "wont follow heroes on adventure map") ("spectate-hero-speed", po::value(), "hero movement speed on adventure map") ("spectate-battle-speed", po::value(), "battle animation speed for spectator") - ("spectate-skip-battle", "skip AI battles in spectator view") + ("spectate-skip-battle", "skip battles in spectator view") ("spectate-skip-battle-result", "skip battle result window") ("onlyAI", "allow to run without human player, all players will be default AI") ("headless", "runs without GUI, implies --onlyAI") diff --git a/client/Client.cpp b/client/Client.cpp index 3e785be38..b75e7d617 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -415,9 +415,7 @@ void CClient::initPlayerEnvironments() { Settings session = settings.write["session"]; session["spectate"].Bool() = true; - session["spectate-skip-battle"].Bool() = true; session["spectate-skip-battle-result"].Bool() = true; - session["spectate-ignore-hero"].Bool() = true; } if(settings["session"]["spectate"].Bool()) @@ -579,7 +577,7 @@ void CClient::battleStarted(const BattleInfo * info) callBattleStart(leftSide.color, 0); callBattleStart(rightSide.color, 1); callBattleStart(PlayerColor::UNFLAGGABLE, 1); - if(settings["session"]["spectate"].Bool()) + if(settings["session"]["spectate"].Bool() && !settings["session"]["spectate-skip-battle"].Bool()) callBattleStart(PlayerColor::SPECTATOR, 1); if(vstd::contains(playerint, leftSide.color) && playerint[leftSide.color]->human) @@ -604,7 +602,7 @@ void CClient::battleStarted(const BattleInfo * info) boost::unique_lock un(*CPlayerInterface::pim); CPlayerInterface::battleInt = std::make_shared(leftSide.armyObject, rightSide.armyObject, leftSide.hero, rightSide.hero, att, def); } - else if(settings["session"]["spectate"].Bool() && !settings["session"]["spectate-skip-battle"].Bool()) + else if(false && settings["session"]["spectate"].Bool() && !settings["session"]["spectate-skip-battle"].Bool()) { //spectator for AI-only battles //TODO: This certainly need improvement diff --git a/client/NetPacksClient.cpp b/client/NetPacksClient.cpp index 5d05b3056..7b39e0f1b 100644 --- a/client/NetPacksClient.cpp +++ b/client/NetPacksClient.cpp @@ -97,7 +97,7 @@ void callBattleInterfaceIfPresentForBothSides(CClient & cl, void (T::*ptr)(Args. { callOnlyThatBattleInterface(cl, cl.gameState()->curB->sides[0].color, ptr, std::forward(args)...); callOnlyThatBattleInterface(cl, cl.gameState()->curB->sides[1].color, ptr, std::forward(args)...); - if(LOCPLINT->battleInt && settings["session"]["spectate"].Bool() && !settings["session"]["spectate-skip-battle"].Bool()) + if(settings["session"]["spectate"].Bool() && !settings["session"]["spectate-skip-battle"].Bool() && LOCPLINT->battleInt) { callOnlyThatBattleInterface(cl, PlayerColor::SPECTATOR, ptr, std::forward(args)...); }