1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

CCallbackBase: add CRandomGenerator to all callbacks

This is easiest way to make server RNG available to CBattleInfoCallback.

Now server, client and gamestate have own RNG instance.
Only server and gamestate RNGs are serialized.
This commit is contained in:
Arseniy Shestakov
2016-08-23 11:35:03 +03:00
parent 85f49bc968
commit c8bcb14d34
6 changed files with 13 additions and 12 deletions

View File

@@ -249,11 +249,6 @@ const CGCreature * IGameCallback::putNewMonster(CreatureID creID, int count, int
return dynamic_cast<const CGCreature*>(m);
}
CRandomGenerator & IGameCallback::getRandomGenerator()
{
return rand;
}
bool IGameCallback::isVisitCoveredByAnotherQuery(const CGObjectInstance *obj, const CGHeroInstance *hero)
{
//only server knows