X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fspawn.qc;h=23fc845ac75d3f35c9b0ad7e77ca1a9fa98e6057;hb=a28262196252bb70222525b589104054806b2c0a;hp=4a84f943584499708acab79e9a387ab8909f7dc5;hpb=1556aa4ea70b3b275afb1cb4587e555fb44f71c3;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/spawn.qc b/qcsrc/common/monsters/spawn.qc index 4a84f9435..23fc845ac 100644 --- a/qcsrc/common/monsters/spawn.qc +++ b/qcsrc/common/monsters/spawn.qc @@ -1,13 +1,12 @@ #if defined(CSQC) #elif defined(MENUQC) #elif defined(SVQC) - #include "../../dpdefs/progsdefs.qh" #include "../util.qh" #include "all.qh" #include "sv_monsters.qh" #include "spawn.qh" - #include "../../server/autocvars.qh" - #include "../../server/defs.qh" + #include + #include #endif entity spawnmonster (string monster, float monster_id, entity spawnedby, entity own, vector orig, float respwn, float invincible, float moveflag) { @@ -25,7 +24,7 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity { RandomSelection_Init(); for(i = MON_FIRST; i <= MON_LAST; ++i) - RandomSelection_Add(world, i, string_null, 1, 1); + RandomSelection_Add(NULL, i, string_null, 1, 1); monster_id = RandomSelection_chosen_float; } @@ -62,12 +61,9 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity e.angles_y = spawnedby.angles_y; } - + // Monster_Spawn checks if monster is valid - entity oldself = self; - self = e; - Monster_Spawn(monster_id); - self = oldself; + Monster_Spawn(e, monster_id); return e; }