Browse Source

few tweaks

AlexVinS 10 years ago
parent
commit
9482852020
2 changed files with 4 additions and 4 deletions
  1. 3 3
      client/battle/CBattleInterface.cpp
  2. 1 1
      client/battle/CBattleInterface.h

+ 3 - 3
client/battle/CBattleInterface.cpp

@@ -1712,8 +1712,8 @@ void CBattleInterface::endCastingSpell()
 {
 	assert(spellDestSelectMode);
 
-	delete spellToCast;
-	spellToCast = nullptr;
+	vstd::clear_pointer(spellToCast);
+
 	sp = nullptr;
 	spellDestSelectMode = false;
 	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
 		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();
 	else //no legal action possible
 	{

+ 1 - 1
client/battle/CBattleInterface.h

@@ -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
 	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 spellDestSelectMode; //if true, player is choosing destination for his spell - only for GUI / console
 	PossibleActions spellSelMode;