s/make_pure/new_pure/
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 12 Mar 2016 10:43:10 +0000 (21:43 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 12 Mar 2016 10:48:58 +0000 (21:48 +1100)
35 files changed:
qcsrc/client/main.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/shownames.qc
qcsrc/client/view.qc
qcsrc/common/debug.qh
qcsrc/common/effects/all.qc
qcsrc/common/effects/qc/damageeffects.qc
qcsrc/common/ent_cs.qc
qcsrc/common/items/inventory.qh
qcsrc/common/minigames/cl_minigames.qh
qcsrc/common/minigames/sv_minigames.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/net_notice.qc
qcsrc/common/notifications/all.qc
qcsrc/common/sounds/sound.qh
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/util.qc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/lib/defer.qh
qcsrc/lib/oo.qh
qcsrc/lib/sortlist.qc
qcsrc/lib/urllib.qc
qcsrc/lib/warpzone/common.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/cl_client.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/g_world.qc
qcsrc/server/scores.qc
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/weaponsystem.qc

index 8cc5745..c52b3cd 100644 (file)
@@ -315,8 +315,7 @@ void Playerchecker_Think()
                                // player connected
                                if (!e)
                                {
-                                       playerslots[i] = e = new(playerslot);
-                                       make_pure(e);
+                                       playerslots[i] = e = new_pure(playerslot);
                                }
                                e.sv_entnum = i;
                                e.ping = 0;
@@ -337,8 +336,7 @@ void Porto_Init();
 void TrueAim_Init();
 void PostInit()
 {
-       entity playerchecker = new(playerchecker);
-       make_pure(playerchecker);
+       entity playerchecker = new_pure(playerchecker);
        playerchecker.think = Playerchecker_Think;
        playerchecker.nextthink = time + 0.2;
 
@@ -434,8 +432,7 @@ NET_HANDLE(ENT_CLIENT_SCORES, bool isnew)
        o = playerslots[this.sv_entnum];
        if (!o)
        {
-               o = playerslots[this.sv_entnum] = new(playerslot);
-               make_pure(o);
+               o = playerslots[this.sv_entnum] = new_pure(playerslot);
        }
        this.owner = o;
        o.sv_entnum = this.sv_entnum;
index 0c26260..fd83aa2 100644 (file)
@@ -124,8 +124,7 @@ entity GetTeam(int Team, bool add)
                return teamslots[num];
        if (!add)
                return world;
-       entity tm = new(team);
-       make_pure(tm);
+       entity tm = new_pure(team);
        tm.team = Team;
        teamslots[num] = tm;
        RegisterTeam(tm);
index 826083b..7ed13b3 100644 (file)
@@ -23,8 +23,7 @@ STATIC_INIT(shownames_ent)
        shownames_ent = LL_NEW();
        for (int i = 0; i < maxclients; ++i)
        {
-               entity e = new(shownames_tag);
-               make_pure(e);
+               entity e = new_pure(shownames_tag);
                e.sv_entnum = i + 1;
                LL_PUSH(shownames_ent, e);
        }
index edf56a8..b374403 100644 (file)
@@ -338,7 +338,6 @@ void viewmodel_draw(entity this)
 entity viewmodel;
 STATIC_INIT(viewmodel) {
     viewmodel = new(viewmodel);
-    make_pure(viewmodel);
 }
 
 entity porto;
@@ -422,8 +421,7 @@ void Porto_Draw(entity this)
 
 void Porto_Init()
 {
-       porto = new(porto);
-       make_pure(porto);
+       porto = new_pure(porto);
        porto.draw = Porto_Draw;
        porto.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
 }
@@ -590,12 +588,8 @@ const float SHOTTYPE_HITENEMY = 4;
 
 void TrueAim_Init()
 {
-       trueaim = new(trueaim);
-       make_pure(trueaim);
-       trueaim.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
-       trueaim_rifle = new(trueaim_rifle);
-       make_pure(trueaim_rifle);
-       trueaim_rifle.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
+       (trueaim = new_pure(trueaim)).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
+       (trueaim_rifle = new_pure(trueaim_rifle)).dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
 }
 
 float EnemyHitCheck()
index a72d353..2dab5a9 100644 (file)
@@ -6,6 +6,12 @@
 REGISTER_NET_TEMP(net_debug)
 #endif
 
+#ifdef SVQC
+
+#include <server/command/all.qh>
+
+#endif
+
 #ifdef CSQC
        NET_HANDLE(net_debug, bool isNew)
        {
@@ -33,7 +39,9 @@ REGISTER_NET_TEMP(net_debug)
                WriteByte(channel, is_pure(this));
                vector o = this.origin;
                if (o == '0 0 0') // brushes
-                   o = (this.absmin + this.absmax) / 2;
+                       o = (this.absmin + this.absmax) / 2;
+               if (this.tag_entity)
+                       o += this.tag_entity.origin;
                WriteCoord(channel, o.x); WriteCoord(channel, o.y); WriteCoord(channel, o.z);
                WriteString(channel, this.classname);
                WriteString(channel, this.sourceLoc);
@@ -83,9 +91,9 @@ bool autocvar_debugdraw;
                                        if (e.origin) continue;
                                }
                                if (autocvar_debugdraw == 5)
-                {
-                    if (!e.debug) continue;
-                }
+                               {
+                                       if (!e.debug) continue;
+                               }
                                else if (autocvar_debugdraw > 5)
                                {
                                        bool flag = true;
@@ -131,7 +139,10 @@ bool autocvar_debugdraw;
                                        if (autocvar_debugdraw < 2) continue;
                                        rgb.y = 1;
                                }
-                               vector pos = project_3d_to_2d(e.origin);
+                               vector o = e.origin;
+                               if (e.tag_entity)
+                                       o += e.tag_entity.origin;
+                               vector pos = project_3d_to_2d(o);
                                if (pos.z < 0) continue;
                                pos.z = 0;
                                pos.y += ofs * sz;
@@ -158,7 +169,7 @@ bool autocvar_debugdraw;
                                for (entity e = NULL; (e = findfloat(e, debug, 0)) && rem > 0; )
                                {
                                        if (autocvar_debugdraw < 2 && is_pure(e)) continue;
-                                       debug_send(e, nextent(NULL), 0);
+                                       debug_send(e, caller, 0);
                                        e.debug = true;
                                        --rem;
                                }
@@ -270,3 +281,48 @@ STATIC_INIT(TRACE_ENT)
        e.draw2d = Trace_draw2d;
 }
 #endif
+
+#ifdef SVQC
+SERVER_COMMAND(find, "Search through entities for matching classname")
+{
+       switch (request)
+       {
+               case CMD_REQUEST_COMMAND:
+               {
+                       for (entity client = NULL; (client = find(client, classname, argv(1))); )
+                               LOG_INFO(etos(client), "\n");
+                       return;
+               }
+
+               default:
+                       LOG_INFO("Incorrect parameters for ^2find^7\n");
+               case CMD_REQUEST_USAGE:
+               {
+                       LOG_INFO("\nUsage:^3 sv_cmd find classname\n");
+                       LOG_INFO("  Where 'classname' is the classname to search for.\n");
+                       return;
+               }
+       }
+}
+
+SERVER_COMMAND(findat, "Search through entities for matching origin")
+{
+       switch (request)
+       {
+               case CMD_REQUEST_COMMAND:
+               {
+                   vector match = stov(argv(1));
+                   FOREACH_ENTITY_ORDERED(it.origin == match, LAMBDA(LOG_INFOF("%i\n", it)));
+                       return;
+               }
+
+               default:
+                       LOG_INFO("Incorrect parameters for ^2findat^7\n");
+               case CMD_REQUEST_USAGE:
+               {
+                       LOG_INFO("\nUsage:^3 sv_cmd findat \"0 0 0\"\n");
+                       return;
+               }
+       }
+}
+#endif
index 2bdf2ec..a07228f 100644 (file)
@@ -66,8 +66,7 @@ void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
 {
        if(!eff) { return; }
        if(!eff.eent_eff_trail && !eff_cnt) { return; } // effect has no count!
-       entity net_eff = new(net_effect);
-       make_pure(net_eff);
+       entity net_eff = new_pure(net_effect);
        net_eff.owner = eff;
        //net_eff.eent_broadcast = broadcast;
        net_eff.m_id = eff.m_id;
index 4d85ab9..06f8ea4 100644 (file)
@@ -43,7 +43,6 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad
                deathtype |= 0x8000;
 
        e = new(damageinfo);
-       make_pure(e);
        setorigin(e, org);
        e.projectiledeathtype = deathtype;
        e.dmg = coredamage;
@@ -179,7 +178,6 @@ void DamageEffect(vector hitorg, float thedamage, int type, int specnum)
        }
 
        e = new(damage);
-       make_pure(e);
        setmodel(e, MDL_Null); // necessary to attach and read origin
        setattachment(e, self, gettaginfo_name); // attach to the given bone
        e.owner = self;
index dbadc9a..165d94b 100644 (file)
                        i += 1;
                ENTCS_NETPROPS(X);
        #undef X
+           setorigin(this, this.origin);  // relink
        }
 
        void entcs_attach(entity player)
        {
                entity e = player.entcs = new(entcs_sender);
-               make_pure(e);
                e.owner = player;
                e.think = entcs_think;
                e.nextthink = time;
index f748dda..8f2f05f 100644 (file)
@@ -56,8 +56,7 @@ bool Inventory_Send(entity this, entity to, int sf)
 
 void Inventory_new(entity e)
 {
-    Inventory inv = new(Inventory), bak = new(Inventory);
-    make_pure(inv); make_pure(bak);
+    Inventory inv = new_pure(Inventory), bak = new_pure(Inventory);
     inv.inventory = bak;
     inv.drawonlytoclient = e;
     Net_LinkEntity((inv.owner = e).inventory = inv, false, 0, Inventory_Send);
index a97cabb..596d920 100644 (file)
@@ -121,7 +121,6 @@ REGISTRY_CHECK(Minigames)
     void name##_hud_status(vector, vector); \
     int name##_client_event(entity, string, ...); \
     REGISTER_INIT_POST(MINIGAME_##name) { \
-        make_pure(this); \
         this.netname = strzone(strtolower(#name)); \
         this.message = nicename; \
         this.minigame_hud_board = name##_hud_board; \
index cde6144..ecef028 100644 (file)
@@ -54,7 +54,6 @@ REGISTRY_CHECK(Minigames)
     REGISTER(Minigames, MINIGAME_##name, m_id, new_pure(minigame_descriptor)); \
     int name##_server_event(entity, string, ...); \
     REGISTER_INIT_POST(MINIGAME_##name) { \
-        make_pure(this); \
         this.netname = strzone(strtolower(#name)); \
         this.message = nicename; \
                this.minigame_event = name##_server_event; \
index 1cb2766..1fb8fda 100644 (file)
@@ -997,7 +997,6 @@ entity WaypointSprite_Spawn(
 )
 {
     entity wp = new(sprite_waypoint);
-    make_pure(wp);
     wp.teleport_time = time + _lifetime;
     wp.fade_time = _lifetime;
     wp.exteriormodeltoclient = ref;
index 59061e5..fa98b2f 100644 (file)
@@ -48,8 +48,7 @@ STATIC_INIT(cl_notice)
 }
 void cl_notice_read()
 {
-    entity _notice = new(sv_notice);
-    make_pure(_notice);
+    entity _notice = new_pure(sv_notice);
     _notice.netname = strzone(ReadString());
     _notice.alpha = ReadLong() + time;
     _notice.skin = ReadByte();
index e52e9de..a23c95f 100644 (file)
@@ -1681,8 +1681,7 @@ void Send_Notification(
        }
        else
        {
-               entity net_notif = new(net_notification);
-               make_pure(net_notif);
+               entity net_notif = new_pure(net_notification);
                net_notif.owner = notif;
                net_notif.nent_broadcast = broadcast;
                net_notif.nent_client = client;
index 53185b0..5d6c57f 100644 (file)
@@ -76,7 +76,6 @@ const float VOL_BASEVOICE = 1.0;
                        auto = true; \
                        __chan = fabs(__chan); \
                        entity tmp = __e = new(csqc_autochannel); \
-                       make_pure(tmp); \
                        tmp.think = SUB_Remove_self; \
                        tmp.nextthink = time + soundlength(__samp); \
                } \
index 015ad91..3e0cca2 100644 (file)
@@ -213,8 +213,7 @@ void Net_TargetMusic()
        LL_EACH(TargetMusic_list, it.count == id, LAMBDA(e = it; break));
        if (!e)
        {
-               LL_PUSH(TargetMusic_list, e = new(TargetMusic));
-               make_pure(e);
+               LL_PUSH(TargetMusic_list, e = new_pure(TargetMusic));
                e.count = id;
        }
        if(e.noise != noi)
index 507af78..141fd45 100644 (file)
@@ -433,7 +433,7 @@ void target_push_init(entity this)
 
 spawnfunc(target_push) { target_push_init(this); }
 spawnfunc(info_notnull) { target_push_init(this); }
-spawnfunc(target_position) { make_pure(this); target_push_init(this); }
+spawnfunc(target_position) { target_push_init(this); }
 
 #elif defined(CSQC)
 
@@ -473,7 +473,6 @@ void target_push_remove(entity this)
 
 NET_HANDLE(ENT_CLIENT_TARGET_PUSH, bool isnew)
 {
-       make_pure(this);
        self.classname = "push_target";
        self.cnt = ReadByte();
        self.targetname = strzone(ReadString());
index 03ab8f6..0e6b6d6 100644 (file)
@@ -608,8 +608,7 @@ float cvar_settemp(string tmp_cvar, string tmp_value)
        if(created_saved_value != -1)
        {
                // creating a new entity to keep track of this cvar
-               entity e = new(saved_cvar_value);
-               make_pure(e);
+               entity e = new_pure(saved_cvar_value);
                e.netname = strzone(tmp_cvar);
                e.message = strzone(cvar_string(tmp_cvar));
                created_saved_value = 1;
index c1a7e30..def5003 100644 (file)
@@ -425,7 +425,6 @@ void CL_WeaponEntity_SetModel(entity this, string name)
                        if (!this.weaponchild)
                        {
                                this.weaponchild = new(weaponchild);
-                               make_pure(this.weaponchild);
 #ifdef CSQC
                                this.weaponchild.drawmask = MASK_NORMAL;
                                this.weaponchild.renderflags |= RF_VIEWMODEL;
index bb9a54d..6c6e8e7 100644 (file)
@@ -239,8 +239,7 @@ void W_Shockwave_Melee(Weapon thiswep, entity actor, .entity weaponentity, int f
        sound(actor, CH_WEAPON_A, SND_SHOTGUN_MELEE, VOL_BASE, ATTN_NORM);
        weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(shockwave, melee_animtime), w_ready);
 
-       entity meleetemp = new(meleetemp);
-       make_pure(meleetemp);
+       entity meleetemp = new_pure(meleetemp);
        meleetemp.owner = meleetemp.realowner = actor;
        meleetemp.think = W_Shockwave_Melee_Think;
        meleetemp.nextthink = time + WEP_CVAR(shockwave, melee_delay) * W_WeaponRateFactor();
index 898f916..234aaad 100644 (file)
@@ -188,8 +188,7 @@ void W_Shotgun_Attack2(Weapon thiswep, entity actor, .entity weaponentity, int f
        sound(actor, CH_WEAPON_A, SND_SHOTGUN_MELEE, VOL_BASE, ATTEN_NORM);
        weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(shotgun, animtime), w_ready);
 
-       entity meleetemp = new(meleetemp);
-       make_pure(meleetemp);
+       entity meleetemp = new_pure(meleetemp);
        meleetemp.realowner = actor;
        meleetemp.think = W_Shotgun_Melee_Think;
        meleetemp.nextthink = time + WEP_CVAR_SEC(shotgun, melee_delay) * W_WeaponRateFactor();
index 070c092..b923062 100644 (file)
@@ -37,8 +37,7 @@
 */
        void defer(entity this, float fdelay, void() func)
        {
-               entity e    = new(deferred);
-               make_pure(e);
+               entity e    = new_pure(deferred);
                e.owner     = this;
                e.use       = func;
                e.think     = defer_think;
index efcb787..8d50d2b 100644 (file)
@@ -12,7 +12,7 @@
 
 .vector origin;
 .bool pure_data;
-/** deprecated, use new_pure or NEW(class) */
+/** @deprecated, use new_pure or NEW(class) */
 #define make_pure(e) \
        MACRO_BEGIN \
        { \
@@ -34,6 +34,7 @@ entity _spawn();
 #define SPAWN_PURE 0
 #endif
 
+// pure entities: need no .origin
 #if SPAWN_PURE
 entity spawn_pure() = #600;
 #else
@@ -80,7 +81,6 @@ entity _clearentity_ent;
 STATIC_INIT(clearentity)
 {
        _clearentity_ent = new_pure(clearentity);
-       make_pure(_clearentity_ent);
 }
 void clearentity(entity e)
 {
index fecc79b..1d8726c 100644 (file)
@@ -2,8 +2,7 @@
 
 entity Sort_Spawn()
 {
-       entity sort = new(sortlist);
-       make_pure(sort);
+       entity sort = new_pure(sortlist);
        sort.sort_next = NULL;
        sort.chain = sort;
        return sort;
index 0a48ef6..80145d8 100644 (file)
@@ -94,8 +94,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                // attempts to close will result in a reading handle
 
                                // create a writing end that does nothing yet
-                               e = new(url_single_fopen_file);
-                               make_pure(e);
+                               e = new_pure(url_single_fopen_file);
                                e.url_url = strzone(url);
                                e.url_fh = URL_FH_CURL;
                                e.url_wbuf = buf_create();
@@ -143,8 +142,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                // Make a dummy handle object (no buffers at
                                // all). Wait for data to come from the
                                // server, then call the callback
-                               e = new(url_single_fopen_file);
-                               make_pure(e);
+                               e = new_pure(url_single_fopen_file);
                                e.url_url = strzone(url);
                                e.url_fh = URL_FH_CURL;
                                e.url_rbuf = -1;
@@ -165,8 +163,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                {
                        case FILE_WRITE:
                        case FILE_APPEND:
-                               e = new(url_single_fopen_stdout);
-                               make_pure(e);
+                               e = new_pure(url_single_fopen_stdout);
                                e.url_fh = URL_FH_STDOUT;
                                e.url_ready = rdy;
                                e.url_ready_pass = pass;
@@ -189,8 +186,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                }
                else
                {
-                       e = new(url_single_fopen_file);
-                       make_pure(e);
+                       e = new_pure(url_single_fopen_file);
                        e.url_fh = fh;
                        e.url_ready = rdy;
                        e.url_ready_pass = pass;
@@ -364,8 +360,7 @@ void url_multi_fopen(string url, int mode, url_ready_func rdy, entity pass)
                return;
        }
 
-       entity me = new(url_multi);
-       make_pure(me);
+       entity me = new_pure(url_multi);
        me.url_url = strzone(url);
        me.url_attempt = 0;
        me.url_mode = mode;
index 5a9b2ab..b3332f3 100644 (file)
@@ -186,8 +186,7 @@ void WarpZone_Trace_InitTransform()
 {
        if(!WarpZone_trace_transform)
        {
-               WarpZone_trace_transform = new(warpzone_trace_transform);
-               make_pure(WarpZone_trace_transform);
+               WarpZone_trace_transform = new_pure(warpzone_trace_transform);
        }
        WarpZone_Accumulator_Clear(WarpZone_trace_transform);
 }
index f15c9a6..7b349f4 100644 (file)
@@ -1112,7 +1112,7 @@ void bot_setcurrentcommand()
 
        if(!self.bot_cmd_current)
        {
-               self.bot_cmd_current = new(bot_cmd);
+               self.bot_cmd_current = new_pure(bot_cmd);
                self.bot_cmd_current.is_bot_cmd = true;
        }
 
index e2e505a..178bc63 100644 (file)
@@ -28,7 +28,6 @@ entity waypoint_spawn(vector m1, vector m2, float f)
        }
 
        w = new(waypoint);
-       make_pure(w);
        w.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;
        w.wpflags = f;
        setorigin(w, (m1 + m2) * 0.5);
index edf70c1..f2e075c 100644 (file)
@@ -86,8 +86,7 @@ bool ClientData_Send(entity this, entity to, int sf)
 
 void ClientData_Attach(entity this)
 {
-       Net_LinkEntity(this.clientdata = new(clientdata), false, 0, ClientData_Send);
-       make_pure(this.clientdata);
+       Net_LinkEntity(this.clientdata = new_pure(clientdata), false, 0, ClientData_Send);
        self.clientdata.drawonlytoclient = this;
        self.clientdata.owner = this;
 }
@@ -517,8 +516,7 @@ void PutClientInServer()
                this.revival_time = 0;
                this.air_finished = time + 12;
 
-               entity spawnevent = new(spawnevent);
-               make_pure(spawnevent);
+               entity spawnevent = new_pure(spawnevent);
                spawnevent.owner = this;
                Net_LinkEntity(spawnevent, false, 0.5, SpawnEvent_Send);
 
@@ -658,8 +656,7 @@ void ClientInit_CheckUpdate()
 void ClientInit_Spawn()
 {SELFPARAM();
 
-       entity e = new(clientinit);
-       make_pure(e);
+       entity e = new_pure(clientinit);
        e.think = ClientInit_CheckUpdate;
        Net_LinkEntity(e, false, 0, ClientInit_SendEntity);
 
index 369b3ea..056cb0d 100644 (file)
@@ -735,31 +735,6 @@ void GameCommand_extendmatchtime(float request)
        }
 }
 
-void GameCommand_find(float request, float argc)  // is this even needed? We have prvm_edicts command and such ANYWAY
-{
-       switch (request)
-       {
-               case CMD_REQUEST_COMMAND:
-               {
-                       entity client;
-
-                       for (client = world; (client = find(client, classname, argv(1))); )
-                               LOG_INFO(etos(client), "\n");
-
-                       return;
-               }
-
-               default:
-                       LOG_INFO("Incorrect parameters for ^2find^7\n");
-               case CMD_REQUEST_USAGE:
-               {
-                       LOG_INFO("\nUsage:^3 sv_cmd find classname\n");
-                       LOG_INFO("  Where 'classname' is the classname to search for.\n");
-                       return;
-               }
-       }
-}
-
 void GameCommand_gametype(float request, float argc)
 {
        switch (request)
@@ -1778,7 +1753,6 @@ SERVER_COMMAND(defer_clear_all, "Clear all queued defer commands for all clients
 SERVER_COMMAND(delrec, "Delete race time record for a map") { GameCommand_delrec(request, arguments); }
 SERVER_COMMAND(effectindexdump, "Dump list of effects from code and effectinfo.txt") { GameCommand_effectindexdump(request); }
 SERVER_COMMAND(extendmatchtime, "Increase the timelimit value incrementally") { GameCommand_extendmatchtime(request); }
-SERVER_COMMAND(find, "Search through entities for matching classname") { GameCommand_find(request, arguments); }
 SERVER_COMMAND(gametype, "Simple command to change the active gametype") { GameCommand_gametype(request, arguments); }
 SERVER_COMMAND(gettaginfo, "Get specific information about a weapon model") { GameCommand_gettaginfo(request, arguments); }
 SERVER_COMMAND(gotomap, "Simple command to switch to another map") { GameCommand_gotomap(request, arguments); }
index c4303f4..1e00e85 100644 (file)
@@ -86,8 +86,7 @@ bool Nagger_SendEntity(entity this, entity to, float sendflags)
 
 void Nagger_Init()
 {
-       Net_LinkEntity(nagger = new(nagger), false, 0, Nagger_SendEntity);
-       make_pure(nagger);
+       Net_LinkEntity(nagger = new_pure(nagger), false, 0, Nagger_SendEntity);
 }
 
 void Nagger_VoteChanged()
@@ -445,8 +444,7 @@ void ReadyRestart_force()
        // initiate the restart-countdown-announcer entity
        if (autocvar_sv_ready_restart_after_countdown)
        {
-               entity restart_timer = new(restart_timer);
-               make_pure(restart_timer);
+               entity restart_timer = new_pure(restart_timer);
                restart_timer.think = ReadyRestart_think;
                restart_timer.nextthink = game_starttime;
        }
index c57d545..9059a6d 100644 (file)
@@ -80,8 +80,7 @@ void PingPLReport_Think()
 }
 void PingPLReport_Spawn()
 {
-       pingplreport = new(pingplreport);
-       make_pure(pingplreport);
+       pingplreport = new_pure(pingplreport);
        pingplreport.think = PingPLReport_Think;
        pingplreport.nextthink = time;
 }
@@ -523,8 +522,7 @@ void RandomSeed_Think()
 }
 void RandomSeed_Spawn()
 {SELFPARAM();
-       randomseed = new(randomseed);
-       make_pure(randomseed);
+       randomseed = new_pure(randomseed);
        randomseed.think = RandomSeed_Think;
        Net_LinkEntity(randomseed, false, 0, RandomSeed_Send);
 
index 4e4d69b..b7c9945 100644 (file)
@@ -89,8 +89,7 @@ bool TeamScore_SendEntity(entity this, entity to, float sendflags)
 
 void TeamScore_Spawn(float t, string name)
 {
-       entity ts = new(csqc_score_team);
-       make_pure(ts);
+       entity ts = new_pure(csqc_score_team);
        ts.netname = name; // not used yet, FIXME
        ts.team = t;
        Net_LinkEntity(ts, false, 0, TeamScore_SendEntity);
@@ -212,8 +211,7 @@ void ScoreInfo_Init(float teams)
        }
        else
        {
-               scores_initialized = new(ent_client_scoreinfo);
-               make_pure(scores_initialized);
+               scores_initialized = new_pure(ent_client_scoreinfo);
                Net_LinkEntity(scores_initialized, false, 0, ScoreInfo_SendEntity);
        }
        if(teams >= 1)
@@ -319,8 +317,7 @@ void PlayerScore_Attach(entity player)
 {
        if(player.scorekeeper)
                error("player already has a scorekeeper");
-       entity sk = new(scorekeeper);
-       make_pure(sk);
+       entity sk = new_pure(scorekeeper);
        sk.owner = player;
        Net_LinkEntity(sk, false, 0, PlayerScore_SendEntity);
        player.scorekeeper = sk;
index 9448110..abb41ad 100644 (file)
@@ -39,8 +39,7 @@ bool accuracy_send(entity this, entity to, int sf)
 // init/free
 void accuracy_init(entity e)
 {
-       entity a = e.accuracy = new(accuracy);
-       make_pure(a);
+       entity a = e.accuracy = new_pure(accuracy);
        a.owner = e;
        a.drawonlytoclient = e;
        Net_LinkEntity(a, false, 0, accuracy_send);
index 6d33ccb..3fd9e89 100644 (file)
@@ -161,7 +161,6 @@ void CL_ExteriorWeaponentity_Think()
 void CL_SpawnWeaponentity(entity actor, .entity weaponentity)
 {
        entity view = actor.(weaponentity) = new(weaponentity);
-       make_pure(view);
        view.solid = SOLID_NOT;
        view.owner = actor;
        setmodel(view, MDL_Null);  // precision set when changed
@@ -175,7 +174,6 @@ void CL_SpawnWeaponentity(entity actor, .entity weaponentity)
        if (weaponentity == weaponentities[0])
        {
                entity exterior = actor.exteriorweaponentity = new(exteriorweaponentity);
-               make_pure(exterior);
                exterior.solid = SOLID_NOT;
                exterior.owner = actor;
                setorigin(exterior, '0 0 0');