From 8cbf0e84432e075e617f43c037c645ea9846eba0 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 12 Jun 2016 13:35:42 +1000 Subject: [PATCH] Remove uses of WITHSELF --- qcsrc/client/shownames.qc | 2 +- qcsrc/common/ent_cs.qc | 2 +- .../gamemodes/gamemode/nexball/nexball.qc | 2 +- qcsrc/common/monsters/sv_monsters.qc | 2 +- qcsrc/common/mutators/mutator/buffs/buffs.qc | 2 +- .../mutators/mutator/instagib/instagib.qc | 2 +- .../mutators/mutator/overkill/overkill.qc | 2 +- qcsrc/common/physics/movetypes/movetypes.qc | 6 ++--- qcsrc/common/physics/movetypes/push.qc | 2 +- qcsrc/common/triggers/func/conveyor.qc | 2 +- qcsrc/common/triggers/subs.qc | 4 ++-- qcsrc/common/triggers/target/spawn.qc | 2 +- qcsrc/common/triggers/trigger/gamestart.qc | 4 +--- qcsrc/common/vehicles/vehicle/raptor.qc | 2 +- qcsrc/common/weapons/all.qh | 3 ++- qcsrc/common/weapons/weapon/arc.qc | 2 +- qcsrc/common/weapons/weapon/blaster.qc | 2 +- qcsrc/dpdefs/post.qh | 13 +++++++++++ qcsrc/dpdefs/pre.qh | 6 +++++ qcsrc/lib/_all.inc | 3 ++- qcsrc/lib/macro.qh | 2 +- qcsrc/lib/oo.qh | 7 ------ qcsrc/lib/self.qh | 22 ++++++++++--------- qcsrc/lib/spawnfunc.qh | 6 +++-- qcsrc/server/cheats.qc | 2 +- qcsrc/server/command/vote.qc | 2 +- qcsrc/server/g_world.qc | 4 ++-- qcsrc/server/miscfunctions.qc | 6 ++--- qcsrc/server/mutators/mutator/gamemode_ctf.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_tdm.qc | 2 +- qcsrc/server/sv_main.qc | 5 +++++ 31 files changed, 73 insertions(+), 52 deletions(-) diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index e9db990c8..6700ba61c 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -177,7 +177,7 @@ void Draw_ShowNames_All() } make_impure(it); assert(getthink(entcs), eprint(entcs)); - WITHSELF(entcs, getthink(entcs)(entcs)); + getthink(entcs)(entcs); if (!entcs.has_origin) continue; if (entcs.m_entcs_private) { diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index 75deb92ea..cafef4868 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -187,7 +187,7 @@ #undef X this.iflags |= IFLAG_ORIGIN; InterpolateOrigin_Note(this); - WITHSELF(this, getthink(this)(this)); + getthink(this)(this); return true; } diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 2a431c721..6ef9ca5ab 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -109,7 +109,7 @@ void nexball_setstatus(entity this) bprint("The ", Team_ColoredFullName(this.team), " held the ball for too long.\n"); DropBall(this.ballcarried, this.ballcarried.owner.origin, '0 0 0'); entity e = this.ballcarried; - WITHSELF(e, ResetBall(e)); + ResetBall(e); } else this.items |= IT_KEY1; diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 1ae7e83a9..945a1de35 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -48,7 +48,7 @@ void monster_dropitem(entity this, entity attacker) if(e && e.monster_loot) { e.noalign = true; - WITHSELF(e, e.monster_loot(e)); + e.monster_loot(e); e.gravity = 1; e.movetype = MOVETYPE_TOSS; e.reset = SUB_Remove; diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index cd72bb46b..15aa8eeb1 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -907,7 +907,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink) { entity oldother = other; other = player; - WITHSELF(it, gettouch(it)(it)); + gettouch(it)(it); other = oldother; } } diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc index 89bbf5fae..dc871d694 100644 --- a/qcsrc/common/mutators/mutator/instagib/instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -389,7 +389,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem) e.cnt = item.cnt; e.team = item.team; e.spawnfunc_checked = true; - WITHSELF(e, spawnfunc_item_minst_cells(e)); + spawnfunc_item_minst_cells(e); return true; } diff --git a/qcsrc/common/mutators/mutator/overkill/overkill.qc b/qcsrc/common/mutators/mutator/overkill/overkill.qc index 323286bbe..2fb75b3f8 100644 --- a/qcsrc/common/mutators/mutator/overkill/overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/overkill.qc @@ -128,7 +128,7 @@ void ok_DropItem(entity this, entity targ) e.noalign = true; e.pickup_anyway = true; e.spawnfunc_checked = true; - WITHSELF(e, spawnfunc_item_armor_small(e)); + spawnfunc_item_armor_small(e); if (!wasfreed(e)) { // might have been blocked by a mutator e.movetype = MOVETYPE_TOSS; e.gravity = 1; diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index ce7d04d1d..06ccde2a5 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -321,7 +321,7 @@ void _Movetype_Impact(entity this, entity oth) // SV_Impact { other = oth; - WITHSELF(this, gettouch(this)(this)); + gettouch(this)(this); other = oldother; } @@ -330,7 +330,7 @@ void _Movetype_Impact(entity this, entity oth) // SV_Impact { other = this; - WITHSELF(oth, gettouch(oth)(oth)); + gettouch(oth)(oth); other = oldother; } @@ -360,7 +360,7 @@ void _Movetype_LinkEdict_TouchAreaGrid(entity this) // SV_LinkEdict_TouchAreaGr trace_plane_dist = 0; trace_ent = this; - WITHSELF(it, gettouch(it)(it)); + gettouch(it)(it); } }); diff --git a/qcsrc/common/physics/movetypes/push.qc b/qcsrc/common/physics/movetypes/push.qc index 276b10476..29ce13106 100644 --- a/qcsrc/common/physics/movetypes/push.qc +++ b/qcsrc/common/physics/movetypes/push.qc @@ -149,6 +149,6 @@ void _Movetype_Physics_Pusher(entity this, float dt) // SV_Physics_Pusher this.move_nextthink = 0; this.move_time = time; other = world; - WITHSELF(this, this.move_think(this)); + this.move_think(this); } } diff --git a/qcsrc/common/triggers/func/conveyor.qc b/qcsrc/common/triggers/func/conveyor.qc index e86eefb2c..b8980a156 100644 --- a/qcsrc/common/triggers/func/conveyor.qc +++ b/qcsrc/common/triggers/func/conveyor.qc @@ -147,7 +147,7 @@ spawnfunc(func_conveyor) #elif defined(CSQC) -void conveyor_draw(entity this) { WITHSELF(this, conveyor_think(this)); } +void conveyor_draw(entity this) { conveyor_think(this); } void conveyor_init(entity this) { diff --git a/qcsrc/common/triggers/subs.qc b/qcsrc/common/triggers/subs.qc index a71267b0c..51ef00273 100644 --- a/qcsrc/common/triggers/subs.qc +++ b/qcsrc/common/triggers/subs.qc @@ -145,7 +145,7 @@ void SUB_CalcMove_controller_think (entity this) entity own = this.owner; SUB_THINK(own, this.think1); remove(this); - WITHSELF(own, SUB_THUNK(own)(own)); + SUB_THUNK(own)(own); } } @@ -236,7 +236,7 @@ void SUB_CalcMove_Bezier (entity this, vector tcontrol, vector tdest, float tspe this.SUB_NEXTTHINK = this.SUB_LTIME + traveltime; // invoke controller - WITHSELF(controller, getthink(controller)(controller)); + getthink(controller)(controller); } void SUB_CalcMove (entity this, vector tdest, float tspeedtype, float tspeed, void(entity this) func) diff --git a/qcsrc/common/triggers/target/spawn.qc b/qcsrc/common/triggers/target/spawn.qc index a570c2a64..679d66e73 100644 --- a/qcsrc/common/triggers/target/spawn.qc +++ b/qcsrc/common/triggers/target/spawn.qc @@ -217,7 +217,7 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti value = strcat("target_spawn_helper", value); putentityfieldstring(target_spawn_spawnfunc_field, e, value); - WITHSELF(e, e.target_spawn_spawnfunc(e)); + e.target_spawn_spawnfunc(e); // We called an external function, so we have to re-tokenize msg. n = tokenize_console(msg); diff --git a/qcsrc/common/triggers/trigger/gamestart.qc b/qcsrc/common/triggers/trigger/gamestart.qc index 6fa27cf1a..efddf8c77 100644 --- a/qcsrc/common/triggers/trigger/gamestart.qc +++ b/qcsrc/common/triggers/trigger/gamestart.qc @@ -10,11 +10,10 @@ void gamestart_use_this(entity this) gamestart_use(this, NULL, NULL); } -void self_spawnfunc_trigger_gamestart(entity this); spawnfunc(trigger_gamestart) { this.use = gamestart_use; - this.reset2 = self_spawnfunc_trigger_gamestart; + this.reset2 = spawnfunc_trigger_gamestart; if(this.wait) { @@ -24,6 +23,5 @@ spawnfunc(trigger_gamestart) else InitializeEntity(this, gamestart_use_this, INITPRIO_FINDTARGET); } -void self_spawnfunc_trigger_gamestart(entity this) { WITHSELF(this, spawnfunc_trigger_gamestart(this)); } #endif diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index 9dbf5825f..18dd356df 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -391,7 +391,7 @@ bool raptor_frame(entity this) if (wep1.wr_checkammo1(wep1, vehic)) { .entity weaponentity = weaponentities[0]; - WITHSELF(vehic, wep1.wr_think(wep1, vehic, weaponentity, 1)); + wep1.wr_think(wep1, vehic, weaponentity, 1); } if(vehic.vehicle_flags & VHF_SHIELDREGEN) diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index b86b77fad..dd691a692 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -114,7 +114,8 @@ void W_PROP_think(entity this) STATIC_INIT_LATE(W_PROP_reloader) { entity e = W_PROP_reloader = new_pure(W_PROP_reloader); - WITHSELF(e, (setthink(e, W_PROP_think))(e)); + setthink(e, W_PROP_think); + W_PROP_think(e); } #endif diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index 4908a7ee5..b7d471f5a 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -691,7 +691,7 @@ void W_Arc_Beam(float burst, entity actor) beam.beam_bursting = burst; Net_LinkEntity(beam, false, 0, W_Arc_Beam_Send); - WITHSELF(beam, getthink(beam)(beam)); + getthink(beam)(beam); } void Arc_Smoke(entity actor) { diff --git a/qcsrc/common/weapons/weapon/blaster.qc b/qcsrc/common/weapons/weapon/blaster.qc index 59cb4618b..ca305f7ba 100644 --- a/qcsrc/common/weapons/weapon/blaster.qc +++ b/qcsrc/common/weapons/weapon/blaster.qc @@ -146,7 +146,7 @@ void W_Blaster_Attack( if (time >= missile.nextthink) { - WITHSELF(missile, getthink(missile)(missile)); + getthink(missile)(missile); } } diff --git a/qcsrc/dpdefs/post.qh b/qcsrc/dpdefs/post.qh index fe465e593..db8752d2b 100644 --- a/qcsrc/dpdefs/post.qh +++ b/qcsrc/dpdefs/post.qh @@ -1,3 +1,16 @@ #pragma once +#undef ChangeYaw +#undef checkclient +#undef droptofloor +#undef error +#undef movetogoal #undef objerror +#undef walkmove + +#ifdef MENUQC + #define NULL (0, null_entity) + #define world NULL +#else + #define NULL (0, world) +#endif diff --git a/qcsrc/dpdefs/pre.qh b/qcsrc/dpdefs/pre.qh index f63f0aa83..b24d0120a 100644 --- a/qcsrc/dpdefs/pre.qh +++ b/qcsrc/dpdefs/pre.qh @@ -1,3 +1,9 @@ #pragma once +#define ChangeYaw builtin_ChangeYaw +#define checkclient builtin_checkclient +#define droptofloor builtin_droptofloor +#define error builtin_error +#define movetogoal builtin_movetogoal #define objerror builtin_objerror +#define walkmove builtin_walkmove diff --git a/qcsrc/lib/_all.inc b/qcsrc/lib/_all.inc index 23b55cb69..03b943625 100644 --- a/qcsrc/lib/_all.inc +++ b/qcsrc/lib/_all.inc @@ -29,6 +29,8 @@ #include +#include "self.qh" + #define USING(name, T) typedef T name #include "bool.qh" @@ -94,7 +96,6 @@ void isnt_bool( float this) { print(ftos(this)); } #include "registry.qh" #include "registry_net.qh" #include "replicate.qh" -#include "self.qh" #include "sortlist.qc" #include "sort.qh" #include "spawnfunc.qh" diff --git a/qcsrc/lib/macro.qh b/qcsrc/lib/macro.qh index 809708d74..dff3710a5 100644 --- a/qcsrc/lib/macro.qh +++ b/qcsrc/lib/macro.qh @@ -1,7 +1,7 @@ #pragma once #if 1 - void voidfunc() { error("voidfunc"); } + void voidfunc() { } #define MACRO_BEGIN if (1) { #define MACRO_END } else voidfunc() #else diff --git a/qcsrc/lib/oo.qh b/qcsrc/lib/oo.qh index fd6ca2036..3708552d5 100644 --- a/qcsrc/lib/oo.qh +++ b/qcsrc/lib/oo.qh @@ -4,13 +4,6 @@ #include "nil.qh" #include "static.qh" -#ifdef MENUQC - #define NULL (0, null_entity) - #define world NULL -#else - #define NULL (0, world) -#endif - .vector origin; .bool pure_data; /** @deprecated use new_pure or NEW(class) */ diff --git a/qcsrc/lib/self.qh b/qcsrc/lib/self.qh index 4af4b8ab0..37f0c50d2 100644 --- a/qcsrc/lib/self.qh +++ b/qcsrc/lib/self.qh @@ -87,19 +87,21 @@ SELFWRAP(camera_transform, vector, (vector org, vector ang), (entity this, vecto SELFWRAP(SendEntity, bool, (entity to, int sendflags), (entity this, entity to, int sendflags), (this, to, sendflags)) #define setSendEntity(e, f) SELFWRAP_SET(SendEntity, e, f) -#ifdef SVQC -void make_safe_for_remove(entity this); +#define ChangeYaw(e, ...) (__self = (e), builtin_ChangeYaw(__VA_ARGS__)) +#define checkclient(e, ...) (__self = (e), builtin_checkclient(__VA_ARGS__)) +#ifndef SVQC + #define droptofloor(e, ...) (__self = (e), builtin_droptofloor(__VA_ARGS__)) #endif - -void objerror(entity this, string s) -{ -#ifdef SVQC - make_safe_for_remove(this); +#define error(...) (__self = (NULL), builtin_error(__VA_ARGS__)) +#define movetogoal(e, ...) (__self = (e), builtin_movetogoal(__VA_ARGS__)) +#ifndef SVQC + #define objerror(e, ...) (__self = (e), builtin_objerror(__VA_ARGS__)) +#else + void make_safe_for_remove(entity this); + #define objerror(e, ...) (__self = (e), make_safe_for_remove(__self), builtin_objerror(__VA_ARGS__)) #endif - WITHSELF(this, builtin_objerror(s)); -} +#define walkmove(e, ...) (__self = (e), builtin_walkmove(__VA_ARGS__)) #ifndef MENUQC -void adaptor_think2touch(entity this) { WITH(entity, other, NULL, gettouch(this)(this)); } void adaptor_think2use(entity this) { if (this.use) this.use(this, NULL, NULL); } #endif diff --git a/qcsrc/lib/spawnfunc.qh b/qcsrc/lib/spawnfunc.qh index 22047bbc9..0463979c1 100644 --- a/qcsrc/lib/spawnfunc.qh +++ b/qcsrc/lib/spawnfunc.qh @@ -27,6 +27,7 @@ noref bool require_spawnfunc_prefix; #define _spawnfunc_check(fld) \ if (fieldname == #fld) continue; + noref bool __spawnfunc_expecting; noref entity __spawnfunc_expect; bool __spawnfunc_unreachable_workaround = true; @@ -35,11 +36,12 @@ noref bool require_spawnfunc_prefix; void __spawnfunc_##id(entity this); \ [[accumulate]] void spawnfunc_##id(entity this) \ { \ - if (__self == __spawnfunc_expect) \ + if (__spawnfunc_expecting) \ { \ /* engine call */ \ + __spawnfunc_expecting = false; \ + this = __spawnfunc_expect; \ __spawnfunc_expect = NULL; \ - this = __self; \ } \ else \ { \ diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index e92a6082a..987a86db4 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -357,7 +357,7 @@ float CheatCommand(entity this, int argc) e.angles = fixedvectoangles2(trace_plane_normal, v_forward); e.angles = AnglesTransform_ApplyToAngles(e.angles, '-90 0 0'); // so unrotated models work } - WITHSELF(e, spawnfunc_func_breakable(e)); + spawnfunc_func_breakable(e); // now, is it valid? if(f == 0) { diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index b1482999d..d02caa390 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -340,7 +340,7 @@ void reset_map(bool dorespawn) FOREACH_ENTITY_ORDERED(IS_NOT_A_CLIENT(it), { if (it.reset) { - WITHSELF(it, it.reset(it)); // needs WITHSELF, as some spawnfuncs are set to .reset + it.reset(it); continue; } if (it.team_saved) it.team = it.team_saved; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 8e2f74c72..7cb5f6980 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -528,7 +528,7 @@ void RandomSeed_Spawn() setthink(randomseed, RandomSeed_Think); Net_LinkEntity(randomseed, false, 0, RandomSeed_Send); - WITHSELF(randomseed, getthink(randomseed)(randomseed)); // sets random seed and nextthink + getthink(randomseed)(randomseed); // sets random seed and nextthink } spawnfunc(__init_dedicated_server) @@ -1562,7 +1562,7 @@ void NextLevel() bprint(it.netname, " ^7wins.\n"); )); - WITHSELF(NULL, target_music_kill()); + target_music_kill(); if(autocvar_g_campaign) CampaignPreIntermission(); diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index d4c4bb7e5..c150d38a8 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -903,7 +903,7 @@ void InitializeEntitiesRun() //dprint("Delayed initialization: ", e.classname, "\n"); if (func) { - WITHSELF(e, func(e)); + func(e); } else { @@ -957,7 +957,7 @@ void adaptor_think2use_hittype_splash(entity this) // for timed projectile deton { if(!(IS_ONGROUND(this))) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING this.projectiledeathtype |= HITTYPE_SPLASH; - WITHSELF(this, adaptor_think2use(this)); + adaptor_think2use(this); } // deferred dropping @@ -1033,7 +1033,7 @@ bool SUB_NoImpactCheck(entity this, entity toucher) { //dprint("A hit happened with zero hit contents... DEBUG THIS, this should never happen for projectiles! Projectile will self-destruct.\n"); LOG_TRACEF("A hit from a projectile happened with no hit contents! DEBUG THIS, this should never happen for projectiles! Profectile will self-destruct. (edict: %d, classname: %s, origin: %s)\n", etof(this), this.classname, vtos(this.origin)); - WITHSELF(this, checkclient()); + checkclient(this); } if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) return true; diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index b827f10ea..ade9cfa3b 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -2563,7 +2563,7 @@ void ctf_SpawnTeam (string teamname, int teamcolor) this.netname = teamname; this.cnt = teamcolor; this.spawnfunc_checked = true; - WITHSELF(this, spawnfunc_ctf_team(this)); + spawnfunc_ctf_team(this); } void ctf_DelayedInit(entity this) // Do this check with a delay so we can wait for teams to be set up. diff --git a/qcsrc/server/mutators/mutator/gamemode_tdm.qc b/qcsrc/server/mutators/mutator/gamemode_tdm.qc index 2eeaafa30..d245721cb 100644 --- a/qcsrc/server/mutators/mutator/gamemode_tdm.qc +++ b/qcsrc/server/mutators/mutator/gamemode_tdm.qc @@ -64,7 +64,7 @@ void tdm_SpawnTeam (string teamname, float teamcolor) this.netname = teamname; this.cnt = teamcolor; this.spawnfunc_checked = true; - WITHSELF(this, spawnfunc_tdm_team(this)); + spawnfunc_tdm_team(this); } void tdm_DelayedInit(entity this) diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index e1bf5c0be..c842dac3f 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -239,12 +239,14 @@ void StartFrame() bool DoesQ3ARemoveThisEntity(entity this); void SV_OnEntityPreSpawnFunction() {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; } } -- 2.39.2