mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-24 14:37:25 +00:00
Fix: Some platforms not using the same RNG for every roll (#1103)
* Test changes * Update ObjectIDManager.h * Revert "Update ObjectIDManager.h" This reverts commit3e4d169718
. * Revert "Test changes" This reverts commit8e16573f93
. * Use random engine
This commit is contained in:
parent
238751f14e
commit
e47169fec5
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user