X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=sv_main.c;h=0bebd163e50400fc9e18d756d9d8de048dbcd53f;hb=292da652050c1957bbee941051e358327f44f3b9;hp=bef7c415f43c05e116d12cac9dcc15c01ead7f35;hpb=bc75fd7a5ccfe403cea6d6fb71b7970f7959f661;p=xonotic%2Fdarkplaces.git diff --git a/sv_main.c b/sv_main.c index bef7c415..0bebd163 100644 --- a/sv_main.c +++ b/sv_main.c @@ -47,7 +47,7 @@ extern cvar_t sv_random_seed; static cvar_t sv_cullentities_pvs = {0, "sv_cullentities_pvs", "1", "fast but loose culling of hidden entities"}; // fast but loose static cvar_t sv_cullentities_trace = {0, "sv_cullentities_trace", "0", "somewhat slow but very tight culling of hidden entities, minimizes network traffic and makes wallhack cheats useless"}; // tends to get false negatives, uses a timeout to keep entities visible a short time after becoming hidden static cvar_t sv_cullentities_trace_samples = {0, "sv_cullentities_trace_samples", "1", "number of samples to test for entity culling"}; -static cvar_t sv_cullentities_trace_samples_extra = {0, "sv_cullentities_trace_samples", "2", "number of samples to test for entity culling when the entity affects its surroundings by e.g. dlight"}; +static cvar_t sv_cullentities_trace_samples_extra = {0, "sv_cullentities_trace_samples_extra", "2", "number of samples to test for entity culling when the entity affects its surroundings by e.g. dlight"}; static cvar_t sv_cullentities_trace_enlarge = {0, "sv_cullentities_trace_enlarge", "0", "box enlargement for entity culling"}; static cvar_t sv_cullentities_trace_delay = {0, "sv_cullentities_trace_delay", "1", "number of seconds until the entity gets actually culled"}; static cvar_t sv_cullentities_nevercullbmodels = {0, "sv_cullentities_nevercullbmodels", "0", "if enabled the clients are always notified of moving doors and lifts and other submodels of world (warning: eats a lot of network bandwidth on some levels!)"}; @@ -406,6 +406,15 @@ void SV_SendServerinfo (client_t *client) MSG_WriteString (&client->netconnection->message, "cl_serverextension_download 1"); } + // send at this time so it's guaranteed to get executed at the right time + { + client_t *save; + save = host_client; + host_client = client; + Curl_SendRequirements(); + host_client = save; + } + MSG_WriteByte (&client->netconnection->message, svc_serverinfo); MSG_WriteLong (&client->netconnection->message, Protocol_NumberForEnum(sv.protocol)); MSG_WriteByte (&client->netconnection->message, svs.maxclients); @@ -437,14 +446,6 @@ void SV_SendServerinfo (client_t *client) MSG_WriteByte (&client->netconnection->message, svc_signonnum); MSG_WriteByte (&client->netconnection->message, 1); - { - client_t *save; - save = host_client; - host_client = client; - Curl_SendRequirements(); - host_client = save; - } - client->spawned = false; // need prespawn, spawn, etc }