]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
VM_sprintf: support color codes in %s
[xonotic/darkplaces.git] / sv_main.c
index c99273b1add0f9a448ba8e24f3a3c7de40d58be9..27befbcfcea47edb3f5cf4a20589c50a9a3bee7c 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -43,7 +43,7 @@ cvar_t fraglimit = {CVAR_NOTIFY, "fraglimit","0", "ends level if this many frags
 cvar_t gamecfg = {0, "gamecfg", "0", "unused cvar in quake, can be used by mods"};
 cvar_t noexit = {CVAR_NOTIFY, "noexit","0", "kills anyone attempting to use an exit"};
 cvar_t nomonsters = {0, "nomonsters", "0", "unused cvar in quake, can be used by mods"};
-cvar_t pausable = {0, "pausable","1", "allow players to pause or not"};
+cvar_t pausable = {0, "pausable","1", "allow players to pause or not (otherwise, only the server admin can)"};
 cvar_t pr_checkextension = {CVAR_READONLY, "pr_checkextension", "1", "indicates to QuakeC that the standard quakec extensions system is available (if 0, quakec should not attempt to use extensions)"};
 cvar_t samelevel = {CVAR_NOTIFY, "samelevel","0", "repeats same level if level ends (due to timelimit or someone hitting an exit)"};
 cvar_t skill = {0, "skill","1", "difficulty level of game, affects monster layouts in levels, 0 = easy, 1 = normal, 2 = hard, 3 = nightmare (same layout as hard but monsters fire twice)"};
@@ -1362,6 +1362,7 @@ static qboolean SV_PrepareEntityForSending (prvm_edict_t *ent, entity_state_t *c
                cs->framegroupblend[2].lerp = PRVM_serveredictfloat(ent, lerpfrac3);
                cs->framegroupblend[3].lerp = PRVM_serveredictfloat(ent, lerpfrac4);
                cs->framegroupblend[0].lerp = 1.0f - cs->framegroupblend[1].lerp - cs->framegroupblend[2].lerp - cs->framegroupblend[3].lerp;
+               cs->frame = 0; // don't need the legacy frame
        }
 
        cs->light[0] = light[0];
@@ -2973,7 +2974,7 @@ int SV_ParticleEffectIndex(const char *name)
                                argc = 0;
                                for (;;)
                                {
-                                       if (!COM_ParseToken_Simple(&text, true, false) || !strcmp(com_token, "\n"))
+                                       if (!COM_ParseToken_Simple(&text, true, false, true) || !strcmp(com_token, "\n"))
                                                break;
                                        if (argc < 16)
                                        {
@@ -3231,6 +3232,9 @@ void SV_SpawnServer (const char *server)
 
 //     SV_LockThreadMutex();
 
+       if(cls.state == ca_dedicated)
+               Sys_MakeProcessNice();
+
        if (cls.state != ca_dedicated)
        {
                SCR_BeginLoadingPlaque();
@@ -3256,7 +3260,12 @@ void SV_SpawnServer (const char *server)
        if (!worldmodel || !worldmodel->TraceBox)
        {
                Con_Printf("Couldn't load map %s\n", modelname);
+
+               if(cls.state == ca_dedicated)
+                       Sys_MakeProcessMean();
+
 //             SV_UnlockThreadMutex();
+
                return;
        }
 
@@ -3498,6 +3507,9 @@ void SV_SpawnServer (const char *server)
        Con_DPrint("Server spawned.\n");
        NetConn_Heartbeat (2);
 
+       if(cls.state == ca_dedicated)
+               Sys_MakeProcessMean();
+
 //     SV_UnlockThreadMutex();
 }