mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
Replaced most of usages of CRandomGenerator with vstd::RNG in library
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
|
||||
#include "ConditionalWait.h"
|
||||
#include "../lib/CConfigHandler.h"
|
||||
#include "../lib/CRandomGenerator.h"
|
||||
#include "../lib/pathfinder/CGPathNode.h"
|
||||
#include "../lib/mapObjects/CGHeroInstance.h"
|
||||
#include "../lib/networkPacks/PacksForClient.h"
|
||||
@ -153,8 +154,12 @@ void HeroMovementController::onTryMoveHero(const CGHeroInstance * hero, const Tr
|
||||
|
||||
if(details.result == TryMoveHero::EMBARK || details.result == TryMoveHero::DISEMBARK)
|
||||
{
|
||||
if(hero->getRemovalSound() && hero->tempOwner == LOCPLINT->playerID)
|
||||
CCS->soundh->playSound(hero->getRemovalSound().value());
|
||||
if (hero->tempOwner == LOCPLINT->playerID)
|
||||
{
|
||||
auto removalSound = hero->getRemovalSound(CRandomGenerator::getDefault());
|
||||
if (removalSound)
|
||||
CCS->soundh->playSound(removalSound.value());
|
||||
}
|
||||
}
|
||||
|
||||
bool directlyAttackingCreature =
|
||||
|
Reference in New Issue
Block a user