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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user