r1744 - branches/nexuiz-2.0/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Jul 9 11:30:30 EDT 2006
Author: div0
Date: 2006-07-09 11:30:30 -0400 (Sun, 09 Jul 2006)
New Revision: 1744
Modified:
branches/nexuiz-2.0/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)
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc 2006-07-09 15:27:03 UTC (rev 1743)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc 2006-07-09 15:30:30 UTC (rev 1744)
@@ -661,6 +661,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;
@@ -683,7 +686,6 @@
self.playerid = (playerid_last = playerid_last + 1);
if(cvar("sv_eventlog"))
{
- string s;
if(clienttype(self) == CLIENTTYPE_REAL)
s = "player";
else
@@ -710,7 +712,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