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

GameState now uses random generator from server. Blocked access to rmg

on client
This commit is contained in:
Ivan Savenko
2024-06-01 16:09:14 +00:00
parent 63bcf7d83c
commit 0d66ddbeec
10 changed files with 36 additions and 13 deletions

View File

@ -556,6 +556,13 @@ void CClient::invalidatePaths()
pathCache.clear();
}
vstd::RNG & CClient::getRandomGenerator()
{
// Client should use CRandomGenerator::getDefault() for UI logic
// Gamestate should never call this method on client!
throw std::runtime_error("Illegal access to random number generator from client code!");
}
std::shared_ptr<const CPathsInfo> CClient::getPathsInfo(const CGHeroInstance * h)
{
assert(h);