Преглед изворни кода

Fixed #868 - wrong battlefield in ship-to-ship combat

DjWarmonger пре 11 година
родитељ
комит
e2d44f6ac6
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      lib/CGameState.cpp

+ 2 - 0
lib/CGameState.cpp

@@ -764,6 +764,8 @@ BattleInfo * CGameState::setupBattle(int3 tile, const CArmedInstance *armies[2],
         terrain = ETerrainType::SAND;
 
 	BFieldType terType = battleGetBattlefieldType(tile);
+	if (heroes[0] && heroes[0]->boat && heroes[1] && heroes[1]->boat)
+		terType = BFieldType::SHIP_TO_SHIP;
 	return BattleInfo::setupBattle(tile, terrain, terType, armies, heroes, creatureBank, town);
 }