]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/spawn.qc
Replace all direct assignments to self with setself(e)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / spawn.qc
index 2ed974b28ecb6ff077c455d70545583ce669eb0d..9e9810b4638ae42c5704108fdbbc49a8bde0d1e8 100644 (file)
@@ -64,10 +64,8 @@ entity spawnmonster (string monster, float monster_id, entity spawnedby, entity
        }
        
        // Monster_Spawn checks if monster is valid
-       entity oldself = self;
-       self = e;
-       Monster_Spawn(monster_id);
-       self = oldself;
+       SELFCALL(e, Monster_Spawn(monster_id));
+       SELFCALL_DONE();
 
        return e;
 }