mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 15:41:24 +02:00
- bugfix for network session id randomizing
This commit is contained in:
@@ -364,7 +364,7 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
||||
if(socket != NULL) {
|
||||
//RandomGen random;
|
||||
//sessionKey = random.randRange(-100000, 100000);
|
||||
srand(time(NULL));
|
||||
srand(time(NULL) / (this->playerIndex + 1));
|
||||
sessionKey = rand() % 1000000;
|
||||
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] accepted new client connection, serverInterface->getOpenSlotCount() = %d, sessionKey = %d\n",__FILE__,__FUNCTION__,__LINE__,serverInterface->getOpenSlotCount(),sessionKey);
|
||||
|
Reference in New Issue
Block a user