r3995 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Aug 1 06:14:53 EDT 2008
Author: div0
Date: 2008-08-01 06:14:49 -0400 (Fri, 01 Aug 2008)
New Revision: 3995
Modified:
trunk/data/qcsrc/server/cl_client.qc
Log:
work around broken ClientConnect/ClientDisconnect
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2008-08-01 07:44:26 UTC (rev 3994)
+++ trunk/data/qcsrc/server/cl_client.qc 2008-08-01 10:14:49 UTC (rev 3995)
@@ -984,6 +984,12 @@
local string s;
float wep;
+ if(self.flags & FL_CLIENT)
+ {
+ print("Warning: ClientConnect, but already connected!\n");
+ return;
+ }
+
if(Ban_IsClientBanned(self))
{
s = strcat("^1NOTE:^7 banned client ", self.netaddress, " just tried to enter\n");
@@ -995,6 +1001,7 @@
DecodeLevelParms();
self.classname = "player_joining";
+
self.flags = self.flags | FL_CLIENT;
self.version_nagtime = time + 10 + random() * 10;
@@ -1166,6 +1173,12 @@
{
float save;
+ if not(self.flags & FL_CLIENT)
+ {
+ print("Warning: ClientDisconnect without ClientConnect\n");
+ return;
+ }
+
bot_clientdisconnect();
if(entcs_start)
@@ -1223,10 +1236,7 @@
}
*/
- if(self.flags & FL_CLIENT)
- PlayerScore_Detach(self);
- else
- print("Warning: ClientDisconnect without ClientConnect\n");
+ PlayerScore_Detach(self);
if(self.netname_previous)
strunzone(self.netname_previous);
More information about the nexuiz-commits
mailing list