okay, guaranteed no collisions on realip challenges.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2983 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-05-26 21:58:26 +00:00
parent 4afc4aa4e6
commit 0479526cfe

View file

@ -1677,7 +1677,6 @@ client_t *SVC_DirectConnect(void)
newcl->userid = nextuserid;
newcl->fteprotocolextensions = protextsupported;
newcl->protocol = protocol;
newcl->realip_ping = rand();
if (sv.msgfromdemo)
newcl->wasrecorded = true;
@ -1941,6 +1940,8 @@ client_t *SVC_DirectConnect(void)
// spectator mode can ONLY be set at join time
newcl->spectator = spectator;
newcl->realip_ping = (((rand()^(rand()<<8) ^ *(int*)&realtime)&0xffffff)<<8) | (newcl-svs.clients);
// parse some info from the info strings
SV_ExtractFromUserinfo (newcl);
SV_GenerateBasicUserInfo (newcl);