1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-13 23:57:41 +02:00

* CThreadHelper.cpp now belongs to VCMI_lib project

* fixed console on Windows (restored old code)
 * GeniusAI won't get blocked when it has a hero with tactics in battle
 * fixed an issue with switching turns in hot-seat mode when there is Cover of Darkness active
 * suppressed bonus system console output: it goes only to the logfile
 * [win32] setting thread names (debug purposes)
 * minor fixes
This commit is contained in:
Michał W. Urbańczyk
2011-02-24 13:57:47 +00:00
parent 0482195489
commit 1afcaf2817
15 changed files with 98 additions and 18 deletions

View File

@@ -3376,10 +3376,13 @@ void CBattleInterface::startAction(const BattleAction* action)
if(active)
{
tacticsMode = false;
btactEnd->deactivate();
btactNext->deactivate();
bConsoleDown->activate();
bConsoleUp->activate();
if(btactEnd && btactNext) //if the other side had tactics, there are no buttons
{
btactEnd->deactivate();
btactNext->deactivate();
bConsoleDown->activate();
bConsoleUp->activate();
}
}
redraw();
@@ -3473,9 +3476,15 @@ void CBattleInterface::bEndTacticPhase()
curInt->cb->battleMakeTacticAction(&endt);
}
static bool immobile(const CStack *s)
{
return !s->Speed();
}
void CBattleInterface::bTacticNextStack()
{
TStacks stacksOfMine = curInt->cb->battleGetStacks(IBattleCallback::ONLY_MINE);
stacksOfMine.erase(std::remove_if(stacksOfMine.begin(), stacksOfMine.end(), &immobile));
TStacks::iterator it = vstd::find(stacksOfMine, activeStack);
if(it != stacksOfMine.end() && ++it != stacksOfMine.end())
stackActivated(*it);