mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	More formatting
This commit is contained in:
		| @@ -265,29 +265,37 @@ std::vector<BattleHex> CStack::meleeAttackHexes(const battle::Unit * attacker, c | ||||
| 	BattleHex otherAttackerPos = attackerPos + (attacker->unitSide() == BattleSide::ATTACKER ? -1 : 1); | ||||
| 	BattleHex otherDefenderPos = defenderPos + (defender->unitSide() == BattleSide::ATTACKER ? -1 : 1); | ||||
|  | ||||
| 	if(BattleHex::mutualPosition(attackerPos, defenderPos) >= 0) { //front <=> front | ||||
| 		if((mask & 1) == 0) { | ||||
| 	if(BattleHex::mutualPosition(attackerPos, defenderPos) >= 0) //front <=> front | ||||
| 	{ | ||||
| 		if((mask & 1) == 0) | ||||
| 		{ | ||||
| 			mask |= 1; | ||||
| 			res.push_back(defenderPos); | ||||
| 		} | ||||
| 	} | ||||
| 	if (attacker->doubleWide() //back <=> front | ||||
| 		&& BattleHex::mutualPosition(otherAttackerPos, defenderPos) >= 0) { | ||||
| 		if((mask & 1) == 0) { | ||||
| 		&& BattleHex::mutualPosition(otherAttackerPos, defenderPos) >= 0) | ||||
| 	{ | ||||
| 		if((mask & 1) == 0) | ||||
| 		{ | ||||
| 			mask |= 1; | ||||
| 			res.push_back(defenderPos); | ||||
| 		} | ||||
| 	} | ||||
| 	if (defender->doubleWide()//front <=> back | ||||
| 		&& BattleHex::mutualPosition(attackerPos, otherDefenderPos) >= 0) { | ||||
| 		if((mask & 2) == 0) { | ||||
| 		&& BattleHex::mutualPosition(attackerPos, otherDefenderPos) >= 0) | ||||
| 	{ | ||||
| 		if((mask & 2) == 0) | ||||
| 		{ | ||||
| 			mask |= 2; | ||||
| 			res.push_back(otherDefenderPos); | ||||
| 		} | ||||
| 	} | ||||
| 	if (defender->doubleWide() && attacker->doubleWide()//back <=> back | ||||
| 		&& BattleHex::mutualPosition(otherAttackerPos, otherDefenderPos) >= 0) { | ||||
| 		if((mask & 2) == 0) { | ||||
| 		&& BattleHex::mutualPosition(otherAttackerPos, otherDefenderPos) >= 0) | ||||
| 	{ | ||||
| 		if((mask & 2) == 0) | ||||
| 		{ | ||||
| 			mask |= 2; | ||||
| 			res.push_back(otherDefenderPos); | ||||
| 		} | ||||
|   | ||||
| @@ -403,6 +403,7 @@ void CLogFileTarget::write(const LogRecord & record) | ||||
| const CLogFormatter & CLogFileTarget::getFormatter() const { return formatter; } | ||||
| void CLogFileTarget::setFormatter(const CLogFormatter & formatter) { this->formatter = formatter; } | ||||
|  | ||||
| CLogFileTarget::~CLogFileTarget() { | ||||
| CLogFileTarget::~CLogFileTarget() | ||||
| { | ||||
| 	file.close(); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user