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

View File

@@ -1,8 +1,5 @@
#include "ObjectIDManager.h"
// Std
#include <random>
// Custom Classes
#include "MasterPackets.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
uint32_t ObjectIDManager::GenerateRandomObjectID() {
std::random_device rd;
std::mt19937 rng(rd());
return uni(rng);
return uni(Game::randomEngine);
}