1
0

Fix random_engine seed cast (#5212)

This commit is contained in:
12xx12 2021-04-27 14:56:12 +02:00 committed by GitHub
parent cc6b70ee49
commit 903768489d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ void cEnderDragonFightStructuresGen::Init(const AString & a_TowerProperties, int
// A random angle in radian // A random angle in radian
double Angle = m_Noise.IntNoise1D(m_Noise.GetSeed()) * M_PI + M_PI; double Angle = m_Noise.IntNoise1D(m_Noise.GetSeed()) * M_PI + M_PI;
// Shuffles the order of the towers // Shuffles the order of the towers
std::shuffle(TowerProperties.begin(), TowerProperties.end(), std::default_random_engine(static_cast<size_t>(m_Noise.GetSeed()))); std::shuffle(TowerProperties.begin(), TowerProperties.end(), std::default_random_engine(static_cast<std::default_random_engine::result_type>(m_Noise.GetSeed())));
// Generate Positions in a circle // Generate Positions in a circle
for (size_t I = 0; I < TowerProperties.size(); I++) for (size_t I = 0; I < TowerProperties.size(); I++)
{ {