Explorar o código

Fixed in r1364. It's all about logic!

DjWarmonger %!s(int64=12) %!d(string=hai) anos
pai
achega
6057226665
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/CGameHandler.cpp

+ 1 - 1
server/CGameHandler.cpp

@@ -4623,7 +4623,7 @@ void CGameHandler::handleDamageFromObstacle(const CObstacleInstance &obstacle, c
 
 
 	//helper info
 	//helper info
 	const SpellCreatedObstacle *spellObstacle = dynamic_cast<const SpellCreatedObstacle*>(&obstacle); //not nice but we may need spell params
 	const SpellCreatedObstacle *spellObstacle = dynamic_cast<const SpellCreatedObstacle*>(&obstacle); //not nice but we may need spell params
-	const ui8 side = curStack->attackerOwned; //if enemy is defending (false = 0), side of our hero is also 0 (attacker)
+	const ui8 side = !curStack->attackerOwned; //if enemy is defending (false = 0), side of enemy hero is 1 (true)
 	const CGHeroInstance *hero = gs->curB->battleGetFightingHero(side);
 	const CGHeroInstance *hero = gs->curB->battleGetFightingHero(side);
 
 
 	if(obstacle.obstacleType == CObstacleInstance::MOAT)
 	if(obstacle.obstacleType == CObstacleInstance::MOAT)