Fix: Some platforms not using the same RNG for every roll (#1103)

* Test changes

* Update ObjectIDManager.h

* Revert "Update ObjectIDManager.h"

This reverts commit 3e4d169718.

* Revert "Test changes"

This reverts commit 8e16573f93.

* Use random engine
This commit is contained in:
David Markowitz 2023-05-26 21:22:31 -07:00 committed by GitHub
parent 238751f14e
commit e47169fec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,5 @@
#include "ObjectIDManager.h" #include "ObjectIDManager.h"
// Std
#include <random>
// Custom Classes // Custom Classes
#include "MasterPackets.h" #include "MasterPackets.h"
#include "Database.h" #include "Database.h"
@ -48,11 +45,7 @@ void ObjectIDManager::HandleRequestPersistentIDResponse(uint64_t requestID, uint
//! Handles cases where we have to get a unique object ID synchronously //! Handles cases where we have to get a unique object ID synchronously
uint32_t ObjectIDManager::GenerateRandomObjectID() { uint32_t ObjectIDManager::GenerateRandomObjectID() {
std::random_device rd; return uni(Game::randomEngine);
std::mt19937 rng(rd());
return uni(rng);
} }