From: TimePath Date: Sun, 31 Jul 2016 11:26:51 +0000 (+1000) Subject: Remove remove() X-Git-Tag: xonotic-v0.8.2~753^2 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=0a980f57412cf2253cfd73c8c01a26fb04c87189 Remove remove() --- diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 0a0959b87a..9107add6c8 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -24,7 +24,7 @@ void Announcer_Countdown(entity this) if(roundstarttime == -1) { Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTOP); - remove(this); + delete(this); announcer_countdown = NULL; return; } @@ -40,7 +40,7 @@ void Announcer_Countdown(entity this) { Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_BEGIN); Local_Notification(MSG_MULTI, MULTI_COUNTDOWN_BEGIN); - remove(this); + delete(this); announcer_countdown = NULL; return; } @@ -87,7 +87,7 @@ void Announcer_Gamestart() centerprint_kill(ORDINAL(CPID_ROUND)); if(announcer_countdown) { - remove(announcer_countdown); + delete(announcer_countdown); announcer_countdown = NULL; } } diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 30148bdd44..6eeb6c8bd8 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -142,7 +142,7 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) _setmodel(e, cvar_defstring("_cl_playermodel")); forceplayermodels_goodmodel = e.model; forceplayermodels_goodmodelindex = e.modelindex; - remove(e); + delete(e); } // first, try finding it from the server @@ -175,7 +175,7 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) forceplayermodels_model = e.model; forceplayermodels_modelindex = e.modelindex; forceplayermodels_skin = autocvar__cl_playerskin; - remove(e); + delete(e); } if(autocvar_cl_forcemyplayermodel != "" && autocvar_cl_forcemyplayermodel != forceplayermodels_mymodel) @@ -185,7 +185,7 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) forceplayermodels_myisgoodmodel = fexists(e.model); forceplayermodels_mymodel = e.model; forceplayermodels_mymodelindex = e.modelindex; - remove(e); + delete(e); } // apply it diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index bd9e82ed21..123939959f 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -185,8 +185,8 @@ void Shutdown() { WarpZone_Shutdown(); - remove(teams); - remove(players); + delete(teams); + delete(players); db_close(binddb); db_close(tempdb); if(autocvar_cl_db_saveasdump) @@ -874,7 +874,7 @@ void CSQC_Ent_Remove(entity this) return; } if (this.enttype) Ent_Remove(this); - remove(this); + delete(this); } void Gamemode_Init() diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index bfc25e99c1..cfd3f61ee5 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -177,11 +177,11 @@ void GameTypeVote_DrawGameTypeItem(vector pos, float maxh, float tsize, string g drawstring(last.origin+offset, last.message, gtv_text_size_small, '1 1 1', alpha, DRAWFLAG_NORMAL); next = last; last = last.chain; - remove(next); + delete(next); } // Cleanup - remove(title); + delete(title); } void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, string pic, float _count, int id) diff --git a/qcsrc/common/effects/all.qc b/qcsrc/common/effects/all.qc index b6f378d472..d229b05100 100644 --- a/qcsrc/common/effects/all.qc +++ b/qcsrc/common/effects/all.qc @@ -76,7 +76,7 @@ void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt) net_eff.eent_eff_trail = eff.eent_eff_trail; FOREACH_CLIENT(IS_REAL_CLIENT(it), Net_Write_Effect(net_eff, it, 0)); - remove(net_eff); + delete(net_eff); } void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt) diff --git a/qcsrc/common/effects/qc/casings.qc b/qcsrc/common/effects/qc/casings.qc index a4ade38366..6986a19405 100644 --- a/qcsrc/common/effects/qc/casings.qc +++ b/qcsrc/common/effects/qc/casings.qc @@ -44,7 +44,7 @@ class(Casing) .float cnt; void Casing_Delete(entity this) { - remove(this); + delete(this); } void Casing_Draw(entity this) diff --git a/qcsrc/common/effects/qc/damageeffects.qc b/qcsrc/common/effects/qc/damageeffects.qc index b53b605058..d17502e81b 100644 --- a/qcsrc/common/effects/qc/damageeffects.qc +++ b/qcsrc/common/effects/qc/damageeffects.qc @@ -81,7 +81,7 @@ void DamageEffect_Think(entity this) { // time is up or the player got gibbed / disconnected this.owner.total_damages = max(0, this.owner.total_damages - 1); - remove(this); + delete(this); return; } if(this.state && !this.owner.csqcmodel_isdead) @@ -89,7 +89,7 @@ void DamageEffect_Think(entity this) // if the player was dead but is now alive, it means he respawned // if so, clear his damage effects, or damages from his dead body will be copied back this.owner.total_damages = max(0, this.owner.total_damages - 1); - remove(this); + delete(this); return; } this.state = this.owner.csqcmodel_isdead; diff --git a/qcsrc/common/effects/qc/gibs.qc b/qcsrc/common/effects/qc/gibs.qc index 78f1a27cc6..416012238a 100644 --- a/qcsrc/common/effects/qc/gibs.qc +++ b/qcsrc/common/effects/qc/gibs.qc @@ -46,7 +46,7 @@ void Violence_GibSplash_At(vector org, vector dir, float type, float amount, ent e.oldorigin_x = compressShortVector(e.velocity); FOREACH_CLIENT(IS_REAL_CLIENT(it), Violence_GibSplash_SendEntity(e, it, 0)); - remove(e); + delete(e); } void Violence_GibSplash(entity source, float type, float amount, entity attacker) @@ -70,7 +70,7 @@ void Violence_GibSplash(entity source, float type, float amount, entity attacker void Gib_Delete(entity this) { - remove(this); + delete(this); } string species_prefix(int specnum); @@ -311,7 +311,7 @@ NET_HANDLE(net_gibsplash, bool isNew) // no gibs in gentle mode, sorry break; } - remove(this); + delete(this); } #endif diff --git a/qcsrc/common/effects/qc/modeleffects.qc b/qcsrc/common/effects/qc/modeleffects.qc index 28b8bb496b..8fbef5b587 100644 --- a/qcsrc/common/effects/qc/modeleffects.qc +++ b/qcsrc/common/effects/qc/modeleffects.qc @@ -103,7 +103,7 @@ void ModelEffect_Draw(entity this) this.alpha = this.cnt * bound(0, 1 - (time - this.lifetime) / this.fadetime, 1); if(this.alpha < ALPHA_MIN_VISIBLE) { - remove(this); + delete(this); return; } this.drawmask = MASK_NORMAL; @@ -158,7 +158,7 @@ NET_HANDLE(ENT_CLIENT_MODELEFFECT, bool isnew) e.draw = ModelEffect_Draw; if (isnew) IL_PUSH(g_drawables, e); - if (!isnew) remove(e); // yes, this IS stupid, but I don't need to duplicate all the read* stuff then + if (!isnew) delete(e); // yes, this IS stupid, but I don't need to duplicate all the read* stuff then return true; } #endif diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index e69998563d..2a7b3f80c4 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -118,7 +118,7 @@ void entcs_detach(entity player) { if (!player.entcs) return; - remove(player.entcs); + delete(player.entcs); player.entcs = NULL; } @@ -131,7 +131,7 @@ int n = this.sv_entnum; entity e = entcs_receiver(n); entcs_receiver(n, NULL); - if (e != this) remove(e); + if (e != this) delete(e); } void entcs_think(entity this) diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 35fe31c2bd..8e632f7c7e 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -453,7 +453,7 @@ spawnfunc(nexball_team) { if(!g_nexball) { - remove(this); + delete(this); return; } this.team = this.cnt + 1; @@ -527,7 +527,7 @@ void nb_delayedinit(entity this) void SpawnBall(entity this) { - if(!g_nexball) { remove(this); return; } + if(!g_nexball) { delete(this); return; } // balls += 4; // using the remaining bits to count balls will leave more than the max edict count, so it's fine @@ -624,7 +624,7 @@ bool nb_Goal_Customize(entity this, entity client) void SpawnGoal(entity this) { - if(!g_nexball) { remove(this); return; } + if(!g_nexball) { delete(this); return; } EXACTTRIGGER_INIT; @@ -761,7 +761,7 @@ void W_Nexball_Touch(entity this, entity toucher) GiveBall(attacker, toucher.ballcarried); } } - remove(this); + delete(this); } void W_Nexball_Attack(entity actor, float t) diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc b/qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc index 0135f467ed..3cbecd4969 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/cl_generator.qc @@ -14,7 +14,7 @@ void ons_generator_ray_draw(entity this) if(this.count > 10) { - remove(this); + delete(this); return; } diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc index 89c5eef51d..d3c52e04b2 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc @@ -551,7 +551,7 @@ void ons_ControlPoint_Icon_Damage(entity this, entity inflictor, entity attacker setmodel_fixsize(this.owner, MDL_ONS_CP_PAD1); //setsize(this, '-32 -32 0', '32 32 8'); - remove(this); + delete(this); } this.SendFlags |= CPSF_STATUS; @@ -819,7 +819,7 @@ void ons_ControlPoint_Think(entity this) void ons_ControlPoint_Reset(entity this) { if(this.goalentity) - remove(this.goalentity); + delete(this.goalentity); this.goalentity = NULL; this.team = 0; @@ -1923,7 +1923,7 @@ void ons_MonsterSpawn_Delayed(entity this) { entity own = this.owner; - if(!own) { remove(this); return; } + if(!own) { delete(this); return; } if(own.targetname) { @@ -1936,7 +1936,7 @@ void ons_MonsterSpawn_Delayed(entity this) } } - remove(this); + delete(this); } MUTATOR_HOOKFUNCTION(ons, MonsterSpawn) @@ -1952,7 +1952,7 @@ void ons_TurretSpawn_Delayed(entity this) { entity own = this.owner; - if(!own) { remove(this); return; } + if(!own) { delete(this); return; } if(own.targetname) { @@ -1966,7 +1966,7 @@ void ons_TurretSpawn_Delayed(entity this) } } - remove(this); + delete(this); } MUTATOR_HOOKFUNCTION(ons, TurretSpawn) @@ -2178,7 +2178,7 @@ keys: */ spawnfunc(onslaught_link) { - if(!g_onslaught) { remove(this); return; } + if(!g_onslaught) { delete(this); return; } if (this.target == "" || this.target2 == "") objerror(this, "target and target2 must be set\n"); @@ -2203,7 +2203,7 @@ keys: spawnfunc(onslaught_controlpoint) { - if(!g_onslaught) { remove(this); return; } + if(!g_onslaught) { delete(this); return; } ons_ControlPoint_Setup(this); } @@ -2219,7 +2219,7 @@ keys: */ spawnfunc(onslaught_generator) { - if(!g_onslaught) { remove(this); return; } + if(!g_onslaught) { delete(this); return; } if(!this.team) { objerror(this, "team must be set"); } ons_GeneratorSetup(this); diff --git a/qcsrc/common/items/inventory.qh b/qcsrc/common/items/inventory.qh index 934271059b..c7f602e653 100644 --- a/qcsrc/common/items/inventory.qh +++ b/qcsrc/common/items/inventory.qh @@ -71,7 +71,7 @@ void Inventory_new(entity e) inv.drawonlytoclient = e; Net_LinkEntity((inv.owner = e).inventory = inv, false, 0, Inventory_Send); } -void Inventory_delete(entity e) { remove(e.inventory.inventory); remove(e.inventory); } +void Inventory_delete(entity e) { delete(e.inventory.inventory); delete(e.inventory); } void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; } #endif diff --git a/qcsrc/common/minigames/cl_minigames.qc b/qcsrc/common/minigames/cl_minigames.qc index 1aa748faab..daca237b94 100644 --- a/qcsrc/common/minigames/cl_minigames.qc +++ b/qcsrc/common/minigames/cl_minigames.qc @@ -75,7 +75,7 @@ MINIGAME_SIMPLELINKED_ENTITIES void minigame_autoclean_entity(entity e) { LOG_DEBUG("CL Auto-cleaned: ",ftos(etof(e)), " (",e.classname,")\n"); - remove(e); + delete(e); } void HUD_MinigameMenu_CurrentButton(); diff --git a/qcsrc/common/minigames/cl_minigames_hud.qc b/qcsrc/common/minigames/cl_minigames_hud.qc index c26109bfd3..90f1b2252e 100644 --- a/qcsrc/common/minigames/cl_minigames_hud.qc +++ b/qcsrc/common/minigames/cl_minigames_hud.qc @@ -143,7 +143,7 @@ void HUD_MinigameMenu_EraseEntry ( entity e ) if ( HUD_MinigameMenu_activeitem == e ) HUD_MinigameMenu_activeitem = NULL; - remove(e); + delete(e); } // Minigame menu options: create entry @@ -193,7 +193,7 @@ bool HUD_MinigameMenu_Click_ExpandCollapse(entity this) if ( e.flags & 2 ) HUD_MinigameMenu_Click(e); this.list_next = e.list_next; - remove(e); + delete(e); } if ( this.list_next ) this.list_next.list_prev = this; @@ -351,7 +351,7 @@ void HUD_MinigameMenu_Close(entity this, entity actor, entity trigger) for ( e = HUD_MinigameMenu_entries; e != NULL; e = p ) { p = e.list_next; - remove(e); + delete(e); } HUD_MinigameMenu_entries = NULL; HUD_MinigameMenu_last_entry = NULL; diff --git a/qcsrc/common/minigames/minigame/bd.qc b/qcsrc/common/minigames/minigame/bd.qc index db25c2959e..041e56339c 100644 --- a/qcsrc/common/minigames/minigame/bd.qc +++ b/qcsrc/common/minigames/minigame/bd.qc @@ -259,7 +259,7 @@ void bd_editor_place(entity minigame, entity player, string pos, int thetile, st return; // how?! if(piece.netname) { strunzone(piece.netname); } - remove(piece); + delete(piece); minigame_server_sendflags(minigame,MINIG_SF_UPDATE); return; } @@ -313,12 +313,12 @@ void bd_unfill_recurse(entity minigame, entity player, int thetype, int letter, if(targ && thetype == targ.bd_tiletype) { if(targ.netname) { strunzone(targ.netname); } - remove(targ); + delete(targ); } else if(piece && thetype == piece.bd_tiletype) { if(piece.netname) { strunzone(piece.netname); } - remove(piece); + delete(piece); } else return; @@ -393,7 +393,7 @@ void bd_setup_pieces(entity minigame) if(e.classname == "minigame_board_piece") { if(e.netname) { strunzone(e.netname); } - remove(e); + delete(e); } bd_load_level(minigame); @@ -631,7 +631,7 @@ int bd_server_event(entity minigame, string event, ...) if(e.classname == "minigame_board_piece") { if(e.netname) { strunzone(e.netname); } - remove(e); + delete(e); } if(minigame.bd_nextlevel) { strunzone(minigame.bd_nextlevel); } diff --git a/qcsrc/common/minigames/minigame/c4.qc b/qcsrc/common/minigames/minigame/c4.qc index 3c2beacb6f..497ef2afc3 100644 --- a/qcsrc/common/minigames/minigame/c4.qc +++ b/qcsrc/common/minigames/minigame/c4.qc @@ -201,7 +201,7 @@ int c4_server_event(entity minigame, string event, ...) if(e.classname == "minigame_board_piece") { if(e.netname) { strunzone(e.netname); } - remove(e); + delete(e); } return false; } diff --git a/qcsrc/common/minigames/minigame/nmm.qc b/qcsrc/common/minigames/minigame/nmm.qc index 8f8e3da2ea..d36c5cd3f6 100644 --- a/qcsrc/common/minigames/minigame/nmm.qc +++ b/qcsrc/common/minigames/minigame/nmm.qc @@ -123,7 +123,7 @@ void nmm_kill_tiles(entity minig) strunzone(e.netname); strunzone(e.nmm_tile_hmill); strunzone(e.nmm_tile_vmill); - remove(e); + delete(e); } } diff --git a/qcsrc/common/minigames/minigame/pong.qc b/qcsrc/common/minigames/minigame/pong.qc index 602cad22d3..d535b8c85d 100644 --- a/qcsrc/common/minigames/minigame/pong.qc +++ b/qcsrc/common/minigames/minigame/pong.qc @@ -442,8 +442,8 @@ int pong_server_event(entity minigame, string event, ...) paddle.realowner.classname == "pong_ai" ) { minigame.pong_paddles[i] = NULL; - remove(paddle.realowner); - remove(paddle); + delete(paddle.realowner); + delete(paddle); return true; } } diff --git a/qcsrc/common/minigames/minigame/pp.qc b/qcsrc/common/minigames/minigame/pp.qc index 7d4048d61b..f9e0f79b9a 100644 --- a/qcsrc/common/minigames/minigame/pp.qc +++ b/qcsrc/common/minigames/minigame/pp.qc @@ -121,7 +121,7 @@ void pp_move(entity minigame, entity player, string pos ) if(existing) { if(existing.netname) { strunzone(existing.netname); } - remove(existing); + delete(existing); } entity piece = msle_spawn(minigame,"minigame_board_piece"); @@ -186,7 +186,7 @@ void pp_next_match(entity minigame, entity player) entity e = NULL; while ( ( e = findentity(e,owner,minigame) ) ) if ( e.classname == "minigame_board_piece" ) - remove(e); + delete(e); minigame.pp_team1_score = 0; minigame.pp_team2_score = 0; @@ -215,7 +215,7 @@ int pp_server_event(entity minigame, string event, ...) if(e.classname == "minigame_board_piece") { if(e.netname) { strunzone(e.netname); } - remove(e); + delete(e); } return false; } diff --git a/qcsrc/common/minigames/minigame/ps.qc b/qcsrc/common/minigames/minigame/ps.qc index 2a612c599a..c9ef8bd67a 100644 --- a/qcsrc/common/minigames/minigame/ps.qc +++ b/qcsrc/common/minigames/minigame/ps.qc @@ -139,7 +139,7 @@ bool ps_move_piece(entity minigame, entity piece, string pos, int leti, int numb return false; if(middle.netname) { strunzone(middle.netname); } - remove(middle); + delete(middle); if(piece.netname) { strunzone(piece.netname); } piece.netname = strzone(pos); @@ -232,7 +232,7 @@ int ps_server_event(entity minigame, string event, ...) if(e.classname == "minigame_board_piece") { if(e.netname) { strunzone(e.netname); } - remove(e); + delete(e); } return false; } diff --git a/qcsrc/common/minigames/minigame/snake.qc b/qcsrc/common/minigames/minigame/snake.qc index 617ed957ca..4248d589a1 100644 --- a/qcsrc/common/minigames/minigame/snake.qc +++ b/qcsrc/common/minigames/minigame/snake.qc @@ -287,7 +287,7 @@ void snake_eat_team(entity minigame, int pteam) if ( e.classname == "minigame_board_piece" && e.cnt && e.team == pteam ) { if(e.netname) { strunzone(e.netname); } - remove(e); + delete(e); } if(minigame.snake_lives[pteam] <= 0) @@ -354,7 +354,7 @@ void snake_move_head(entity minigame, entity head) if(ate_mouse) { if(hit.netname) { strunzone(hit.netname); } - remove(hit); + delete(hit); snake_new_mouse(minigame); } @@ -425,7 +425,7 @@ int snake_server_event(entity minigame, string event, ...) if(e.classname == "minigame_board_piece") { if(e.netname) { strunzone(e.netname); } - remove(e); + delete(e); } return false; } diff --git a/qcsrc/common/minigames/minigame/ttt.qc b/qcsrc/common/minigames/minigame/ttt.qc index b5248467f5..630462aa9f 100644 --- a/qcsrc/common/minigames/minigame/ttt.qc +++ b/qcsrc/common/minigames/minigame/ttt.qc @@ -123,7 +123,7 @@ void ttt_next_match(entity minigame, entity player) entity e = NULL; while ( ( e = findentity(e,owner,minigame) ) ) if ( e.classname == "minigame_board_piece" ) - remove(e); + delete(e); } } @@ -147,7 +147,7 @@ int ttt_server_event(entity minigame, string event, ...) if(e.classname == "minigame_board_piece") { if(e.netname) { strunzone(e.netname); } - remove(e); + delete(e); } return false; } diff --git a/qcsrc/common/minigames/sv_minigames.qc b/qcsrc/common/minigames/sv_minigames.qc index 0d0efb05dc..299c831dc8 100644 --- a/qcsrc/common/minigames/sv_minigames.qc +++ b/qcsrc/common/minigames/sv_minigames.qc @@ -27,7 +27,7 @@ void minigame_rmplayer(entity minigame_session, entity player) GameLogEcho(strcat(":minigame:part:",minigame_session.netname,":", ftos(etof(player)),":",player.netname)); minigame_session.minigame_players = p.list_next; - remove ( p ); + delete ( p ); player_clear_minigame(player); } else @@ -40,7 +40,7 @@ void minigame_rmplayer(entity minigame_session, entity player) GameLogEcho(strcat(":minigame:part:",minigame_session.netname,":", ftos(etof(player)),":",player.netname)); p.list_next = e.list_next; - remove(e); + delete(e); player_clear_minigame(player); return; } @@ -153,7 +153,7 @@ int minigame_addplayer(entity minigame_session, entity player) minigame_resend(minigame_session); } - else { remove(player_pointer); } + else { delete(player_pointer); } GameLogEcho(strcat(":minigame:join",(mgteam?"":"fail"),":",minigame_session.netname,":", ftos(etof(player)),":",player.netname)); @@ -236,7 +236,7 @@ void end_minigame(entity minigame_session) if ( e.minigame_autoclean ) { LOG_TRACE("SV Auto-cleaned: ",ftos(etof(e)), " (",e.classname,")\n"); - remove(e); + delete(e); } entity p; @@ -244,11 +244,11 @@ void end_minigame(entity minigame_session) { p = e.list_next; player_clear_minigame(e.minigame_players); - remove(e); + delete(e); } strunzone(minigame_session.netname); - remove(minigame_session); + delete(minigame_session); } void end_minigames() diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index 65c82ab37d..3d82bb686e 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -157,7 +157,7 @@ void M_Mage_Attack_Spike_Explode(entity this, entity directhitentity) Send_Effect(EFFECT_EXPLOSION_SMALL, this.origin, '0 0 0', 1); RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), NULL, NULL, 0, DEATH_MONSTER_MAGE.m_id, directhitentity); - remove (this); + delete (this); } void M_Mage_Attack_Spike_Touch(entity this, entity toucher) diff --git a/qcsrc/common/monsters/monster/spider.qc b/qcsrc/common/monsters/monster/spider.qc index c7ffece151..543c99bf13 100644 --- a/qcsrc/common/monsters/monster/spider.qc +++ b/qcsrc/common/monsters/monster/spider.qc @@ -148,7 +148,7 @@ void M_Spider_Attack_Web_Explode(entity this) it.spider_slowness = time + (autocvar_g_monster_spider_attack_web_damagetime); }); - remove(this); + delete(this); } } diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index 53d08effa8..805eb41451 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -113,7 +113,7 @@ void M_Wyvern_Attack_Fireball_Explode(entity this) Fire_AddDamage(it, own, 5 * MONSTER_SKILLMOD(own), autocvar_g_monster_wyvern_attack_fireball_damagetime, this.projectiledeathtype); }); - remove(this); + delete(this); } void M_Wyvern_Attack_Fireball_Touch(entity this, entity toucher) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 60c2777ca7..8508d57089 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -903,10 +903,10 @@ void Monster_Remove(entity this) if(!MUTATOR_CALLHOOK(MonsterRemove, this)) Send_Effect(EFFECT_ITEM_PICKUP, this.origin, '0 0 0', 1); - if(this.(weaponentity)) { remove(this.(weaponentity)); } - if(this.iceblock) { remove(this.iceblock); } + if(this.(weaponentity)) { delete(this.(weaponentity)); } + if(this.iceblock) { delete(this.iceblock); } WaypointSprite_Kill(this.sprite); - remove(this); + delete(this); } void Monster_Dead_Think(entity this) diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index 5c2987e0e7..e27fa3d7f4 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -411,7 +411,7 @@ bool buff_Customize(entity this, entity client) void buff_Init(entity this) { - if(!cvar("g_buffs")) { remove(this); return; } + if(!cvar("g_buffs")) { delete(this); return; } if(!teamplay && this.team) { this.team = 0; } @@ -480,7 +480,7 @@ void buff_Vengeance_DelayedDamage(entity this) if(this.enemy) Damage(this.enemy, this.owner, this.owner, this.dmg, DEATH_BUFF.m_id, this.enemy.origin, '0 0 0'); - remove(this); + delete(this); return; } @@ -690,7 +690,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDies) if(frag_target.buff_model) { - remove(frag_target.buff_model); + delete(frag_target.buff_model); frag_target.buff_model = NULL; } } @@ -788,7 +788,7 @@ bool buffs_RemovePlayer(entity player) { if(player.buff_model) { - remove(player.buff_model); + delete(player.buff_model); player.buff_model = NULL; } @@ -986,7 +986,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink) } else { - remove(player.buff_model); + delete(player.buff_model); player.buff_model = NULL; player.effects &= ~(EF_NOSHADOW); diff --git a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc index 8de4f2b854..c705ea0d1c 100644 --- a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc @@ -49,7 +49,7 @@ CLASS(DamageText, Object) this.time_prev = time; setorigin(this, this.origin + dt * this.velocity); this.alpha -= dt * this.fade_rate; - if (this.alpha < 0) remove(this); + if (this.alpha < 0) delete(this); vector pos = project_3d_to_2d(this.origin) + autocvar_cl_damagetext_offset; if (pos.z >= 0 && this.m_size > 0) { pos.z = 0; diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc index 34f3825680..25edbb225c 100644 --- a/qcsrc/common/mutators/mutator/instagib/instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -24,7 +24,7 @@ REGISTER_MUTATOR(mutator_instagib, cvar("g_instagib") && !g_nexball); spawnfunc(item_minst_cells) { - if (!g_instagib) { remove(this); return; } + if (!g_instagib) { delete(this); return; } if (!this.ammo_cells) this.ammo_cells = autocvar_g_instagib_ammo_drop; StartItem(this, ITEM_VaporizerCells); } diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 5570a1b084..38510ac00d 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -163,7 +163,7 @@ void nade_timer_think(entity this) this.skin = 8 - (this.owner.wait - time) / (autocvar_g_nades_nade_lifetime / 10); this.nextthink = time; if(!this.owner || wasfreed(this.owner)) - remove(this); + delete(this); } void nade_burn_spawn(entity _nade) @@ -232,13 +232,13 @@ void napalm_ball_think(entity this) if(round_handler_IsActive()) if(!round_handler_IsRoundStarted()) { - remove(this); + delete(this); return; } if(time > this.pushltime) { - remove(this); + delete(this); return; } @@ -306,13 +306,13 @@ void napalm_fountain_think(entity this) if(round_handler_IsActive()) if(!round_handler_IsRoundStarted()) { - remove(this); + delete(this); return; } if(time >= this.ltime) { - remove(this); + delete(this); return; } @@ -379,7 +379,7 @@ void nade_ice_think(entity this) if(round_handler_IsActive()) if(!round_handler_IsRoundStarted()) { - remove(this); + delete(this); return; } @@ -396,7 +396,7 @@ void nade_ice_think(entity this) Damage_DamageInfo(this.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage, autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, this.projectiledeathtype, 0, this); } - remove(this); + delete(this); return; } @@ -502,7 +502,7 @@ void nade_spawn_boom(entity this) if(this.realowner.nade_spawnloc) { - remove(this.realowner.nade_spawnloc); + delete(this.realowner.nade_spawnloc); this.realowner.nade_spawnloc = NULL; } @@ -513,7 +513,7 @@ void nades_orb_think(entity this) { if(time >= this.ltime) { - remove(this); + delete(this); return; } @@ -737,7 +737,7 @@ void nade_boom(entity this) RemoveGrapplingHook(it.realowner); }); - remove(this); + delete(this); } void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, string pntype); @@ -771,7 +771,7 @@ void nade_touch(entity this, entity toucher) { nade_pickup(toucher, this); sound(this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, 0.5 *(ATTEN_LARGE + ATTEN_MAX)); - remove(this); + delete(this); return; } /*float is_weapclip = 0; @@ -786,7 +786,7 @@ void nade_touch(entity this, entity toucher) if(it.classname == "grapplinghook") RemoveGrapplingHook(it.realowner); }); - remove(this); + delete(this); return; } @@ -884,7 +884,7 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time) entity _nade = e.nade; e.nade = NULL; - remove(e.fake_nade); + delete(e.fake_nade); e.fake_nade = NULL; makevectors(e.v_angle); @@ -1065,10 +1065,10 @@ void nade_prime(entity this) return; // only allow bonus nades if(this.nade) - remove(this.nade); + delete(this.nade); if(this.fake_nade) - remove(this.fake_nade); + delete(this.fake_nade); int ntype; string pntype = this.pokenade_type; @@ -1149,9 +1149,9 @@ void nades_CheckThrow(entity this) void nades_Clear(entity player) { if(player.nade) - remove(player.nade); + delete(player.nade); if(player.fake_nade) - remove(player.fake_nade); + delete(player.fake_nade); player.nade = player.fake_nade = NULL; player.nade_timer = 0; @@ -1349,7 +1349,7 @@ MUTATOR_HOOKFUNCTION(nades, PlayerSpawn) if(player.nade_spawnloc.cnt <= 0) { - remove(player.nade_spawnloc); + delete(player.nade_spawnloc); player.nade_spawnloc = NULL; } } diff --git a/qcsrc/common/mutators/mutator/overkill/overkill.qc b/qcsrc/common/mutators/mutator/overkill/overkill.qc index ef76ab5151..2aeab7be48 100644 --- a/qcsrc/common/mutators/mutator/overkill/overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/overkill.qc @@ -157,7 +157,7 @@ MUTATOR_HOOKFUNCTION(ok, MonsterDropItem) entity olditem = M_ARGV(1, entity); entity frag_attacker = M_ARGV(2, entity); - remove(olditem); + delete(olditem); M_ARGV(1, entity) = NULL; diff --git a/qcsrc/common/mutators/mutator/overkill/rpc.qc b/qcsrc/common/mutators/mutator/overkill/rpc.qc index 4c59f183a3..bd1386cd0a 100644 --- a/qcsrc/common/mutators/mutator/overkill/rpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/rpc.qc @@ -57,7 +57,7 @@ void W_RocketPropelledChainsaw_Explode(entity this, entity directhitentity) RadiusDamage (this, this.realowner, WEP_CVAR(rpc, damage), WEP_CVAR(rpc, edgedamage), WEP_CVAR(rpc, radius), NULL, NULL, WEP_CVAR(rpc, force), this.projectiledeathtype, directhitentity); - remove (this); + delete (this); } void W_RocketPropelledChainsaw_Explode_think(entity this) @@ -92,7 +92,7 @@ void W_RocketPropelledChainsaw_Think(entity this) { if(this.cnt <= time) { - remove(this); + delete(this); return; } diff --git a/qcsrc/common/mutators/mutator/physical_items/physical_items.qc b/qcsrc/common/mutators/mutator/physical_items/physical_items.qc index 8e9d4699e8..56705cbd29 100644 --- a/qcsrc/common/mutators/mutator/physical_items/physical_items.qc +++ b/qcsrc/common/mutators/mutator/physical_items/physical_items.qc @@ -65,7 +65,7 @@ void physical_item_think(entity this) } if(!this.owner.modelindex) - remove(this); // the real item is gone, remove this + delete(this); // the real item is gone, remove this } void physical_item_touch(entity this, entity toucher) diff --git a/qcsrc/common/mutators/mutator/sandbox/sandbox.qc b/qcsrc/common/mutators/mutator/sandbox/sandbox.qc index 6adc964be4..577e29c6b0 100644 --- a/qcsrc/common/mutators/mutator/sandbox/sandbox.qc +++ b/qcsrc/common/mutators/mutator/sandbox/sandbox.qc @@ -217,7 +217,7 @@ void sandbox_ObjectRemove(entity e) if(e.netname) { strunzone(e.netname); e.netname = string_null; } if(e.message) { strunzone(e.message); e.message = string_null; } if(e.message2) { strunzone(e.message2); e.message2 = string_null; } - remove(e); + delete(e); e = NULL; object_count -= 1; diff --git a/qcsrc/common/mutators/mutator/superspec/superspec.qc b/qcsrc/common/mutators/mutator/superspec/superspec.qc index 786796866c..cf6a7bf5e2 100644 --- a/qcsrc/common/mutators/mutator/superspec/superspec.qc +++ b/qcsrc/common/mutators/mutator/superspec/superspec.qc @@ -383,7 +383,7 @@ void superspec_hello(entity this) if(this.enemy.crypto_idfp == "") Send_Notification(NOTIF_ONE_ONLY, this.enemy, MSG_INFO, INFO_SUPERSPEC_MISSING_UID); - remove(this); + delete(this); } MUTATOR_HOOKFUNCTION(superspec, ClientConnect) diff --git a/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc index 67e14403c5..c585e7e906 100644 --- a/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc +++ b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc @@ -19,7 +19,7 @@ void PlayerTouchExplode(entity p1, entity p2) entity e = spawn(); setorigin(e, org); RadiusDamage(e, NULL, autocvar_g_touchexplode_damage, autocvar_g_touchexplode_edgedamage, autocvar_g_touchexplode_radius, NULL, NULL, autocvar_g_touchexplode_force, DEATH_TOUCHEXPLODE.m_id, NULL); - remove(e); + delete(e); } MUTATOR_HOOKFUNCTION(touchexplode, PlayerPreThink) diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 070379b4ae..91869de770 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -888,7 +888,7 @@ void WaypointSprite_Kill(entity wp) { if (!wp) return; if (wp.owner) wp.owner.(wp.owned_by_field) = NULL; - remove(wp); + delete(wp); } void WaypointSprite_Disown(entity wp, float fadetime) @@ -1021,7 +1021,7 @@ entity WaypointSprite_Spawn( if (own) { if (own.(ownfield)) - remove(own.(ownfield)); + delete(own.(ownfield)); own.(ownfield) = wp; wp.owned_by_field = ownfield; } diff --git a/qcsrc/common/notifications/all.qc b/qcsrc/common/notifications/all.qc index 853280d6e0..d1aa1dbf96 100644 --- a/qcsrc/common/notifications/all.qc +++ b/qcsrc/common/notifications/all.qc @@ -153,7 +153,7 @@ void Destroy_Notification_Entity(entity notif) if (notif.nent_icon != "") strunzone(notif.nent_icon); if (notif.nent_durcnt != "") strunzone(notif.nent_durcnt); if (notif.nent_string != "") strunzone(notif.nent_string); - remove(notif); + delete(notif); } void Destroy_All_Notifications() @@ -1491,7 +1491,7 @@ void Net_Notification_Remove(entity this) )); #endif for (int i = 0; i < this.nent_stringcount; ++i) { if (this.nent_strings[i]) strunzone(this.nent_strings[i]); } - remove(this); + delete(this); } bool Net_Write_Notification(entity this, entity client, int sf) diff --git a/qcsrc/common/state.qc b/qcsrc/common/state.qc index 7c6882088d..e73bfa24fd 100644 --- a/qcsrc/common/state.qc +++ b/qcsrc/common/state.qc @@ -23,7 +23,7 @@ void PlayerState_detach(entity this) if (ps.m_client != this) return; // don't own state, spectator FOREACH_CLIENT(PS(it) == ps, { PS(it) = NULL; }); - remove(ps); + delete(ps); Inventory_delete(this); } @@ -73,7 +73,7 @@ void PlayerScore_Detach(entity this); void ClientState_detach(entity this) { - remove(CS(this)); + delete(CS(this)); this._cs = NULL; GetCvars(this, -1); // free cvars diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 8563349fd9..e67155a069 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -768,7 +768,7 @@ void Item_Touch(entity this, entity toucher) { if (ITEM_TOUCH_NEEDKILL()) { - remove(this); + delete(this); return; } } @@ -817,7 +817,7 @@ LABEL(pickup) _sound (toucher, (this.itemdef.instanceOfPowerup ? CH_TRIGGER_SINGLE : CH_TRIGGER), (this.item_pickupsound ? this.item_pickupsound : Sound_fixpath(this.item_pickupsound_ent)), VOL_BASE, ATTEN_NORM); if (this.classname == "droppedweapon") - remove (this); + delete (this); else if (this.spawnshieldtime) { entity e; @@ -904,7 +904,7 @@ void RemoveItem(entity this) { if(wasfreed(this) || !this) { return; } Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1); - remove(this); + delete(this); } // pickup evaluation functions @@ -1069,7 +1069,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default if(MUTATOR_CALLHOOK(FilterItem, this)) // error means we do not want the item { startitem_failed = true; - remove(this); + delete(this); return; } @@ -1098,7 +1098,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default if (trace_dpstartcontents & DPCONTENTS_NODROP) { startitem_failed = true; - remove(this); + delete(this); return; } } @@ -1107,7 +1107,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default if(!have_pickup_item(this)) { startitem_failed = true; - remove (this); + delete (this); return; } @@ -1226,7 +1226,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default if (MUTATOR_CALLHOOK(Item_Spawn, this)) { startitem_failed = true; - remove(this); + delete(this); return; } } @@ -1423,7 +1423,7 @@ void target_items_use(entity this, entity actor, entity trigger) if(actor.classname == "droppedweapon") { EXACTTRIGGER_TOUCH(this, trigger); - remove(actor); + delete(actor); return; } @@ -1439,7 +1439,7 @@ void target_items_use(entity this, entity actor, entity trigger) FOREACH_ENTITY_ENT(enemy, actor, { if(it.classname == "droppedweapon") - remove(it); + delete(it); }); if(GiveItems(actor, 0, tokenize_console(this.netname))) diff --git a/qcsrc/common/triggers/misc/follow.qc b/qcsrc/common/triggers/misc/follow.qc index fa242beb97..d19d9da085 100644 --- a/qcsrc/common/triggers/misc/follow.qc +++ b/qcsrc/common/triggers/misc/follow.qc @@ -41,7 +41,7 @@ void follow_init(entity this) } dst.solid = SOLID_NOT; // solid doesn't work with attachment - remove(this); + delete(this); } else { @@ -58,7 +58,7 @@ void follow_init(entity this) follow_sameorigin(dst, src); } - remove(this); + delete(this); } } diff --git a/qcsrc/common/triggers/platforms.qc b/qcsrc/common/triggers/platforms.qc index 391172fe0f..7b9ffd9c50 100644 --- a/qcsrc/common/triggers/platforms.qc +++ b/qcsrc/common/triggers/platforms.qc @@ -53,7 +53,7 @@ void plat_spawn_inside_trigger(entity this) } // otherwise, something is fishy... - remove(trigger); + delete(trigger); objerror(this, "plat_spawn_inside_trigger: platform has odd size or lip, can't spawn"); } diff --git a/qcsrc/common/triggers/subs.qc b/qcsrc/common/triggers/subs.qc index 3120aa33d9..66f0253d95 100644 --- a/qcsrc/common/triggers/subs.qc +++ b/qcsrc/common/triggers/subs.qc @@ -40,7 +40,7 @@ void SUB_VanishOrRemove (entity ent) else { // remove - remove (ent); + delete (ent); } } @@ -144,7 +144,7 @@ void SUB_CalcMove_controller_think (entity this) // derivative: delta + 2 * delta2 (e.g. for angle positioning) entity own = this.owner; SUB_THINK(own, this.think1); - remove(this); + delete(this); SUB_THUNK(own)(own); } } diff --git a/qcsrc/common/triggers/target/speaker.qc b/qcsrc/common/triggers/target/speaker.qc index 7db93a3d1e..f8f1c0ace5 100644 --- a/qcsrc/common/triggers/target/speaker.qc +++ b/qcsrc/common/triggers/target/speaker.qc @@ -115,7 +115,7 @@ spawnfunc(target_speaker) else if(this.spawnflags & 1) // LOOPED_ON { ambientsound (this.origin, this.noise, VOL_BASE * this.volume, this.atten); - remove(this); + delete(this); } else if(this.spawnflags & 2) // LOOPED_OFF { @@ -125,7 +125,7 @@ spawnfunc(target_speaker) { // Quake/Nexuiz fallback ambientsound (this.origin, this.noise, VOL_BASE * this.volume, this.atten); - remove(this); + delete(this); } } #endif diff --git a/qcsrc/common/triggers/trigger/gamestart.qc b/qcsrc/common/triggers/trigger/gamestart.qc index efddf8c77f..62b21e66f4 100644 --- a/qcsrc/common/triggers/trigger/gamestart.qc +++ b/qcsrc/common/triggers/trigger/gamestart.qc @@ -2,7 +2,7 @@ void gamestart_use(entity this, entity actor, entity trigger) { SUB_UseTargets(this, this, trigger); - remove(this); + delete(this); } void gamestart_use_this(entity this) diff --git a/qcsrc/common/triggers/trigger/gravity.qc b/qcsrc/common/triggers/trigger/gravity.qc index cef8cb8bbe..88b73c4dfc 100644 --- a/qcsrc/common/triggers/trigger/gravity.qc +++ b/qcsrc/common/triggers/trigger/gravity.qc @@ -6,7 +6,7 @@ void trigger_gravity_remove(entity own) { UpdateCSQCProjectile(own); own.gravity = own.trigger_gravity_check.gravity; - remove(own.trigger_gravity_check); + delete(own.trigger_gravity_check); } else backtrace("Removing a trigger_gravity_check with no valid owner"); @@ -22,7 +22,7 @@ void trigger_gravity_check_think(entity this) if(this.owner.trigger_gravity_check == this) trigger_gravity_remove(this.owner); else - remove(this); + delete(this); return; } else diff --git a/qcsrc/common/triggers/trigger/impulse.qc b/qcsrc/common/triggers/trigger/impulse.qc index cdf4a72918..43bac947e1 100644 --- a/qcsrc/common/triggers/trigger/impulse.qc +++ b/qcsrc/common/triggers/trigger/impulse.qc @@ -17,7 +17,7 @@ void trigger_impulse_touch1(entity this, entity toucher) if(!targ) { objerror(this, "trigger_force without a (valid) .target!\n"); - remove(this); + delete(this); return; } diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index 5ec7b41fd4..08da5e3e6b 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -292,7 +292,7 @@ void trigger_push_findtarget(entity this) tracetoss(e, e); if(e.move_movetype == MOVETYPE_NONE) waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity)); - remove(e); + delete(e); #endif } @@ -324,7 +324,7 @@ void trigger_push_findtarget(entity this) e.velocity = this.movedir; tracetoss(e, e); waypoint_spawnforteleporter(this, trace_endpos, vlen(trace_endpos - org) / vlen(e.velocity)); - remove(e); + delete(e); } trigger_push_link(this); diff --git a/qcsrc/common/triggers/trigger/keylock.qc b/qcsrc/common/triggers/trigger/keylock.qc index 2cc81e597c..eabb84f57a 100644 --- a/qcsrc/common/triggers/trigger/keylock.qc +++ b/qcsrc/common/triggers/trigger/keylock.qc @@ -15,7 +15,7 @@ void trigger_keylock_kill(string s) { entity t; for(t = NULL; (t = find(t, targetname, s)); ) - remove(t); + delete(t); } void trigger_keylock_touch(entity this, entity toucher) @@ -74,7 +74,7 @@ void trigger_keylock_touch(entity this, entity toucher) if(this.killtarget) trigger_keylock_kill(this.killtarget); - remove(this); + delete(this); } } @@ -121,7 +121,7 @@ message2 and noise2 will be resent to the player every 2 seconds while he is in */ spawnfunc(trigger_keylock) { - if(!this.itemkeys) { remove(this); return; } + if(!this.itemkeys) { delete(this); return; } // set unlocked message if(this.message == "") diff --git a/qcsrc/common/triggers/trigger/secret.qc b/qcsrc/common/triggers/trigger/secret.qc index b54f99dcd4..9260c01ac2 100644 --- a/qcsrc/common/triggers/trigger/secret.qc +++ b/qcsrc/common/triggers/trigger/secret.qc @@ -34,7 +34,7 @@ void trigger_secret_touch(entity this, entity toucher) // handle normal trigger features multi_touch(this, toucher); - remove(this); + delete(this); } /*QUAKED trigger_secret (.5 .5 .5) ? diff --git a/qcsrc/common/triggers/trigger/swamp.qc b/qcsrc/common/triggers/trigger/swamp.qc index 0f8d1a73ee..99eb846c73 100644 --- a/qcsrc/common/triggers/trigger/swamp.qc +++ b/qcsrc/common/triggers/trigger/swamp.qc @@ -45,7 +45,7 @@ void swampslug_think(entity this) if(this.health <= 0) { this.owner.in_swamp = 0; - remove(this); + delete(this); //centerprint(this.owner,"Killing slug...\n"); return; } diff --git a/qcsrc/common/triggers/trigger/viewloc.qc b/qcsrc/common/triggers/trigger/viewloc.qc index 9d675bbc73..f2a0e86cc3 100644 --- a/qcsrc/common/triggers/trigger/viewloc.qc +++ b/qcsrc/common/triggers/trigger/viewloc.qc @@ -71,7 +71,7 @@ void viewloc_init(entity this) break; } - if(!this.enemy) { LOG_INFO("^1FAIL!\n"); remove(this); return; } + if(!this.enemy) { LOG_INFO("^1FAIL!\n"); delete(this); return; } if(!this.goalentity) this.goalentity = this.enemy; // make them match so CSQC knows what to do @@ -85,7 +85,7 @@ void viewloc_init(entity this) spawnfunc(trigger_viewlocation) { // we won't check target2 here yet, as it may not even need to exist - if(this.target == "") { LOG_INFO("^1FAIL!\n"); remove(this); return; } + if(this.target == "") { LOG_INFO("^1FAIL!\n"); delete(this); return; } EXACTTRIGGER_INIT; InitializeEntity(this, viewloc_init, INITPRIO_FINDTARGET); diff --git a/qcsrc/common/triggers/triggers.qc b/qcsrc/common/triggers/triggers.qc index a9050357f6..849d3e8acb 100644 --- a/qcsrc/common/triggers/triggers.qc +++ b/qcsrc/common/triggers/triggers.qc @@ -5,7 +5,7 @@ void SUB_UseTargets(entity this, entity actor, entity trigger); void DelayThink(entity this) { SUB_UseTargets (this, this.enemy, NULL); - remove(this); + delete(this); } void FixSize(entity e) @@ -225,7 +225,7 @@ void SUB_UseTargets(entity this, entity actor, entity trigger) if (s != "") { for(entity t = NULL; (t = find(t, targetname, s)); ) - remove(t); + delete(t); } #endif diff --git a/qcsrc/common/turrets/cl_turrets.qc b/qcsrc/common/turrets/cl_turrets.qc index 8fd5cb08cf..79f1f216ff 100644 --- a/qcsrc/common/turrets/cl_turrets.qc +++ b/qcsrc/common/turrets/cl_turrets.qc @@ -1,6 +1,6 @@ void turret_remove(entity this) { - remove(this.tur_head); + delete(this.tur_head); //remove(this.enemy); this.tur_head = NULL; } @@ -259,14 +259,14 @@ void turret_gib_draw(entity this) if(time >= this.nextthink) { turret_gibboom(this); - remove(this); + delete(this); } } else { this.alpha = bound(0, this.nextthink - time, 1); if(this.alpha < ALPHA_MIN_VISIBLE) - remove(this); + delete(this); } } diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index 71181f209e..d5191698f6 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -193,8 +193,8 @@ void turret_die(entity this) { tur.tr_death(tur, this); - remove(this.tur_head); - remove(this); + delete(this.tur_head); + delete(this); } else { @@ -440,7 +440,7 @@ void turret_projectile_explode(entity this) #else RadiusDamage (this, this.realowner, this.owner.shot_dmg, 0, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL); #endif - remove(this); + delete(this); } void turret_projectile_touch(entity this, entity toucher) diff --git a/qcsrc/common/turrets/targettrigger.qc b/qcsrc/common/turrets/targettrigger.qc index 62ed2fb722..ca94f2b4e1 100644 --- a/qcsrc/common/turrets/targettrigger.qc +++ b/qcsrc/common/turrets/targettrigger.qc @@ -16,7 +16,7 @@ void turret_targettrigger_touch(entity this, entity toucher) */ spawnfunc(turret_targettrigger) { - if(!autocvar_g_turrets) { remove(this); return; } + if(!autocvar_g_turrets) { delete(this); return; } InitTrigger(this); diff --git a/qcsrc/common/turrets/turret/ewheel.qc b/qcsrc/common/turrets/turret/ewheel.qc index 62d7222ce4..4c6f1981b4 100644 --- a/qcsrc/common/turrets/turret/ewheel.qc +++ b/qcsrc/common/turrets/turret/ewheel.qc @@ -133,7 +133,7 @@ void ewheel_move_idle(entity this) movelib_brake_simple(this, (autocvar_g_turrets_unit_ewheel_speed_stop)); } -spawnfunc(turret_ewheel) { if(!turret_initialize(this, TUR_EWHEEL)) remove(this); } +spawnfunc(turret_ewheel) { if(!turret_initialize(this, TUR_EWHEEL)) delete(this); } METHOD(EWheel, tr_think, void(EWheel thistur, entity it)) { diff --git a/qcsrc/common/turrets/turret/flac.qc b/qcsrc/common/turrets/turret/flac.qc index 64b32d4a7c..20eeb77595 100644 --- a/qcsrc/common/turrets/turret/flac.qc +++ b/qcsrc/common/turrets/turret/flac.qc @@ -22,7 +22,7 @@ REGISTER_TURRET(FLAC, NEW(Flac)); #ifdef SVQC -spawnfunc(turret_flac) { if (!turret_initialize(this, TUR_FLAC)) remove(this); } +spawnfunc(turret_flac) { if (!turret_initialize(this, TUR_FLAC)) delete(this); } METHOD(Flac, tr_setup, void(Flac this, entity it)) { diff --git a/qcsrc/common/turrets/turret/flac_weapon.qc b/qcsrc/common/turrets/turret/flac_weapon.qc index 3037f65d0d..2462433374 100644 --- a/qcsrc/common/turrets/turret/flac_weapon.qc +++ b/qcsrc/common/turrets/turret/flac_weapon.qc @@ -49,7 +49,7 @@ void turret_flac_projectile_think_explode(entity this) #else RadiusDamage (this, this.realowner, this.owner.shot_dmg, this.owner.shot_dmg, this.owner.shot_radius, this, NULL, this.owner.shot_force, this.totalfrags, NULL); #endif - remove(this); + delete(this); } #endif diff --git a/qcsrc/common/turrets/turret/fusionreactor.qc b/qcsrc/common/turrets/turret/fusionreactor.qc index 945b35dd0a..cd7dbec72d 100644 --- a/qcsrc/common/turrets/turret/fusionreactor.qc +++ b/qcsrc/common/turrets/turret/fusionreactor.qc @@ -46,7 +46,7 @@ bool turret_fusionreactor_firecheck(entity this) return true; } -spawnfunc(turret_fusionreactor) { if (!turret_initialize(this, TUR_FUSIONREACTOR)) remove(this); } +spawnfunc(turret_fusionreactor) { if (!turret_initialize(this, TUR_FUSIONREACTOR)) delete(this); } METHOD(FusionReactor, tr_attack, void(FusionReactor this, entity it)) { diff --git a/qcsrc/common/turrets/turret/hellion.qc b/qcsrc/common/turrets/turret/hellion.qc index fde81bfea0..61203ddf75 100644 --- a/qcsrc/common/turrets/turret/hellion.qc +++ b/qcsrc/common/turrets/turret/hellion.qc @@ -22,7 +22,7 @@ REGISTER_TURRET(HELLION, NEW(Hellion)); #ifdef SVQC -spawnfunc(turret_hellion) { if (!turret_initialize(this, TUR_HELLION)) remove(this); } +spawnfunc(turret_hellion) { if (!turret_initialize(this, TUR_HELLION)) delete(this); } METHOD(Hellion, tr_think, void(Hellion thistur, entity it)) { diff --git a/qcsrc/common/turrets/turret/hk.qc b/qcsrc/common/turrets/turret/hk.qc index da107922f1..9cb60df4c6 100644 --- a/qcsrc/common/turrets/turret/hk.qc +++ b/qcsrc/common/turrets/turret/hk.qc @@ -28,7 +28,7 @@ REGISTER_TURRET(HK, NEW(HunterKiller)); .float atime; #endif -spawnfunc(turret_hk) { if(!turret_initialize(this, TUR_HK)) remove(this); } +spawnfunc(turret_hk) { if(!turret_initialize(this, TUR_HK)) delete(this); } METHOD(HunterKiller, tr_think, void(HunterKiller thistur, entity it)) { diff --git a/qcsrc/common/turrets/turret/machinegun.qc b/qcsrc/common/turrets/turret/machinegun.qc index 5dac49efc7..8addd95428 100644 --- a/qcsrc/common/turrets/turret/machinegun.qc +++ b/qcsrc/common/turrets/turret/machinegun.qc @@ -22,7 +22,7 @@ REGISTER_TURRET(MACHINEGUN, NEW(MachineGunTurret)); #ifdef SVQC -spawnfunc(turret_machinegun) { if (!turret_initialize(this, TUR_MACHINEGUN)) remove(this); } +spawnfunc(turret_machinegun) { if (!turret_initialize(this, TUR_MACHINEGUN)) delete(this); } METHOD(MachineGunTurret, tr_setup, void(MachineGunTurret this, entity it)) { diff --git a/qcsrc/common/turrets/turret/mlrs.qc b/qcsrc/common/turrets/turret/mlrs.qc index bce27118a2..0d6e9e9e90 100644 --- a/qcsrc/common/turrets/turret/mlrs.qc +++ b/qcsrc/common/turrets/turret/mlrs.qc @@ -22,7 +22,7 @@ REGISTER_TURRET(MLRS, NEW(MLRSTurret)); #ifdef SVQC -spawnfunc(turret_mlrs) { if (!turret_initialize(this, TUR_MLRS)) remove(this); } +spawnfunc(turret_mlrs) { if (!turret_initialize(this, TUR_MLRS)) delete(this); } METHOD(MLRSTurret, tr_think, void(MLRSTurret thistur, entity it)) { diff --git a/qcsrc/common/turrets/turret/phaser.qc b/qcsrc/common/turrets/turret/phaser.qc index f604b04669..7c5d336212 100644 --- a/qcsrc/common/turrets/turret/phaser.qc +++ b/qcsrc/common/turrets/turret/phaser.qc @@ -22,7 +22,7 @@ REGISTER_TURRET(PHASER, NEW(PhaserTurret)); #ifdef SVQC -spawnfunc(turret_phaser) { if (!turret_initialize(this, TUR_PHASER)) remove(this); } +spawnfunc(turret_phaser) { if (!turret_initialize(this, TUR_PHASER)) delete(this); } .int fireflag; diff --git a/qcsrc/common/turrets/turret/phaser_weapon.qc b/qcsrc/common/turrets/turret/phaser_weapon.qc index df68e1ce7f..0ddfd153d0 100644 --- a/qcsrc/common/turrets/turret/phaser_weapon.qc +++ b/qcsrc/common/turrets/turret/phaser_weapon.qc @@ -60,7 +60,7 @@ void beam_think(entity this) this.owner.fireflag = 2; this.owner.tur_head.frame = 10; sound (this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM); - remove(this); + delete(this); return; } diff --git a/qcsrc/common/turrets/turret/plasma.qc b/qcsrc/common/turrets/turret/plasma.qc index 7b71ccfc7f..82aa1abe67 100644 --- a/qcsrc/common/turrets/turret/plasma.qc +++ b/qcsrc/common/turrets/turret/plasma.qc @@ -22,7 +22,7 @@ REGISTER_TURRET(PLASMA, NEW(PlasmaTurret)); #ifdef SVQC -spawnfunc(turret_plasma) { if (!turret_initialize(this, TUR_PLASMA)) remove(this); } +spawnfunc(turret_plasma) { if (!turret_initialize(this, TUR_PLASMA)) delete(this); } METHOD(PlasmaTurret, tr_attack, void(PlasmaTurret this, entity it)) { diff --git a/qcsrc/common/turrets/turret/plasma_dual.qc b/qcsrc/common/turrets/turret/plasma_dual.qc index 86df15059b..9430bc6921 100644 --- a/qcsrc/common/turrets/turret/plasma_dual.qc +++ b/qcsrc/common/turrets/turret/plasma_dual.qc @@ -28,7 +28,7 @@ REGISTER_TURRET(PLASMA_DUAL, NEW(DualPlasmaTurret)); #ifdef SVQC -spawnfunc(turret_plasma_dual) { if (!turret_initialize(this, TUR_PLASMA_DUAL)) remove(this); } +spawnfunc(turret_plasma_dual) { if (!turret_initialize(this, TUR_PLASMA_DUAL)) delete(this); } METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret thistur, entity it)) { diff --git a/qcsrc/common/turrets/turret/tesla.qc b/qcsrc/common/turrets/turret/tesla.qc index cdc6ba3ceb..b0755f32b5 100644 --- a/qcsrc/common/turrets/turret/tesla.qc +++ b/qcsrc/common/turrets/turret/tesla.qc @@ -22,7 +22,7 @@ REGISTER_TURRET(TESLA, NEW(TeslaCoil)); #ifdef SVQC -spawnfunc(turret_tesla) { if (!turret_initialize(this, TUR_TESLA)) remove(this); } +spawnfunc(turret_tesla) { if (!turret_initialize(this, TUR_TESLA)) delete(this); } METHOD(TeslaCoil, tr_think, void(TeslaCoil thistur, entity it)) { diff --git a/qcsrc/common/turrets/turret/tesla_weapon.qc b/qcsrc/common/turrets/turret/tesla_weapon.qc index 38a9335f7a..4fe5109d7d 100644 --- a/qcsrc/common/turrets/turret/tesla_weapon.qc +++ b/qcsrc/common/turrets/turret/tesla_weapon.qc @@ -27,7 +27,7 @@ METHOD(TeslaCoilTurretAttack, wr_think, void(entity thiswep, entity actor, .enti actor.target_validate_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_MISSILES | TFL_TARGETSELECT_RANGELIMITS | TFL_TARGETSELECT_TEAMCHECK; entity t = toast(actor, e,r,d); - remove(e); + delete(e); if (t == NULL) return; diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index 3f55280e8f..39264c38e0 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -100,7 +100,7 @@ void walker_setnoanim(entity this) void walker_rocket_explode(entity this) { RadiusDamage (this, this.owner, (autocvar_g_turrets_unit_walker_rocket_damage), 0, (autocvar_g_turrets_unit_walker_rocket_radius), this, NULL, (autocvar_g_turrets_unit_walker_rocket_force), DEATH_TURRET_WALK_ROCKET.m_id, NULL); - remove (this); + delete (this); } void walker_rocket_touch(entity this, entity toucher) @@ -344,7 +344,7 @@ void walker_move_path(entity this) #endif } -spawnfunc(turret_walker) { if(!turret_initialize(this, TUR_WALKER)) remove(this); } +spawnfunc(turret_walker) { if(!turret_initialize(this, TUR_WALKER)) delete(this); } METHOD(WalkerTurret, tr_think, void(WalkerTurret thistur, entity it)) { diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index d04fdecd68..70ecc3340e 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -635,7 +635,7 @@ int cvar_settemp_restore() cvar_set(it.netname, it.message); strunzone(it.netname); strunzone(it.message); - remove(it); + delete(it); ++j; } else @@ -649,7 +649,7 @@ int cvar_settemp_restore() if(cvar_type(e.netname)) { cvar_set(e.netname, e.message); - remove(e); + delete(e); ++j; } else diff --git a/qcsrc/common/vehicles/cl_vehicles.qc b/qcsrc/common/vehicles/cl_vehicles.qc index aeb7de83b7..439e34dd0f 100644 --- a/qcsrc/common/vehicles/cl_vehicles.qc +++ b/qcsrc/common/vehicles/cl_vehicles.qc @@ -104,7 +104,7 @@ NET_HANDLE(TE_CSQC_VEHICLESETUP, bool isnew) if(axh != NULL && !wasfreed(axh)) { AuxiliaryXhair[i] = NULL; - remove(axh); + delete(axh); } } return; @@ -116,7 +116,7 @@ NET_HANDLE(TE_CSQC_VEHICLESETUP, bool isnew) entity axh = AuxiliaryXhair[i]; if(axh != NULL && !wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) - remove(axh); + delete(axh); axh = spawn(); axh.draw2d = func_null; diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index 4fd9a0d523..e529d4ad70 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -214,7 +214,7 @@ void vehicles_projectile_explode(entity this, entity toucher) this.event_damage = func_null; RadiusDamage (this, this.realowner, this.shot_dmg, 0, this.shot_radius, this, NULL, this.shot_force, this.totalfrags, toucher); - remove (this); + delete (this); } void vehicles_projectile_explode_think(entity this) @@ -285,7 +285,7 @@ void vehicles_gib_explode(entity this) sound (this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM); Send_Effect(EFFECT_EXPLOSION_SMALL, randomvec() * 80 + (this.origin + '0 0 100'), '0 0 0', 1); Send_Effect(EFFECT_EXPLOSION_SMALL, this.wp00.origin + '0 0 64', '0 0 0', 1); - remove(this); + delete(this); } void vehicles_gib_touch(entity this, entity toucher) @@ -297,7 +297,7 @@ void vehicles_gib_think(entity this) { this.alpha -= 0.1; if(this.cnt >= time) - remove(this); + delete(this); else this.nextthink = time + 0.1; } @@ -457,7 +457,7 @@ void vehicles_return(entity this) if(this.waypointsprite_attached) WaypointSprite_Kill(this.waypointsprite_attached); - remove(this); + delete(this); } void vehicles_showwp_goaway(entity this) @@ -465,7 +465,7 @@ void vehicles_showwp_goaway(entity this) if(this.waypointsprite_attached) WaypointSprite_Kill(this.waypointsprite_attached); - remove(this); + delete(this); } void vehicles_showwp(entity this) diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qc b/qcsrc/common/vehicles/vehicle/bumblebee.qc index ff7f333ab2..91964a9d59 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qc @@ -701,7 +701,7 @@ void bumblebee_blowup(entity this) if(this.owner.deadflag == DEAD_DYING) this.owner.deadflag = DEAD_DEAD; - remove(this); + delete(this); } void bumblebee_dead_touch(entity this, entity toucher) @@ -725,8 +725,8 @@ void bumblebee_diethink(entity this) spawnfunc(vehicle_bumblebee) { - if(!autocvar_g_vehicle_bumblebee) { remove(this); return; } - if(!vehicle_initialize(this, VEH_BUMBLEBEE, false)) { remove(this); return; } + if(!autocvar_g_vehicle_bumblebee) { delete(this); return; } + if(!vehicle_initialize(this, VEH_BUMBLEBEE, false)) { delete(this); return; } } METHOD(Bumblebee, vr_impact, void(Bumblebee thisveh, entity instance)) diff --git a/qcsrc/common/vehicles/vehicle/racer.qc b/qcsrc/common/vehicles/vehicle/racer.qc index 277326ffd2..6b08bf6515 100644 --- a/qcsrc/common/vehicles/vehicle/racer.qc +++ b/qcsrc/common/vehicles/vehicle/racer.qc @@ -521,8 +521,8 @@ void racer_deadtouch(entity this, entity toucher) spawnfunc(vehicle_racer) { - if(!autocvar_g_vehicle_racer) { remove(this); return; } - if(!vehicle_initialize(this, VEH_RACER, false)) { remove(this); return; } + if(!autocvar_g_vehicle_racer) { delete(this); return; } + if(!vehicle_initialize(this, VEH_RACER, false)) { delete(this); return; } } #endif // SVQC diff --git a/qcsrc/common/vehicles/vehicle/raptor.qc b/qcsrc/common/vehicles/vehicle/raptor.qc index d938c4ad39..04c985c31f 100644 --- a/qcsrc/common/vehicles/vehicle/raptor.qc +++ b/qcsrc/common/vehicles/vehicle/raptor.qc @@ -600,8 +600,8 @@ bool raptor_impulse(entity this, int _imp) spawnfunc(vehicle_raptor) { - if(!autocvar_g_vehicle_raptor) { remove(this); return; } - if(!vehicle_initialize(this, VEH_RAPTOR, false)) { remove(this); return; } + if(!autocvar_g_vehicle_raptor) { delete(this); return; } + if(!vehicle_initialize(this, VEH_RAPTOR, false)) { delete(this); return; } } METHOD(Raptor, vr_impact, void(Raptor thisveh, entity instance)) diff --git a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc index 86f4b22b8b..24db99841b 100644 --- a/qcsrc/common/vehicles/vehicle/raptor_weapons.qc +++ b/qcsrc/common/vehicles/vehicle/raptor_weapons.qc @@ -91,7 +91,7 @@ void raptor_bomblet_boom(entity this) autocvar_g_vehicle_raptor_bomblet_edgedamage, autocvar_g_vehicle_raptor_bomblet_radius, NULL, NULL, autocvar_g_vehicle_raptor_bomblet_force, DEATH_VH_RAPT_BOMB.m_id, NULL); - remove(this); + delete(this); } void raptor_bomblet_touch(entity this, entity toucher) @@ -140,7 +140,7 @@ void raptor_bomb_burst(entity this) CSQCProjectile(bomblet, true, PROJECTILE_RAPTORBOMBLET, true); } - remove(this); + delete(this); } void raptor_bomb_touch(entity this, entity toucher) @@ -188,14 +188,14 @@ void raptor_bombdrop(entity this) void raptor_flare_touch(entity this, entity toucher) { - remove(this); + delete(this); } void raptor_flare_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) { this.health -= damage; if(this.health <= 0) - remove(this); + delete(this); } void raptor_flare_think(entity this) @@ -210,7 +210,7 @@ void raptor_flare_think(entity this) }); if(this.tur_impacttime < time) - remove(this); + delete(this); } #endif @@ -230,7 +230,7 @@ void RaptorCBShellfragDraw(entity this) this.alpha = bound(0, this.nextthink - time, 1); if(this.alpha < ALPHA_MIN_VISIBLE) - remove(this); + delete(this); } void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang) diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qc b/qcsrc/common/vehicles/vehicle/spiderbot.qc index 8140de8646..80d26fc2f7 100644 --- a/qcsrc/common/vehicles/vehicle/spiderbot.qc +++ b/qcsrc/common/vehicles/vehicle/spiderbot.qc @@ -400,7 +400,7 @@ void spiderbot_headfade(entity this) sound (this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM); Send_Effect(EFFECT_EXPLOSION_BIG, this.origin + '0 0 100', '0 0 0', 1); } - remove(this); + delete(this); } } @@ -531,8 +531,8 @@ bool spiderbot_impulse(entity this, int _imp) spawnfunc(vehicle_spiderbot) { - if(!autocvar_g_vehicle_spiderbot) { remove(this); return; } - if(!vehicle_initialize(this, VEH_SPIDERBOT, false)) { remove(this); return; } + if(!autocvar_g_vehicle_spiderbot) { delete(this); return; } + if(!vehicle_initialize(this, VEH_SPIDERBOT, false)) { delete(this); return; } } METHOD(Spiderbot, vr_impact, void(Spiderbot thisveh, entity instance)) diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index 897e2caef2..ea949da50c 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -392,7 +392,7 @@ void CL_WeaponEntity_SetModel(entity this, string name, bool _anim) if (name == "") { this.model = ""; - if (this.weaponchild) remove(this.weaponchild); + if (this.weaponchild) delete(this.weaponchild); this.weaponchild = NULL; this.movedir = '0 0 0'; this.spawnorigin = '0 0 0'; @@ -436,7 +436,7 @@ void CL_WeaponEntity_SetModel(entity this, string name, bool _anim) } else { - if (this.weaponchild) remove(this.weaponchild); + if (this.weaponchild) delete(this.weaponchild); this.weaponchild = NULL; } diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index 3e3af5e0f1..65b625b9a2 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -236,7 +236,7 @@ void W_Arc_Bolt_Explode(entity this, entity directhitentity) this.event_damage = func_null; RadiusDamage(this, this.realowner, WEP_CVAR(arc, bolt_damage), WEP_CVAR(arc, bolt_edgedamage), WEP_CVAR(arc, bolt_radius), NULL, NULL, WEP_CVAR(arc, bolt_force), this.projectiledeathtype, directhitentity); - remove(this); + delete(this); } void W_Arc_Bolt_Explode_use(entity this, entity actor, entity trigger) @@ -311,7 +311,7 @@ void W_Arc_Beam_Think(entity this) { if(this != this.owner.arc_beam) { - remove(this); + delete(this); return; } @@ -378,7 +378,7 @@ void W_Arc_Beam_Think(entity this) // note: this doesn't force the switch W_SwitchToOtherWeapon(own); } - remove(this); + delete(this); return; } @@ -1279,7 +1279,7 @@ void Draw_ArcBeam(entity this) void Remove_ArcBeam(entity this) { - remove(this.beam_muzzleentity); + delete(this.beam_muzzleentity); sound(this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM); } diff --git a/qcsrc/common/weapons/weapon/blaster.qc b/qcsrc/common/weapons/weapon/blaster.qc index 3a9bf365da..42818169ba 100644 --- a/qcsrc/common/weapons/weapon/blaster.qc +++ b/qcsrc/common/weapons/weapon/blaster.qc @@ -75,7 +75,7 @@ void W_Blaster_Touch(entity this, entity toucher) toucher ); - remove(this); + delete(this); } void W_Blaster_Think(entity this) diff --git a/qcsrc/common/weapons/weapon/crylink.qc b/qcsrc/common/weapons/weapon/crylink.qc index 47fa8efcad..eb35652ab6 100644 --- a/qcsrc/common/weapons/weapon/crylink.qc +++ b/qcsrc/common/weapons/weapon/crylink.qc @@ -114,7 +114,7 @@ void W_Crylink_Dequeue(entity e) void W_Crylink_Reset(entity this) { W_Crylink_Dequeue(this); - remove(this); + delete(this); } // force projectile to explode @@ -138,7 +138,7 @@ void W_Crylink_LinkExplode(entity e, entity e2, entity directhitentity) W_Crylink_LinkExplode(e.queuenext, e2, directhitentity); e.classname = "spike_oktoremove"; - remove(e); + delete(e); } // adjust towards center @@ -268,7 +268,7 @@ void W_Crylink_LinkJoinEffect_Think(entity this) } } } - remove(this); + delete(this); } float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad) @@ -320,14 +320,14 @@ void W_Crylink_Touch(entity this, entity toucher) this.realowner.crylink_lastgroup = NULL; W_Crylink_LinkExplode(this.queuenext, this, toucher); this.classname = "spike_oktoremove"; - remove(this); + delete(this); return; } else if(finalhit) { // just unlink W_Crylink_Dequeue(this); - remove(this); + delete(this); return; } this.cnt = this.cnt - 1; @@ -342,7 +342,7 @@ void W_Crylink_Touch(entity this, entity toucher) void W_Crylink_Fadethink(entity this) { W_Crylink_Dequeue(this); - remove(this); + delete(this); } void W_Crylink_Attack(Weapon thiswep, entity actor) diff --git a/qcsrc/common/weapons/weapon/devastator.qc b/qcsrc/common/weapons/weapon/devastator.qc index 3049225c4f..4eba16e979 100644 --- a/qcsrc/common/weapons/weapon/devastator.qc +++ b/qcsrc/common/weapons/weapon/devastator.qc @@ -120,7 +120,7 @@ void W_Devastator_Explode(entity this, entity directhitentity) PS(this.realowner).m_switchweapon = w_getbestweapon(this.realowner); } } - remove(this); + delete(this); } void W_Devastator_Explode_think(entity this) @@ -206,7 +206,7 @@ void W_Devastator_DoRemoteExplode(entity this, .entity weaponentity) PS(this.realowner).m_switchweapon = w_getbestweapon(this.realowner); } } - remove(this); + delete(this); } void W_Devastator_RemoteExplode(entity this, .entity weaponentity) diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index 1f8cc19441..6438485497 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -142,7 +142,7 @@ void W_Electro_ExplodeCombo(entity this) NULL ); - remove(this); + delete(this); } void W_Electro_Explode(entity this, entity directhitentity) @@ -189,7 +189,7 @@ void W_Electro_Explode(entity this, entity directhitentity) ); } - remove(this); + delete(this); } void W_Electro_Explode_use(entity this, entity actor, entity trigger) @@ -338,7 +338,7 @@ void W_Electro_Orb_Stick(entity this, entity to) newproj.use = this.use; newproj.flags = this.flags; - remove(this); + delete(this); if(to) SetMovetypeFollow(this, to); diff --git a/qcsrc/common/weapons/weapon/fireball.qc b/qcsrc/common/weapons/weapon/fireball.qc index 69c2dc006f..ab3ebb9340 100644 --- a/qcsrc/common/weapons/weapon/fireball.qc +++ b/qcsrc/common/weapons/weapon/fireball.qc @@ -109,7 +109,7 @@ void W_Fireball_Explode(entity this, entity directhitentity) } } - remove(this); + delete(this); } void W_Fireball_Explode_think(entity this) @@ -273,7 +273,7 @@ void W_Fireball_Firemine_Think(entity this) { if(time > this.pushltime) { - remove(this); + delete(this); return; } @@ -301,7 +301,7 @@ void W_Fireball_Firemine_Touch(entity this, entity toucher) if(toucher.takedamage == DAMAGE_AIM) if(Fire_AddDamage(toucher, this.realowner, WEP_CVAR_SEC(fireball, damage), WEP_CVAR_SEC(fireball, damagetime), this.projectiledeathtype) >= 0) { - remove(this); + delete(this); return; } this.projectiledeathtype |= HITTYPE_BOUNCE; diff --git a/qcsrc/common/weapons/weapon/hagar.qc b/qcsrc/common/weapons/weapon/hagar.qc index 130c470636..c7e30d2357 100644 --- a/qcsrc/common/weapons/weapon/hagar.qc +++ b/qcsrc/common/weapons/weapon/hagar.qc @@ -68,7 +68,7 @@ void W_Hagar_Explode(entity this, entity directhitentity) this.event_damage = func_null; RadiusDamage(this, this.realowner, WEP_CVAR_PRI(hagar, damage), WEP_CVAR_PRI(hagar, edgedamage), WEP_CVAR_PRI(hagar, radius), NULL, NULL, WEP_CVAR_PRI(hagar, force), this.projectiledeathtype, directhitentity); - remove(this); + delete(this); } void W_Hagar_Explode_use(entity this, entity actor, entity trigger) @@ -81,7 +81,7 @@ void W_Hagar_Explode2(entity this, entity directhitentity) this.event_damage = func_null; RadiusDamage(this, this.realowner, WEP_CVAR_SEC(hagar, damage), WEP_CVAR_SEC(hagar, edgedamage), WEP_CVAR_SEC(hagar, radius), NULL, NULL, WEP_CVAR_SEC(hagar, force), this.projectiledeathtype, directhitentity); - remove(this); + delete(this); } void W_Hagar_Explode2_use(entity this, entity actor, entity trigger) diff --git a/qcsrc/common/weapons/weapon/hlac.qc b/qcsrc/common/weapons/weapon/hlac.qc index ab4e2f7a08..1ecc3f0ffe 100644 --- a/qcsrc/common/weapons/weapon/hlac.qc +++ b/qcsrc/common/weapons/weapon/hlac.qc @@ -66,7 +66,7 @@ void W_HLAC_Touch(entity this, entity toucher) RadiusDamage(this, this.realowner, WEP_CVAR_BOTH(hlac, isprimary, damage), WEP_CVAR_BOTH(hlac, isprimary, edgedamage), WEP_CVAR_BOTH(hlac, isprimary, radius), NULL, NULL, WEP_CVAR_BOTH(hlac, isprimary, force), this.projectiledeathtype, toucher); - remove(this); + delete(this); } void W_HLAC_Attack(Weapon thiswep, entity actor) diff --git a/qcsrc/common/weapons/weapon/hook.qc b/qcsrc/common/weapons/weapon/hook.qc index 01a3497d06..d68fef13d2 100644 --- a/qcsrc/common/weapons/weapon/hook.qc +++ b/qcsrc/common/weapons/weapon/hook.qc @@ -96,7 +96,7 @@ void W_Hook_ExplodeThink(entity this) if(dt < this.dmg_duration) this.nextthink = time + 0.05; // soon else - remove(this); + delete(this); } void W_Hook_Explode2(entity this) diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc index 8b1e0cd2e1..b4b38031fc 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qc +++ b/qcsrc/common/weapons/weapon/minelayer.qc @@ -102,7 +102,7 @@ void W_MineLayer_Stick(entity this, entity to) newmine.cnt = this.cnt; newmine.flags = this.flags; - remove(this); + delete(this); if(to) SetMovetypeFollow(newmine, to); @@ -135,7 +135,7 @@ void W_MineLayer_Explode(entity this, entity directhitentity) } } this.realowner.minelayer_mines -= 1; - remove(this); + delete(this); } void W_MineLayer_Explode_think(entity this) @@ -166,7 +166,7 @@ void W_MineLayer_DoRemoteExplode(entity this) } } this.realowner.minelayer_mines -= 1; - remove(this); + delete(this); } void W_MineLayer_RemoteExplode(entity this) diff --git a/qcsrc/common/weapons/weapon/mortar.qc b/qcsrc/common/weapons/weapon/mortar.qc index 748c2347f7..29a0924801 100644 --- a/qcsrc/common/weapons/weapon/mortar.qc +++ b/qcsrc/common/weapons/weapon/mortar.qc @@ -81,7 +81,7 @@ void W_Mortar_Grenade_Explode(entity this, entity directhitentity) RadiusDamage(this, this.realowner, WEP_CVAR_PRI(mortar, damage), WEP_CVAR_PRI(mortar, edgedamage), WEP_CVAR_PRI(mortar, radius), NULL, NULL, WEP_CVAR_PRI(mortar, force), this.projectiledeathtype, directhitentity); - remove(this); + delete(this); } void W_Mortar_Grenade_Explode_use(entity this, entity actor, entity trigger) @@ -106,7 +106,7 @@ void W_Mortar_Grenade_Explode2(entity this, entity directhitentity) RadiusDamage(this, this.realowner, WEP_CVAR_SEC(mortar, damage), WEP_CVAR_SEC(mortar, edgedamage), WEP_CVAR_SEC(mortar, radius), NULL, NULL, WEP_CVAR_SEC(mortar, force), this.projectiledeathtype, directhitentity); - remove(this); + delete(this); } void W_Mortar_Grenade_Explode2_use(entity this, entity actor, entity trigger) diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index f17a2ac505..1f0b0603f5 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -62,7 +62,7 @@ void W_Porto_Success(entity this) } this.realowner.porto_current = NULL; - remove(this); + delete(this); } string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vector velo); @@ -98,7 +98,7 @@ void W_Porto_Fail(entity this, float failhard) } } } - remove(this); + delete(this); } void W_Porto_Remove(entity p) @@ -113,7 +113,7 @@ void W_Porto_Think(entity this) { trace_plane_normal = '0 0 0'; if(this.realowner.playerid != this.playerid) - remove(this); + delete(this); else W_Porto_Fail(this, 0); } @@ -143,7 +143,7 @@ void W_Porto_Touch(entity this, entity toucher) if(this.realowner.playerid != this.playerid) { sound(this, CH_SHOTS, SND_PORTO_UNSUPPORTED, VOL_BASE, ATTEN_NORM); - remove(this); + delete(this); } else if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP) { diff --git a/qcsrc/common/weapons/weapon/seeker.qc b/qcsrc/common/weapons/weapon/seeker.qc index 00e481ba26..5741c64ba8 100644 --- a/qcsrc/common/weapons/weapon/seeker.qc +++ b/qcsrc/common/weapons/weapon/seeker.qc @@ -99,7 +99,7 @@ void W_Seeker_Missile_Explode(entity this, entity directhitentity) this.event_damage = func_null; RadiusDamage(this, this.realowner, WEP_CVAR(seeker, missile_damage), WEP_CVAR(seeker, missile_edgedamage), WEP_CVAR(seeker, missile_radius), NULL, NULL, WEP_CVAR(seeker, missile_force), this.projectiledeathtype, directhitentity); - remove(this); + delete(this); } void W_Seeker_Missile_Explode_think(entity this) @@ -315,7 +315,7 @@ void W_Seeker_Flac_Explode(entity this, entity directhitentity) RadiusDamage(this, this.realowner, WEP_CVAR(seeker, flac_damage), WEP_CVAR(seeker, flac_edgedamage), WEP_CVAR(seeker, flac_radius), NULL, NULL, WEP_CVAR(seeker, flac_force), this.projectiledeathtype, directhitentity); - remove(this); + delete(this); } void W_Seeker_Flac_Touch(entity this, entity toucher) @@ -431,7 +431,7 @@ void W_Seeker_Vollycontroller_Think(entity this) // TODO: Merge this with W_Seek Weapon thiswep = WEP_SEEKER; if((!(this.realowner.items & IT_UNLIMITED_AMMO) && this.realowner.(thiswep.ammo_field) < WEP_CVAR(seeker, missile_ammo)) || (this.cnt <= -1) || (IS_DEAD(this.realowner)) || (PS(this.realowner).m_switchweapon != WEP_SEEKER)) { - remove(this); + delete(this); return; } @@ -472,7 +472,7 @@ void W_Seeker_Tracker_Think(entity this) if(this) { WaypointSprite_Kill(this.tag_target.wps_tag_tracker); - remove(this); + delete(this); } return; } @@ -490,7 +490,7 @@ void W_Seeker_Tag_Explode(entity this) // return; Damage_DamageInfo(this.origin, 0, 0, 0, this.velocity, WEP_SEEKER.m_id | HITTYPE_BOUNCE, 0, this); - remove(this); + delete(this); } void W_Seeker_Tag_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) @@ -560,7 +560,7 @@ void W_Seeker_Tag_Touch(entity this, entity toucher) } } - remove(this); + delete(this); return; } diff --git a/qcsrc/common/weapons/weapon/shockwave.qc b/qcsrc/common/weapons/weapon/shockwave.qc index 539ccfdb72..f143bd1cc2 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@ -122,7 +122,7 @@ void W_Shockwave_Melee_Think(entity this) // check to see if we can still continue, otherwise give up now if(IS_DEAD(this.realowner) && WEP_CVAR(shockwave, melee_no_doubleslap)) { - remove(this); + delete(this); return; } @@ -214,7 +214,7 @@ void W_Shockwave_Melee_Think(entity this) } else { - remove(this); + delete(this); return; } } @@ -223,7 +223,7 @@ void W_Shockwave_Melee_Think(entity this) if(time >= this.cnt + meleetime) { // melee is finished - remove(this); + delete(this); return; } else @@ -757,7 +757,7 @@ void Draw_Shockwave(entity this) { // fading/removal control float a = bound(0, (SW_MAXALPHA - ((time - this.sw_time) / SW_FADETIME)), SW_MAXALPHA); - if(a < ALPHA_MIN_VISIBLE) { remove(this); } + if(a < ALPHA_MIN_VISIBLE) { delete(this); } // WEAPONTODO: save this only once when creating the entity vector sw_color = entcs_GetColor(this.sv_entnum - 1); // GetTeamRGB(entcs_GetTeam(this.sv_entnum)); diff --git a/qcsrc/common/weapons/weapon/shotgun.qc b/qcsrc/common/weapons/weapon/shotgun.qc index f89ef6872b..a3f891aa34 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qc +++ b/qcsrc/common/weapons/weapon/shotgun.qc @@ -113,7 +113,7 @@ void W_Shotgun_Melee_Think(entity this) // check to see if we can still continue, otherwise give up now if(IS_DEAD(this.realowner) && WEP_CVAR_SEC(shotgun, melee_no_doubleslap)) { - remove(this); + delete(this); return; } @@ -166,7 +166,7 @@ void W_Shotgun_Melee_Think(entity this) } else { - remove(this); + delete(this); return; } } @@ -175,7 +175,7 @@ void W_Shotgun_Melee_Think(entity this) if(time >= this.cnt + meleetime) { // melee is finished - remove(this); + delete(this); return; } else diff --git a/qcsrc/common/weapons/weapon/tuba.qc b/qcsrc/common/weapons/weapon/tuba.qc index c0e0ac89ba..6d8182aab8 100644 --- a/qcsrc/common/weapons/weapon/tuba.qc +++ b/qcsrc/common/weapons/weapon/tuba.qc @@ -179,7 +179,7 @@ void W_Tuba_NoteOff(entity this) } } } - remove(this); + delete(this); } int W_Tuba_GetNote(entity pl, int hittype) @@ -563,9 +563,9 @@ void Ent_TubaNote_Think(entity this) sound(this, CH_TUBA_SINGLE, SND_Null, 0, 0); if (this.enemy) { sound(this.enemy, CH_TUBA_SINGLE, SND_Null, 0, 0); - remove(this.enemy); + delete(this.enemy); } - remove(this); + delete(this); } else { tubasound(this, 0); } diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index 8a8e858ecb..72ea80885d 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -158,7 +158,7 @@ NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE, bool isNew) WarpZone_TrailParticles(NULL, particleeffectnum(((this.cnt) ? EFFECT_VAPORIZER_HIT(this.team) : EFFECT_VAPORIZER(this.team))), this.vorg1, this.vorg2); this.draw = func_null; this.drawmask = MASK_NORMAL; - remove(this); + delete(this); } return true; @@ -177,7 +177,7 @@ void W_RocketMinsta_Explosion(entity actor, vector loc) dmgent.owner = dmgent.realowner = actor; setorigin(dmgent, loc); RadiusDamage (dmgent, actor, autocvar_g_rm_damage, autocvar_g_rm_edgedamage, autocvar_g_rm_radius, NULL, NULL, autocvar_g_rm_force, WEP_DEVASTATOR.m_id | HITTYPE_SPLASH, other); - remove(dmgent); + delete(dmgent); } void W_Vaporizer_Attack(Weapon thiswep, entity actor) @@ -226,7 +226,7 @@ void W_RocketMinsta_Laser_Explode (entity this) this.event_damage = func_null; this.takedamage = DAMAGE_NO; RadiusDamage (this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, other); - remove(this); + delete(this); } void W_RocketMinsta_Laser_Explode_use(entity this, entity actor, entity trigger) @@ -239,7 +239,7 @@ void W_RocketMinsta_Laser_Touch(entity this, entity toucher) PROJECTILE_TOUCH(this, toucher); //W_RocketMinsta_Laser_Explode (); RadiusDamage(this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, toucher); - remove(this); + delete(this); } void W_RocketMinsta_Attack2(entity actor) diff --git a/qcsrc/lib/arraylist.qh b/qcsrc/lib/arraylist.qh index c0809ecdf8..18305177bf 100644 --- a/qcsrc/lib/arraylist.qh +++ b/qcsrc/lib/arraylist.qh @@ -20,7 +20,7 @@ USING(ArrayList, entity); MACRO_BEGIN \ { \ buf_del(this.al_buf); \ - remove(this); \ + delete(this); \ this = NULL; \ } MACRO_END diff --git a/qcsrc/lib/defer.qh b/qcsrc/lib/defer.qh index 3e7e020c67..c20c534407 100644 --- a/qcsrc/lib/defer.qh +++ b/qcsrc/lib/defer.qh @@ -12,7 +12,7 @@ /** Remove entity */ void SUB_Remove(entity this) { - remove(this); + delete(this); } void defer_think(entity this) diff --git a/qcsrc/lib/intrusivelist.qh b/qcsrc/lib/intrusivelist.qh index 1d7b251686..10de3e9630 100644 --- a/qcsrc/lib/intrusivelist.qh +++ b/qcsrc/lib/intrusivelist.qh @@ -150,7 +150,7 @@ void IL_REMOVE(IntrusiveList this, entity it) #define IL_DELETE(this, dtor) \ MACRO_BEGIN \ { \ - remove(this); \ + delete(this); \ this = NULL; \ } MACRO_END diff --git a/qcsrc/lib/linkedlist.qh b/qcsrc/lib/linkedlist.qh index 6afc862ed0..c518de1413 100644 --- a/qcsrc/lib/linkedlist.qh +++ b/qcsrc/lib/linkedlist.qh @@ -40,7 +40,7 @@ entity LL_POP(LinkedList this) LinkedListNode prev = n.ll_prev; if (prev) (this.ll_tail = prev).ll_next = NULL; else this.ll_head = this.ll_tail = NULL; - remove(n); + delete(n); return e; } @@ -57,7 +57,7 @@ entity LL_POP(LinkedList this) entity it = LL_POP(_ll); \ if (!it) continue; \ dtor \ - remove(it); \ + delete(it); \ } \ } MACRO_END @@ -68,7 +68,7 @@ entity LL_POP(LinkedList this) MACRO_BEGIN \ { \ LL_CLEAR_2(this, dtor); \ - remove(this); \ + delete(this); \ this = NULL; \ } MACRO_END diff --git a/qcsrc/lib/matrix/matrix.qc b/qcsrc/lib/matrix/matrix.qc index 23ec02e823..db51bbffa1 100644 --- a/qcsrc/lib/matrix/matrix.qc +++ b/qcsrc/lib/matrix/matrix.qc @@ -22,7 +22,7 @@ void MX_Nick_(entity fh, entity pass, int status) fh.url_verb = "PUT"; fh.url_content_type = "application/json"; url_fputs(fh, sprintf("{\"displayname\": \"%s\"}", pass.message)); - remove(pass); + delete(pass); url_fclose(fh); break; } @@ -175,7 +175,7 @@ void MX_Typing_(entity fh, entity pass, int status) fh.url_verb = "PUT"; fh.url_content_type = "application/json"; url_fputs(fh, sprintf("{\"typing\": %s, \"timeout\": 30000}", pass.message)); - remove(pass); + delete(pass); url_fclose(fh); break; } @@ -204,7 +204,7 @@ void MX_Say_(entity fh, entity pass, int status) fh.url_verb = "PUT"; fh.url_content_type = "application/json"; url_fputs(fh, sprintf("{\"msgtype\": \"m.text\", \"body\": \"%s\"}", pass.message)); - strunzone(pass.message); remove(pass); + strunzone(pass.message); delete(pass); url_fclose(fh); break; } diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index 0ce157848e..7cb9bb8967 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -176,7 +176,7 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); } } MACRO_END #define Net_Reject() \ MACRO_BEGIN { \ - if (this) remove(this); \ + if (this) delete(this); \ } MACRO_END string g_buf; diff --git a/qcsrc/lib/urllib.qc b/qcsrc/lib/urllib.qc index c4c700a72d..8c8bcd16bc 100644 --- a/qcsrc/lib/urllib.qc +++ b/qcsrc/lib/urllib.qc @@ -55,7 +55,7 @@ float url_URI_Get_Callback(int id, float status, string data) LOG_INFO("url_URI_Get_Callback: out of memory in buf_create\n"); e.url_ready(e, e.url_ready_pass, URL_READY_ERROR); strunzone(e.url_url); - remove(e); + delete(e); return 1; } e.url_rbufpos = 0; @@ -64,7 +64,7 @@ float url_URI_Get_Callback(int id, float status, string data) LOG_INFO("url_URI_Get_Callback: out of memory in buf_create\n"); e.url_ready(e, e.url_ready_pass, URL_READY_ERROR); strunzone(e.url_url); - remove(e); + delete(e); return 1; } for (i = 0; i < n; ++i) @@ -77,7 +77,7 @@ float url_URI_Get_Callback(int id, float status, string data) // an ERROR e.url_ready(e, e.url_ready_pass, -fabs(status)); strunzone(e.url_url); - remove(e); + delete(e); return 1; } } @@ -107,7 +107,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass) LOG_INFO("url_single_fopen: out of memory in buf_create\n"); rdy(e, pass, URL_READY_ERROR); strunzone(e.url_url); - remove(e); + delete(e); return; } e.url_wbufpos = 0; @@ -229,7 +229,7 @@ void url_fclose(entity e) e.url_ready(e, e.url_ready_pass, URL_READY_ERROR); buf_del(e.url_wbuf); strunzone(e.url_url); - remove(e); + delete(e); return; } } @@ -241,7 +241,7 @@ void url_fclose(entity e) e.url_ready(e, e.url_ready_pass, URL_READY_ERROR); buf_del(e.url_wbuf); strunzone(e.url_url); - remove(e); + delete(e); return; } @@ -262,20 +262,20 @@ void url_fclose(entity e) e.url_ready(e, e.url_ready_pass, URL_READY_CLOSED); buf_del(e.url_rbuf); strunzone(e.url_url); - remove(e); + delete(e); } } else if (e.url_fh == URL_FH_STDOUT) { e.url_ready(e, e.url_ready_pass, URL_READY_CLOSED); // closing creates no reading handle - remove(e); + delete(e); } else { // file fclose(e.url_fh); e.url_ready(e, e.url_ready_pass, URL_READY_CLOSED); // closing creates no reading handle - remove(e); + delete(e); } } @@ -336,7 +336,7 @@ void url_multi_ready(entity fh, entity me, float status) LOG_INFO("uri_multi_ready: got HTTP error 422, data is in unusable format - not continuing\n"); me.url_ready(fh, me.url_ready_pass, status); strunzone(me.url_url); - remove(me); + delete(me); return; } me.url_attempt += 1; @@ -345,7 +345,7 @@ void url_multi_ready(entity fh, entity me, float status) { me.url_ready(fh, me.url_ready_pass, status); strunzone(me.url_url); - remove(me); + delete(me); return; } url_single_fopen(argv(me.url_attempt), me.url_mode, url_multi_ready, me); diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 5acacc7734..0946414d57 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -671,7 +671,7 @@ void WarpZone_RefSys_GC(entity this) // garbage collect unused reference systems this.nextthink = time + 1; if(this.owner.WarpZone_refsys != this) - remove(this); + delete(this); } void WarpZone_RefSys_CheckCreate(entity me) { @@ -688,7 +688,7 @@ void WarpZone_RefSys_Clear(entity me) { if(me.WarpZone_refsys) { - remove(me.WarpZone_refsys); + delete(me.WarpZone_refsys); me.WarpZone_refsys = NULL; } } diff --git a/qcsrc/menu/anim/animhost.qc b/qcsrc/menu/anim/animhost.qc index 5e39191dd6..3009ab4eaf 100644 --- a/qcsrc/menu/anim/animhost.qc +++ b/qcsrc/menu/anim/animhost.qc @@ -37,7 +37,7 @@ if (n) n.prevSibling = p; else this.lastChild = p; - remove(other); + delete(other); } METHOD(AnimHost, removeAllAnim, void(entity this)) diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 308cd95101..58feef6599 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -391,7 +391,7 @@ void bot_clientdisconnect(entity this) this.playermodel_freeme = string_null; this.playerskin_freeme = string_null; if(this.bot_cmd_current) - remove(this.bot_cmd_current); + delete(this.bot_cmd_current); if(bot_waypoint_queue_owner==this) bot_waypoint_queue_owner = NULL; } diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index b22ded20fb..ceb9b296e7 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -1148,7 +1148,7 @@ float havocbot_moveto(entity this, vector pos) { LOG_TRACE("Warning: can't walk to the personal waypoint located at ", vtos(this.havocbot_personal_waypoint.origin),"\n"); this.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_LINKING; - remove(this.havocbot_personal_waypoint); + delete(this.havocbot_personal_waypoint); return CMD_STATUS_ERROR; } else @@ -1171,7 +1171,7 @@ float havocbot_moveto(entity this, vector pos) { // Step 5: Waypoint reached LOG_TRACE(this.netname, "'s personal waypoint reached\n"); - remove(this.havocbot_personal_waypoint); + delete(this.havocbot_personal_waypoint); this.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_REACHED; return CMD_STATUS_FINISHED; } diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index 586f2a8c04..89078f5c88 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -43,7 +43,7 @@ entity waypoint_spawn(vector m1, vector m2, float f) if(!(f & WAYPOINTFLAG_GENERATED)) { LOG_TRACE("Killed a waypoint that was stuck in solid at ", vtos(w.origin), "\n"); - remove(w); + delete(w); return NULL; } else @@ -338,7 +338,7 @@ void waypoint_remove(entity e) waypoint_schedulerelink(e.wp30); waypoint_schedulerelink(e.wp31); // and now remove the spawnfunc_waypoint - remove(e); + delete(e); } // empties the map of waypoints @@ -346,7 +346,7 @@ void waypoint_removeall() { IL_EACH(g_waypoints, true, { - remove(it); + delete(it); }); } diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 86f46b067f..40ca3da275 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -240,7 +240,7 @@ float CheatImpulse(entity this, int imp) sprint(this, "Emergency teleport used info_autoscreenshot location\n"); setorigin(this, e.origin); this.angles = e.angles; - remove(e); + delete(e); // should we? this.angles_x = -this.angles_x; this.fixangle = true; this.velocity = '0 0 0'; @@ -274,7 +274,7 @@ float CheatImpulse(entity this, int imp) e2 = spawn(); setorigin(e2, e.origin); RadiusDamage(e2, this, 1000, 0, 128, NULL, NULL, 500, DEATH_CHEAT.m_id, e); - remove(e2); + delete(e2); LOG_INFO("404 Sportsmanship not found.\n"); DID_CHEAT(); @@ -364,7 +364,7 @@ float CheatCommand(entity this, int argc) tracebox(e.origin, e.mins, e.maxs, e.origin, MOVE_NORMAL, e); if(trace_startsolid) { - remove(e); + delete(e); sprint(this, "cannot make stuff there (no space)\n"); } else @@ -480,13 +480,13 @@ float CheatCommand(entity this, int argc) RandomSelection_Add(e, 0, string_null, 1, 1 / vlen(e.origin + (e.mins + e.maxs) * 0.5 - trace_endpos)); if(RandomSelection_chosen_ent) { - remove(RandomSelection_chosen_ent.killindicator.killindicator); - remove(RandomSelection_chosen_ent.killindicator); + delete(RandomSelection_chosen_ent.killindicator.killindicator); + delete(RandomSelection_chosen_ent.killindicator); if(RandomSelection_chosen_ent.aiment) - remove(RandomSelection_chosen_ent.aiment); + delete(RandomSelection_chosen_ent.aiment); if(RandomSelection_chosen_ent.enemy) - remove(RandomSelection_chosen_ent.enemy); - remove(RandomSelection_chosen_ent); + delete(RandomSelection_chosen_ent.enemy); + delete(RandomSelection_chosen_ent); } DID_CHEAT(); break; @@ -604,15 +604,15 @@ float CheatCommand(entity this, int argc) case "drag_clear": IS_CHEAT(this, 0, argc, 0); for(entity e = NULL; (e = find(e, classname, "dragbox_box")); ) - remove(e); + delete(e); for(entity e = NULL; (e = find(e, classname, "dragbox_corner_1")); ) - remove(e); + delete(e); for(entity e = NULL; (e = find(e, classname, "dragbox_corner_2")); ) - remove(e); + delete(e); for(entity e = NULL; (e = find(e, classname, "dragpoint")); ) - remove(e); + delete(e); for(entity e = NULL; (e = find(e, classname, "drag_digit")); ) - remove(e); + delete(e); DID_CHEAT(); break; case "god": @@ -675,7 +675,7 @@ float CheatCommand(entity this, int argc) entity e = spawn(); e.target = argv(1); SUB_UseTargets(e, this, NULL); - remove(e); + delete(e); DID_CHEAT(); break; case "killtarget": @@ -683,7 +683,7 @@ float CheatCommand(entity this, int argc) entity e2 = spawn(); e2.killtarget = argv(1); SUB_UseTargets(e2, this, NULL); - remove(e2); + delete(e2); DID_CHEAT(); break; case "teleporttotarget": @@ -695,7 +695,7 @@ float CheatCommand(entity this, int argc) if(!wasfreed(ent)) { Simple_TeleportPlayer(ent, this); - remove(ent); + delete(ent); DID_CHEAT(); } break; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index fe307fc01a..7a878b1d15 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -112,7 +112,7 @@ void ClientData_Attach(entity this) void ClientData_Detach(entity this) { - remove(this.clientdata); + delete(this.clientdata); this.clientdata = NULL; } @@ -639,7 +639,7 @@ void PutClientInServer(entity this) if (autocvar_spawn_debug) { sprint(this, strcat("spawnpoint origin: ", vtos(spot.origin), "\n")); - remove(spot); // usefull for checking if there are spawnpoints, that let drop through the floor + delete(spot); // usefull for checking if there are spawnpoints, that let drop through the floor } PS(this).m_switchweapon = w_getbestweapon(this); @@ -797,7 +797,7 @@ void ClientKill_Now(entity this) } if(this.killindicator && !wasfreed(this.killindicator)) - remove(this.killindicator); + delete(this.killindicator); this.killindicator = NULL; @@ -814,14 +814,14 @@ void KillIndicator_Think(entity this) if (gameover) { this.owner.killindicator = NULL; - remove(this); + delete(this); return; } if (this.owner.alpha < 0 && !this.owner.vehicle) { this.owner.killindicator = NULL; - remove(this); + delete(this); return; } @@ -1201,8 +1201,8 @@ void ClientDisconnect(entity this) this.flags &= ~FL_CLIENT; - if (this.chatbubbleentity) remove(this.chatbubbleentity); - if (this.killindicator) remove(this.killindicator); + if (this.chatbubbleentity) delete(this.chatbubbleentity); + if (this.killindicator) delete(this.killindicator); WaypointSprite_PlayerGone(this); @@ -1211,7 +1211,7 @@ void ClientDisconnect(entity this) if (this.netname_previous) strunzone(this.netname_previous); if (this.clientstatus) strunzone(this.clientstatus); if (this.weaponorder_byimpulse) strunzone(this.weaponorder_byimpulse); - if (this.personal) remove(this.personal); + if (this.personal) delete(this.personal); this.playerid = 0; ReadyCount(); @@ -1225,7 +1225,7 @@ void ChatBubbleThink(entity this) { if(this.owner) // but why can that ever be NULL? this.owner.chatbubbleentity = NULL; - remove(this); + delete(this); return; } diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index 5e276c4a3a..a2aeb88a9b 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -463,7 +463,7 @@ IMPULSE(waypoint_clear_personal) WaypointSprite_ClearPersonal(this); if (this.personal) { - remove(this.personal); + delete(this.personal); this.personal = NULL; } sprint(this, "personal waypoint cleared\n"); @@ -474,7 +474,7 @@ IMPULSE(waypoint_clear) WaypointSprite_ClearOwned(this); if (this.personal) { - remove(this.personal); + delete(this.personal); this.personal = NULL; } sprint(this, "all waypoints cleared\n"); diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 098a176c8c..29a55cbd85 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -532,7 +532,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, // get rid of kill indicator if(this.killindicator) { - remove(this.killindicator); + delete(this.killindicator); this.killindicator = NULL; if(this.killindicator_teamchange) defer_ClientKill_Now_TeamChange = true; diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 81dc1a60ea..d980a0f4cf 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -189,7 +189,7 @@ void timeout_handler_reset(entity this) timeout_time = 0; timeout_leadtime = 0; - remove(this); + delete(this); } void timeout_handler_think(entity this) diff --git a/qcsrc/server/command/radarmap.qc b/qcsrc/server/command/radarmap.qc index b12977823e..998de24cbc 100644 --- a/qcsrc/server/command/radarmap.qc +++ b/qcsrc/server/command/radarmap.qc @@ -207,7 +207,7 @@ void RadarMap_Next() localcmd(strcat("defer 1 \"sv_cmd radarmap --flags ", ftos(radarmapper.count), strcat(" --res ", ftos(radarmapper.size.x), " ", ftos(radarmapper.size.y), " --sharpen ", ftos(radarmapper.ltime), " --qual ", ftos(radarmapper.size.z)), "\"\n")); GotoNextMap(0); } - remove(radarmapper); + delete(radarmapper); radarmapper = NULL; } void RadarMap_Think(entity this) @@ -253,7 +253,7 @@ void RadarMap_Think(entity this) if (this.cnt < 0) { LOG_INFO("Error writing ", this.netname, "\n"); - remove(this); + delete(this); radarmapper = NULL; return; } @@ -439,7 +439,7 @@ float RadarMap_Make(float argc) default: i = argc; - remove(radarmapper); + delete(radarmapper); radarmapper = NULL; break; } diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 895318affc..f263f5e61c 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -45,7 +45,7 @@ void make_mapinfo_Think(entity this) { LOG_INFO("Done rebuiling mapinfos.\n"); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0); - remove(this); + delete(this); } else { @@ -830,7 +830,7 @@ void GameCommand_gettaginfo(float request, float argc) LOG_INFO("bone not found\n"); } - remove(tmp_entity); + delete(tmp_entity); return; } } @@ -889,7 +889,7 @@ void GameCommand_animbench(float request, float argc) LOG_INFO("model ", tmp_entity.model, " frame ", ftos(f1), " animtime ", ftos(n / t1), "/s\n"); LOG_INFO("model ", tmp_entity.model, " frame ", ftos(f2), " animtime ", ftos(n / t2), "/s\n"); - remove(tmp_entity); + delete(tmp_entity); return; } } diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 0aa48c2fe7..72bedd982c 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -344,7 +344,7 @@ void reset_map(bool dorespawn) continue; } if (it.team_saved) it.team = it.team_saved; - if (it.flags & FL_PROJECTILE) remove(it); // remove any projectiles left + if (it.flags & FL_PROJECTILE) delete(it); // remove any projectiles left }); // Waypoints and assault start come LAST @@ -392,7 +392,7 @@ void ReadyRestart_think(entity this) restart_mapalreadyrestarted = true; reset_map(true); Score_ClearAll(); - remove(this); + delete(this); } // Forces a restart of the game without actually reloading the map // this is a mess... diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 5fbe642309..ef1e78802e 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -503,7 +503,7 @@ void Ice_Think(entity this) { if(!STAT(FROZEN, this.owner) || this.owner.iceblock != this) { - remove(this); + delete(this); return; } setorigin(this, this.owner.origin - '0 0 16'); @@ -569,7 +569,7 @@ void Unfreeze (entity targ) // remove the ice block if(targ.iceblock) - remove(targ.iceblock); + delete(targ.iceblock); targ.iceblock = NULL; } @@ -1251,14 +1251,14 @@ void fireburner_think(entity this) // for players, this is done in the regular loop if(wasfreed(this.owner)) { - remove(this); + delete(this); return; } Fire_ApplyEffect(this.owner); if(!Fire_IsBurning(this.owner)) { this.owner.fire_burner = NULL; - remove(this); + delete(this); return; } Fire_ApplyDamage(this.owner); diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index 88d63e384c..c5deb58e2b 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -74,7 +74,7 @@ void RemoveGrapplingHook(entity pl) { if(pl.hook == NULL) return; - remove(pl.hook); + delete(pl.hook); pl.hook = NULL; if(pl.move_movetype == MOVETYPE_FLY) set_movetype(pl, MOVETYPE_WALK); @@ -87,7 +87,7 @@ void GrapplingHookReset(entity this) if(this.realowner.hook == this) RemoveGrapplingHook(this.owner); else // in any case: - remove(this); + delete(this); } void GrapplingHookThink(entity this); diff --git a/qcsrc/server/g_lights.qc b/qcsrc/server/g_lights.qc index e79bbcaf76..425716d2da 100644 --- a/qcsrc/server/g_lights.qc +++ b/qcsrc/server/g_lights.qc @@ -37,7 +37,7 @@ flags: void dynlight_think(entity this) { if(!this.owner) - remove(this); + delete(this); this.nextthink = time + 0.1; } diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index e4affe265f..c16b3d4954 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -8,7 +8,7 @@ spawnfunc(info_null) { - remove(this); + delete(this); // if anything breaks, tell the mapper to fix his map! info_null is meant to remove itself immediately. } @@ -281,7 +281,7 @@ void LODmodel_attach(entity this) if(e) { this.lodmodel1 = e.model; - remove(e); + delete(e); } } if(this.lodtarget2 != "") @@ -290,7 +290,7 @@ void LODmodel_attach(entity this) if(e) { this.lodmodel2 = e.model; - remove(e); + delete(e); } } diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 7d477ac577..e34e6855a6 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -923,7 +923,7 @@ spawnfunc(worldspawn) spawnfunc(light) { //makestatic (this); // Who the f___ did that? - remove(this); + delete(this); } string GetGametype() diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index 8cc3759793..78f7497acc 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -243,7 +243,7 @@ void OnlineBanList_Think(entity this) return; LABEL(killme) - remove(this); + delete(this); } const float BAN_MAX = 256; diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 64e10a2f2e..05172241c3 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -160,7 +160,7 @@ spawnfunc(item_key) // reject this entity if more than one key was set! if (this.itemkeys>0 && (this.itemkeys & (this.itemkeys-1)) != 0) { objerror(this, "item_key.itemkeys must contain only 1 bit set specifying the key it represents!"); - remove(this); + delete(this); return; } @@ -202,7 +202,7 @@ spawnfunc(item_key) if (this.netname == "") { objerror(this, "item_key doesn't have a default name for this key and a custom one was not specified!"); - remove(this); + delete(this); return; } break; @@ -217,7 +217,7 @@ spawnfunc(item_key) _model = "models/keys/key.md3"; // FIXME: replace it by a keycard model! } else if (this.model == "") { objerror(this, "item_key doesn't have a default model for this key and a custom one was not specified!"); - remove(this); + delete(this); return; } diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 212e8cffb6..deb2b29616 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1077,10 +1077,10 @@ bool WarpZone_Projectile_Touch_ImpactFilter_Callback(entity this, entity toucher else if(this.classname == "spike") { W_Crylink_Dequeue(this); - remove(this); + delete(this); } else - remove(this); + delete(this); return true; } if(trace_ent && trace_ent.solid > SOLID_TRIGGER) diff --git a/qcsrc/server/mutators/mutator/gamemode_assault.qc b/qcsrc/server/mutators/mutator/gamemode_assault.qc index 7285d7db36..a52470bebb 100644 --- a/qcsrc/server/mutators/mutator/gamemode_assault.qc +++ b/qcsrc/server/mutators/mutator/gamemode_assault.qc @@ -332,7 +332,7 @@ int WinningCondition_Assault() // spawnfuncs spawnfunc(info_player_attacker) { - if (!g_assault) { remove(this); return; } + if (!g_assault) { delete(this); return; } this.team = NUM_TEAM_1; // red, gets swapped every round spawnfunc_info_player_deathmatch(this); @@ -340,7 +340,7 @@ spawnfunc(info_player_attacker) spawnfunc(info_player_defender) { - if (!g_assault) { remove(this); return; } + if (!g_assault) { delete(this); return; } this.team = NUM_TEAM_2; // blue, gets swapped every round spawnfunc_info_player_deathmatch(this); @@ -348,7 +348,7 @@ spawnfunc(info_player_defender) spawnfunc(target_objective) { - if (!g_assault) { remove(this); return; } + if (!g_assault) { delete(this); return; } this.classname = "target_objective"; this.use = assault_objective_use; @@ -359,7 +359,7 @@ spawnfunc(target_objective) spawnfunc(target_objective_decrease) { - if (!g_assault) { remove(this); return; } + if (!g_assault) { delete(this); return; } this.classname = "target_objective_decrease"; @@ -378,7 +378,7 @@ spawnfunc(target_objective_decrease) spawnfunc(func_breakable); spawnfunc(func_assault_destructible) { - if (!g_assault) { remove(this); return; } + if (!g_assault) { delete(this); return; } this.spawnflags = 3; this.classname = "func_assault_destructible"; @@ -393,7 +393,7 @@ spawnfunc(func_assault_destructible) spawnfunc(func_assault_wall) { - if (!g_assault) { remove(this); return; } + if (!g_assault) { delete(this); return; } this.classname = "func_assault_wall"; this.mdl = this.model; @@ -406,7 +406,7 @@ spawnfunc(func_assault_wall) spawnfunc(target_assault_roundend) { - if (!g_assault) { remove(this); return; } + if (!g_assault) { delete(this); return; } this.winning = 0; // round not yet won by attackers this.classname = "target_assault_roundend"; @@ -417,7 +417,7 @@ spawnfunc(target_assault_roundend) spawnfunc(target_assault_roundstart) { - if (!g_assault) { remove(this); return; } + if (!g_assault) { delete(this); return; } assault_attacker_team = NUM_TEAM_1; this.classname = "target_assault_roundstart"; diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index 55ec4a462e..5274072cf1 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -2467,7 +2467,7 @@ Keys: "noise5" sound played when flag touches the ground... */ spawnfunc(item_flag_team1) { - if(!g_ctf) { remove(this); return; } + if(!g_ctf) { delete(this); return; } ctf_FlagSetup(NUM_TEAM_1, this); } @@ -2485,7 +2485,7 @@ Keys: "noise5" sound played when flag touches the ground... */ spawnfunc(item_flag_team2) { - if(!g_ctf) { remove(this); return; } + if(!g_ctf) { delete(this); return; } ctf_FlagSetup(NUM_TEAM_2, this); } @@ -2503,7 +2503,7 @@ Keys: "noise5" sound played when flag touches the ground... */ spawnfunc(item_flag_team3) { - if(!g_ctf) { remove(this); return; } + if(!g_ctf) { delete(this); return; } ctf_FlagSetup(NUM_TEAM_3, this); } @@ -2521,7 +2521,7 @@ Keys: "noise5" sound played when flag touches the ground... */ spawnfunc(item_flag_team4) { - if(!g_ctf) { remove(this); return; } + if(!g_ctf) { delete(this); return; } ctf_FlagSetup(NUM_TEAM_4, this); } @@ -2539,8 +2539,8 @@ Keys: "noise5" sound played when flag touches the ground... */ spawnfunc(item_flag_neutral) { - if(!g_ctf) { remove(this); return; } - if(!cvar("g_ctf_oneflag")) { remove(this); return; } + if(!g_ctf) { delete(this); return; } + if(!cvar("g_ctf_oneflag")) { delete(this); return; } ctf_FlagSetup(0, this); } @@ -2553,7 +2553,7 @@ Keys: "cnt" Scoreboard color of the team (for example 4 is red and 13 is blue)... */ spawnfunc(ctf_team) { - if(!g_ctf) { remove(this); return; } + if(!g_ctf) { delete(this); return; } this.classname = "ctf_team"; this.team = this.cnt + 1; diff --git a/qcsrc/server/mutators/mutator/gamemode_cts.qc b/qcsrc/server/mutators/mutator/gamemode_cts.qc index 444fe5692e..187b4aa951 100644 --- a/qcsrc/server/mutators/mutator/gamemode_cts.qc +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qc @@ -406,7 +406,7 @@ MUTATOR_HOOKFUNCTION(cts, ClientKill) if(player.killindicator && player.killindicator.health == 1) // player.killindicator.health == 1 means that the kill indicator was spawned by CTS_ClientKill { - remove(player.killindicator); + delete(player.killindicator); player.killindicator = NULL; ClientKill_Now(player); // allow instant kill in this case diff --git a/qcsrc/server/mutators/mutator/gamemode_domination.qc b/qcsrc/server/mutators/mutator/gamemode_domination.qc index 3f75db9f38..7d36e3a622 100644 --- a/qcsrc/server/mutators/mutator/gamemode_domination.qc +++ b/qcsrc/server/mutators/mutator/gamemode_domination.qc @@ -535,7 +535,7 @@ spawnfunc(dom_controlpoint) { if(!g_domination) { - remove(this); + delete(this); return; } setthink(this, dom_controlpoint_setup); @@ -580,7 +580,7 @@ spawnfunc(dom_team) { if(!g_domination || autocvar_g_domination_teams_override >= 2) { - remove(this); + delete(this); return; } precache_model(this.model); diff --git a/qcsrc/server/mutators/mutator/gamemode_invasion.qc b/qcsrc/server/mutators/mutator/gamemode_invasion.qc index b1a74f2aa9..28d369d5b9 100644 --- a/qcsrc/server/mutators/mutator/gamemode_invasion.qc +++ b/qcsrc/server/mutators/mutator/gamemode_invasion.qc @@ -77,7 +77,7 @@ float autocvar_g_invasion_spawn_delay; spawnfunc(invasion_spawnpoint) { - if(!g_invasion) { remove(this); return; } + if(!g_invasion) { delete(this); return; } this.classname = "invasion_spawnpoint"; diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index 1ffe6e60c0..64b0397aa9 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -558,7 +558,7 @@ void kh_Key_Remove(entity key) // runs after when all the keys have been collec } } - remove(key); + delete(key); kh_update_state(); } @@ -1099,7 +1099,7 @@ void kh_finalize() { // to be called before intermission kh_FinishRound(); - remove(kh_controller); + delete(kh_controller); kh_controller = NULL; } diff --git a/qcsrc/server/mutators/mutator/gamemode_tdm.qc b/qcsrc/server/mutators/mutator/gamemode_tdm.qc index 0c7c87c030..3bc522ded3 100644 --- a/qcsrc/server/mutators/mutator/gamemode_tdm.qc +++ b/qcsrc/server/mutators/mutator/gamemode_tdm.qc @@ -51,7 +51,7 @@ Keys: "cnt" Scoreboard color of the team (for example 4 is red and 13 is blue)... */ spawnfunc(tdm_team) { - if(!g_tdm || !this.cnt) { remove(this); return; } + if(!g_tdm || !this.cnt) { delete(this); return; } this.classname = "tdm_team"; this.team = this.cnt + 1; diff --git a/qcsrc/server/pathlib/main.qc b/qcsrc/server/pathlib/main.qc index 0a28f206d0..b07d86384c 100644 --- a/qcsrc/server/pathlib/main.qc +++ b/qcsrc/server/pathlib/main.qc @@ -288,10 +288,10 @@ void pathlib_cleanup() } if(openlist) - remove(openlist); + delete(openlist); if(closedlist) - remove(closedlist); + delete(closedlist); openlist = NULL; closedlist = NULL; diff --git a/qcsrc/server/pathlib/movenode.qc b/qcsrc/server/pathlib/movenode.qc index 3059021d12..fea57426e6 100644 --- a/qcsrc/server/pathlib/movenode.qc +++ b/qcsrc/server/pathlib/movenode.qc @@ -77,7 +77,7 @@ void a_think(entity this) { te_lightning1(this,this.origin, this.pos1); if(this.cnt < time) - remove(this); + delete(this); else this.nextthink = time + 0.2; } diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 6cb569149f..8a40b11184 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -418,7 +418,7 @@ void Portal_Remove(entity portal, float killed) fixedmakevectors(portal.mangle); sound(portal, CH_SHOTS, SND_PORTO_EXPLODE, VOL_BASE, ATTEN_NORM); Send_Effect(EFFECT_ROCKET_EXPLODE, portal.origin + v_forward * 16, v_forward * 1024, 4); - remove(portal); + delete(portal); } else { @@ -642,7 +642,7 @@ entity Portal_Spawn(entity own, vector org, vector ang) if(!Portal_FindSafeOrigin(portal)) { - remove(portal); + delete(portal); return NULL; } diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index e32968c56d..a46c8b3d93 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -905,7 +905,7 @@ vector trigger_race_checkpoint_spawn_evalfunc(entity this, entity player, entity spawnfunc(trigger_race_checkpoint) { vector o; - if(!g_race && !g_cts) { remove(this); return; } + if(!g_race && !g_cts) { delete(this); return; } EXACTTRIGGER_INIT; @@ -953,7 +953,7 @@ spawnfunc(trigger_race_checkpoint) spawnfunc(target_checkpoint) // defrag entity { vector o; - if(!g_race && !g_cts) { remove(this); return; } + if(!g_race && !g_cts) { delete(this); return; } defrag_ents = 1; EXACTTRIGGER_INIT; @@ -1031,7 +1031,7 @@ void race_RetractPlayer(entity this) spawnfunc(info_player_race) { - if(!g_race && !g_cts) { remove(this); return; } + if(!g_race && !g_cts) { delete(this); return; } ++race_spawns; spawnfunc_info_player_deathmatch(this); diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index d1302a84d7..3b11c5f9b6 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -111,6 +111,6 @@ void round_handler_Reset(float next_think) void round_handler_Remove() { - remove(round_handler); + delete(round_handler); round_handler = NULL; } diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 89815b71b1..1a51c803d5 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -327,7 +327,7 @@ void PlayerScore_Detach(entity player) { if(!player.scorekeeper) error("player has no scorekeeper"); - remove(player.scorekeeper); + delete(player.scorekeeper); player.scorekeeper = NULL; } diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index a10edf45b4..775ec56665 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -247,7 +247,7 @@ void SV_OnEntityPreSpawnFunction(entity this) if (this.gametypefilter != "") if (!isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, this.gametypefilter)) { - remove(this); + delete(this); __spawnfunc_expecting = false; return; } @@ -356,7 +356,7 @@ LABEL(cvar_fail) if (!inv) { //print("cvarfilter fail\n"); - remove(this); + delete(this); __spawnfunc_expecting = false; return; } @@ -364,7 +364,7 @@ LABEL(cvar_fail) if(DoesQ3ARemoveThisEntity(this)) { - remove(this); + delete(this); __spawnfunc_expecting = false; return; } @@ -394,7 +394,7 @@ LABEL(cvar_fail) if(MUTATOR_CALLHOOK(OnEntityPreSpawn, this)) { - remove(this); + delete(this); __spawnfunc_expecting = false; return; } diff --git a/qcsrc/server/sys-post.qh b/qcsrc/server/sys-post.qh index 32024aec5f..1ccf6695a1 100644 --- a/qcsrc/server/sys-post.qh +++ b/qcsrc/server/sys-post.qh @@ -2,7 +2,6 @@ #undef droptofloor #undef sound -#undef remove #undef cvar_set #undef cvar_string #undef cvar diff --git a/qcsrc/server/tests.qc b/qcsrc/server/tests.qc index 7bbf00dc51..96674db702 100644 --- a/qcsrc/server/tests.qc +++ b/qcsrc/server/tests.qc @@ -3,8 +3,8 @@ void test_weapons_hurt(entity this) { EXPECT_NE(100, this.health); - remove(this.enemy); - remove(this); + delete(this.enemy); + delete(this); } TEST(Weapons, Hurt) diff --git a/qcsrc/server/weapons/accuracy.qc b/qcsrc/server/weapons/accuracy.qc index abb41ad06a..9efc4ce6a0 100644 --- a/qcsrc/server/weapons/accuracy.qc +++ b/qcsrc/server/weapons/accuracy.qc @@ -47,7 +47,7 @@ void accuracy_init(entity e) void accuracy_free(entity e) { - remove(e.accuracy); + delete(e.accuracy); } // force a resend of a player's accuracy stats diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index 748f434eb3..faec22f307 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -39,7 +39,7 @@ void weapon_defaultspawnfunc(entity this, Weapon e) s = M_ARGV(2, string); if (s == "") { - remove(this); + delete(this); startitem_failed = true; return; } @@ -76,7 +76,7 @@ void weapon_defaultspawnfunc(entity this, Weapon e) } if (wpn == WEP_Null) { - remove(this); + delete(this); startitem_failed = true; return; } diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 6e7279618c..e9148e6e27 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -300,7 +300,7 @@ void FireRailgunBullet (entity this, vector start, vector end, float bdamage, fl )); if(pseudoprojectile) - remove(pseudoprojectile); + delete(pseudoprojectile); } // find all the entities the railgun hit and hurt them diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 7c8061e94e..caf12a03c6 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -54,7 +54,7 @@ vector CL_Weapon_GetShotOrg(int wpn) CL_WeaponEntity_SetModel(e, wi.mdl, false); vector ret = e.movedir; CL_WeaponEntity_SetModel(e, "", false); - remove(e); + delete(e); return ret; } @@ -69,8 +69,8 @@ void CL_Weaponentity_Think(entity this) if (this.owner.(weaponentity) != this) { // owner has new gun; remove old one - if (this.weaponchild) remove(this.weaponchild); - remove(this); + if (this.weaponchild) delete(this.weaponchild); + delete(this); return; } if (IS_DEAD(this.owner)) @@ -110,7 +110,7 @@ void CL_ExteriorWeaponentity_Think(entity this) this.nextthink = time; if (this.owner.exteriorweaponentity != this) { - remove(this); + delete(this); return; } if (IS_DEAD(this.owner))