]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
forbid world writes after precache stage (without using sv.state, instead prog->allow...
[xonotic/darkplaces.git] / sv_main.c
index f811ee66cbc2bb1e6be57a617a27e0076a45ab85..019ad9d49370bd8a67609543b6c1bad2c822482a 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1736,6 +1736,7 @@ void SV_SpawnServer (const char *server)
        //prog->num_edicts = svs.maxclients+1;
 
        sv.state = ss_loading;
+       prog->allowworldwrites = true;
        sv.paused = false;
 
        *prog->time = sv.time = 1.0;
@@ -1806,6 +1807,7 @@ void SV_SpawnServer (const char *server)
 
 // all setup is completed, any further precache statements are errors
        sv.state = ss_active;
+       prog->allowworldwrites = false;
 
 // run two frames to allow everything to settle
        for (i = 0;i < 2;i++)