r1685 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jun 28 04:40:53 EDT 2006
Author: div0
Date: 2006-06-28 04:40:53 -0400 (Wed, 28 Jun 2006)
New Revision: 1685
Modified:
trunk/data/qcsrc/server/cl_client.qc
Log:
client does not need maps/%s.cfg any more, it's now stuffed (for cd tracks in downloaded maps to work)
still - can anyone check if that feature is used for anything else than CD tracks?
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2006-06-27 20:24:44 UTC (rev 1684)
+++ trunk/data/qcsrc/server/cl_client.qc 2006-06-28 08:40:53 UTC (rev 1685)
@@ -659,6 +659,9 @@
//void dom_player_join_team(entity pl);
void ClientConnect (void)
{
+ local float fh;
+ local string s;
+
self.classname = "player_joining";
self.flags = self.flags | FL_CLIENT;
@@ -681,7 +684,6 @@
self.playerid = (playerid_last = playerid_last + 1);
if(cvar("sv_eventlog"))
{
- string s;
if(clienttype(self) == CLIENTTYPE_REAL)
s = "player";
else
@@ -708,7 +710,19 @@
self.welcomemessage_time = time + cvar("welcome_message_time");
self.welcomemessage_time2 = 0;
- stuffcmd(self, strcat("exec maps/", mapname, ".cfg\n"));
+ //stuffcmd(self, strcat("exec maps/", mapname, ".cfg\n"));
+ // the client might not have that file yet!
+ fh = fopen(strcat("maps/", mapname, ".cfg"), FILE_READ);
+ if(fh >= 0)
+ {
+ while((s = fgets(fh)))
+ stuffcmd(self, strcat(s, "\n"));
+ fclose(fh);
+ }
+ // TODO: is this being used for anything else than cd tracks?
+ // Remember: SVC_CDTRACK exists. Maybe it should be used.
+
+
// send prediction settings to the client
stuffcmd(self, strcat("cl_movement_accelerate ", ftos(cvar("sv_accelerate")), "\n"));
stuffcmd(self, strcat("cl_movement_friction ", ftos(cvar("sv_friction")), "\n"));
More information about the nexuiz-commits
mailing list