]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
Remove uses of WITHSELF
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index b33b96db1b2cb02cd24af7205b5e005d82ec406f..c842dac3f97de50252980274b8c5feab71d23c97 100644 (file)
@@ -238,13 +238,15 @@ void StartFrame()
 .string cvarfilter;
 bool DoesQ3ARemoveThisEntity(entity this);
 void SV_OnEntityPreSpawnFunction()
-{SELFPARAM();
+{ENGINE_EVENT();
+       __spawnfunc_expecting = true;
        __spawnfunc_expect = this;
        if (this)
        if (this.gametypefilter != "")
        if (!isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, this.gametypefilter))
        {
                remove(this);
+               __spawnfunc_expecting = false;
                return;
        }
        if(this.cvarfilter != "")
@@ -353,6 +355,7 @@ LABEL(cvar_fail)
                {
                        //print("cvarfilter fail\n");
                        remove(this);
+                       __spawnfunc_expecting = false;
                        return;
                }
        }
@@ -360,6 +363,7 @@ LABEL(cvar_fail)
        if(DoesQ3ARemoveThisEntity(this))
        {
                remove(this);
+               __spawnfunc_expecting = false;
                return;
        }
 
@@ -387,6 +391,7 @@ LABEL(cvar_fail)
        if(MUTATOR_CALLHOOK(OnEntityPreSpawn, this))
        {
                remove(this);
+               __spawnfunc_expecting = false;
                return;
        }
 }