1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

CGameState::battleGetBattlefieldType: use RNG by ref

For now I not sure about proper place for battleGetBattlefieldType so I left it in GS
This commit is contained in:
Arseniy Shestakov
2016-09-07 20:00:20 +03:00
parent ea63497b19
commit 70abae9b51
3 changed files with 6 additions and 6 deletions

View File

@ -1868,7 +1868,7 @@ void CGameHandler::setupBattle( int3 tile, const CArmedInstance *armies[2], cons
if(gs->map->isCoastalTile(tile)) //coastal tile is always ground
terrain = ETerrainType::SAND;
BFieldType terType = gs->battleGetBattlefieldType(tile);
BFieldType terType = gs->battleGetBattlefieldType(tile, getRandomGenerator());
if (heroes[0] && heroes[0]->boat && heroes[1] && heroes[1]->boat)
terType = BFieldType::SHIP_TO_SHIP;