From: Mario Date: Wed, 11 Sep 2024 08:11:34 +0000 (+1000) Subject: Load output of create_scrshot_ent if no info_autoscreenshot entities exist X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=997b3d991ece37aa139e53f84653eea703d23ffd;p=xonotic%2Fxonotic-data.pk3dir.git Load output of create_scrshot_ent if no info_autoscreenshot entities exist --- diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 3f38a933f..b102076bc 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -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(); }