]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Load output of create_scrshot_ent if no info_autoscreenshot entities exist
authorMario <mario.mario@y7mail.com>
Wed, 11 Sep 2024 08:11:34 +0000 (18:11 +1000)
committerMario <mario.mario@y7mail.com>
Wed, 11 Sep 2024 08:11:34 +0000 (18:11 +1000)
qcsrc/server/world.qc

index 3f38a933f9127df678e79d930d42931aae7167c5..b102076bc9a369de134e65cdf1007203635164a2 100644 (file)
@@ -1067,6 +1067,11 @@ spawnfunc(worldspawn)
                // INITPRIO_LAST is too soon: bots either didn't join yet or didn't leave yet, see: bot_fixcount()
                defer(this, 5, Pause_TryPause_Dedicated);
 
+       // load entity data outputted by create_scrshot_ent
+       string filename = strcat("data/", mapname, "_scrshot_ent.txt");
+       if(!find(NULL, classname, "info_autoscreenshot") && fexists(filename))
+               loadfromfile(filename);
+
        world_initialized = 1;
        __spawnfunc_spawn_all();
 }