1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

few tweaks

This commit is contained in:
AlexVinS 2015-03-19 00:10:41 +03:00
parent fb5903d610
commit 9482852020
2 changed files with 4 additions and 4 deletions

View File

@ -1712,8 +1712,8 @@ void CBattleInterface::endCastingSpell()
{ {
assert(spellDestSelectMode); assert(spellDestSelectMode);
delete spellToCast; vstd::clear_pointer(spellToCast);
spellToCast = nullptr;
sp = nullptr; sp = nullptr;
spellDestSelectMode = false; spellDestSelectMode = false;
CCS->curh->changeGraphic(ECursor::COMBAT, ECursor::COMBAT_POINTER); CCS->curh->changeGraphic(ECursor::COMBAT, ECursor::COMBAT_POINTER);
@ -2283,7 +2283,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
if (vstd::contains(localActions, selectedAction)) //try to use last selected action by default if (vstd::contains(localActions, selectedAction)) //try to use last selected action by default
currentAction = selectedAction; currentAction = selectedAction;
else if (localActions.size()) //if not possible, select first available action 9they are sorted by suggested priority) else if (localActions.size()) //if not possible, select first available action (they are sorted by suggested priority)
currentAction = localActions.front(); currentAction = localActions.front();
else //no legal action possible else //no legal action possible
{ {

View File

@ -155,7 +155,7 @@ private:
shared_ptr<CPlayerInterface> tacticianInterface; //used during tactics mode, points to the interface of player with higher tactics (can be either attacker or defender in hot-seat), valid onloy for human players shared_ptr<CPlayerInterface> tacticianInterface; //used during tactics mode, points to the interface of player with higher tactics (can be either attacker or defender in hot-seat), valid onloy for human players
bool tacticsMode; bool tacticsMode;
bool stackCanCastSpell; //if true, active stack could possibly cats some target spell bool stackCanCastSpell; //if true, active stack could possibly cast some target spell
bool creatureCasting; //if true, stack currently aims to cats a spell bool creatureCasting; //if true, stack currently aims to cats a spell
bool spellDestSelectMode; //if true, player is choosing destination for his spell - only for GUI / console bool spellDestSelectMode; //if true, player is choosing destination for his spell - only for GUI / console
PossibleActions spellSelMode; PossibleActions spellSelMode;