From dfad408cb8a13df142a67e77af70bf9365d9b0e1 Mon Sep 17 00:00:00 2001 From: div0 Date: Wed, 9 Apr 2008 17:23:54 +0000 Subject: [PATCH] small cleanup of the stuffs; reload effectinfo on clients git-svn-id: svn://svn.icculus.org/nexuiz/trunk@3577 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/cl_client.qc | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index c62d88aae..9a8e16477 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -799,9 +799,11 @@ void DoTeamChange(float destteam) void FixClientCvars(entity e) { - float t; // send prediction settings to the client stuffcmd(e, "\nin_bindmap 0 0\n"); + /* + * we no longer need to stuff this. Remove this comment block if you feel + * 2.3 and higher (or was it 2.2.3?) don't need these any more stuffcmd(e, strcat("cl_gravity ", ftos(cvar("sv_gravity")), "\n")); stuffcmd(e, strcat("cl_movement_accelerate ", ftos(cvar("sv_accelerate")), "\n")); stuffcmd(e, strcat("cl_movement_friction ", ftos(cvar("sv_friction")), "\n")); @@ -815,16 +817,7 @@ void FixClientCvars(entity e) stuffcmd(e, strcat("set cl_movement_airaccel_qw ", ftos(cvar("sv_airaccel_qw")), "\n")); stuffcmd(e, strcat("set cl_movement_airaccel_sideways_friction ", ftos(cvar("sv_airaccel_sideways_friction")), "\n")); stuffcmd(e, "cl_movement_edgefriction 1\n"); - - // notify about available teams - if(teamplay) - { - CheckAllowedTeams(e); - t = 0; if(c1 >= 0) t |= 1; if(c2 >= 0) t |= 2; if(c3 >= 0) t |= 4; if(c4 >= 0) t |= 8; - stuffcmd(e, strcat("set _teams_available ", ftos(t), "\n")); - } - else - stuffcmd(e, "set _teams_available 0\n"); + */ } /* @@ -904,6 +897,8 @@ void ClientConnect (void) stuffcmd(self, strcat("exec maps/", mapname, ".cfg\n")); // TODO: is this being used for anything else than cd tracks? // Remember: SVC_CDTRACK exists. Maybe it should be used. + // + stuffcmd(self, "cl_particles_reloadeffects\n"); FixClientCvars(self); @@ -914,7 +909,7 @@ void ClientConnect (void) SetGrappleHookBindings(); // get autoswitch state from player when he toggles it - stuffcmd(self, "alias autoswitch \"set cl_autoswitch $1 ; cmd autoswitch $1\"\n"); + stuffcmd(self, "alias autoswitch \"set cl_autoswitch $1 ; cmd autoswitch $1\"\n"); // default.cfg-ed in 2.4.1 // get version info from player stuffcmd(self, "cmd clientversion $gameversion\n"); @@ -942,6 +937,16 @@ void ClientConnect (void) else stuffcmd(self, "set teamplay 0\n"); + // notify about available teams + if(teamplay) + { + CheckAllowedTeams(self); + t = 0; if(c1 >= 0) t |= 1; if(c2 >= 0) t |= 2; if(c3 >= 0) t |= 4; if(c4 >= 0) t |= 8; + stuffcmd(self, strcat("set _teams_available ", ftos(t), "\n")); + } + else + stuffcmd(self, "set _teams_available 0\n"); + stuffcmd(self, strcat("set gametype ", ftos(game), "\n")); if(g_lms) -- 2.39.2