r3837 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Jul 15 05:38:28 EDT 2008
Author: div0
Date: 2008-07-15 05:38:14 -0400 (Tue, 15 Jul 2008)
New Revision: 3837
Modified:
trunk/data/qcsrc/server/bots.qc
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/g_world.qc
trunk/data/qcsrc/server/vote.qc
Log:
remove some more leaks
Modified: trunk/data/qcsrc/server/bots.qc
===================================================================
--- trunk/data/qcsrc/server/bots.qc 2008-07-15 09:24:41 UTC (rev 3836)
+++ trunk/data/qcsrc/server/bots.qc 2008-07-15 09:38:14 UTC (rev 3837)
@@ -1494,7 +1494,7 @@
if(!cvar("g_campaign"))
self.netname = strzone(strcat(prefix, name, suffix));
else
- self.netname = name;
+ self.netname = strzone(name);
};
void bot_endgame()
@@ -1899,6 +1899,14 @@
void() havocbot_setupbot;
float JoinBestTeam(entity pl, float only_return_best, float forcebestteam);
+void bot_clientdisconnect()
+{
+ if (clienttype(self) != CLIENTTYPE_BOT)
+ return;
+ strunzone(self.netname);
+ self.netname = string_null;
+}
+
void bot_clientconnect()
{
if (clienttype(self) != CLIENTTYPE_BOT)
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2008-07-15 09:24:41 UTC (rev 3836)
+++ trunk/data/qcsrc/server/cl_client.qc 2008-07-15 09:38:14 UTC (rev 3837)
@@ -1170,6 +1170,8 @@
{
float save;
+ bot_clientdisconnect();
+
if(entcs_start)
detach_entcs();
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2008-07-15 09:24:41 UTC (rev 3836)
+++ trunk/data/qcsrc/server/g_world.qc 2008-07-15 09:38:14 UTC (rev 3837)
@@ -725,6 +725,8 @@
error("empty maplist, cannot select a new map");
Map_Current = bound(0, GetMaplistPosition(), Map_Count - 1);
+ if(Map_Current_Name)
+ strunzone(Map_Current_Name);
Map_Current_Name = strzone(argv(Map_Current)); // will be automatically freed on exit thanks to DP
// this may or may not be correct, but who cares, in the worst case a map
// isn't chosen in the first pass that should have been
Modified: trunk/data/qcsrc/server/vote.qc
===================================================================
--- trunk/data/qcsrc/server/vote.qc 2008-07-15 09:24:41 UTC (rev 3836)
+++ trunk/data/qcsrc/server/vote.qc 2008-07-15 09:38:14 UTC (rev 3837)
@@ -405,9 +405,6 @@
++index;
}
- // necessary for some of the string operations
- vote = strzone(vote);
-
return vote;
}
More information about the nexuiz-commits
mailing list