mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Replaced most of usages of CRandomGenerator with vstd::RNG in library
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "../media/IMusicPlayer.h"
|
||||
#include "../media/ISoundPlayer.h"
|
||||
|
||||
#include "../../lib/CRandomGenerator.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
#include "../../lib/mapObjects/CArmedInstance.h"
|
||||
#include "../../lib/mapObjects/CGHeroInstance.h"
|
||||
@@ -136,8 +137,12 @@ std::vector<AudioPath> MapAudioPlayer::getAmbientSounds(const int3 & tile)
|
||||
if (!object)
|
||||
logGlobal->warn("Already removed object %d found on tile! (%d %d %d)", objectID.getNum(), tile.x, tile.y, tile.z);
|
||||
|
||||
if(object && object->getAmbientSound())
|
||||
result.push_back(object->getAmbientSound().value());
|
||||
if(object)
|
||||
{
|
||||
auto ambientSound = object->getAmbientSound(CRandomGenerator::getDefault());
|
||||
if (ambientSound)
|
||||
result.push_back(ambientSound.value());
|
||||
}
|
||||
}
|
||||
|
||||
if(CGI->mh->getMap()->isCoastalTile(tile))
|
||||
|
||||
Reference in New Issue
Block a user