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

CGHeroInstance::initArmy: don't use GS RNG. Get RNG through a ref

This function used by both server-side and gamestate so it's must use appropriate random source.
This commit is contained in:
Arseniy Shestakov
2016-08-23 08:13:52 +03:00
parent 2ba3b20928
commit 85f49bc968
3 changed files with 6 additions and 6 deletions

View File

@ -1518,7 +1518,7 @@ void CGameHandler::newTurn()
if(CGHeroInstance *h = gs->hpool.pickHeroFor(j == 0, elem.first, getNativeTown(elem.first), pool, getRandomGenerator(), banned))
{
sah.hid[j] = h->subID;
h->initArmy(&sah.army[j]);
h->initArmy(getRandomGenerator(), &sah.army[j]);
banned = h->type->heroClass;
}
else