X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fsv_main.qc;h=c842dac3f97de50252980274b8c5feab71d23c97;hb=8cbf0e84432e075e617f43c037c645ea9846eba0;hp=b33b96db1b2cb02cd24af7205b5e005d82ec406f;hpb=d6414f596f67ca6212738a0f51b9f0a28f0aaefe;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index b33b96db1..c842dac3f 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -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; } }