]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 8cc5745182a2fb1e12f61eefab3e21f42875a192..c52b3cd569ab96e63fa6637625eb1cdec2f6a2c1 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 0c262604b9397155405915700b94243a86497ee5..fd83aa2d11ed8a9791a4f539a9b0045e111cf00a 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 826083bc10f53a5b3ba085e2b393c6ea4c4585c7..7ed13b3e9f105435d53d704e7351e80a6e718bb3 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 edf56a87d0864fb80529df007349020a4c31a859..b374403db6c21327d81a277144f0105a82d74ca5 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 a72d3538a76b3d14d468937f920fc3adbe0fdc30..2dab5a9f51337fbf6d0061cdb45a64b8a1cb3974 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 2bdf2ec48b78235f268eeac177fa1f84d504f8c3..a07228fbdbbf70dbed0a92a7c88d4d6828ae288e 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 4d85ab90956c4ffdb390e7968ce5b4c0d9ba985f..06f8ea464eaaa8cf6cf878ce14985e63efa9a283 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 dbadc9abbd6eabe1ff1a5bbd8539bd0d247577a5..165d94b8966abdda47ea7d0cce707ea6cd371ddf 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 f748dda88405d286d73cb0eab68f84431eda96ff..8f2f05fd1b39a14c7ae277000ddf2b4d4f69982b 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 a97cabbf9923ceb5de5045a1819778c55fec64ae..596d9204c96c30aad48b72101421584aed9464a9 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 cde6144162866321be9c8b733a082d093e871f98..ecef028560062a64b672032eb12087c53c76c609 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 1cb2766ab93574b5669d987874f2cf8018c98f2e..1fb8fda3b09db8952ec0d7e1e9516a89f719dd5b 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 59061e5a97c99b257e879ccdd5084bcc7c1521ca..fa98b2feba5307dda7fe6ee1d921d0a9e439f0dd 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 e52e9de0971f10c73ec9e42685a52d541df465a3..a23c95f1db39118164b2db5cc84bf7142530e6ac 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 53185b0fb5f168a6953706e96baadafa67592f0a..5d6c57f21e55ff9b1caade97b37cf93376df9fae 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 015ad9138f32887f8aefc76bd646be06f966e409..3e0cca2a7ceab58d2e707911700e95d26702580b 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 507af7810995a845100a3566ae5b9666086a0e6d..141fd458f4c865ea878786f61886516e328bdb6a 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 03ab8f6d589b3a49e61dffc2270bbd814493a9e0..0e6b6d6ba44e2e409f13c37e9789ebb0e2be9f7b 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 c1a7e30235edddf65e8dc2a801bf2389106e9f14..def5003c60eed223477a5b80b618af20ac743e8b 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 bb9a54dcd30b88747147154dc41c31e94e920b05..6c6e8e736ff7aa8ade5eec892a8993bf0ae4fa2d 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 898f9162cd1cdbd22a20ab840ea5313ded0539e0..234aaadaf635daf3cbd48d7b69a39fa92582209e 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 070c0927592a0ccfb6b4f1e83218d388b61f7078..b923062bc9a9a35115ea48cbec1aef192d27ccff 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 efcb7876a6d448e070828c719ec8d452b224a0ce..8d50d2b929db771755e413826a5bee44b428c758 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 fecc79bdff0900068d804b8f36273662bd890106..1d8726c89847681802ce2f3656aa37f850174ca6 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 0a48ef6cd3b84b656d2cebd5d685b64d67f54d66..80145d8b84c15142b97be992968e38601e1f7c5f 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 5a9b2abf975879fc8cd71cf00f7c5a4b1c08afdf..b3332f36f464dde5e067a455c8eedc37606ac9e0 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 f15c9a6fb6530568c25d8a8ee2a712f3ee58336c..7b349f479aa2cfdfd2a113c47069160c8795cbe7 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 e2e505acef4cec7c180c5c3ec70ef5956b18bd6f..178bc637c267980a62d71380fbe087d45f793a0f 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 edf70c120e7f3334f4f2f651403116b77029a614..f2e075c4da2ceba2eca0ece4204f166868723a5a 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 369b3eaa91d99ed3f796e19cd9c25d572ae3fe44..056cb0db4f7b20b3e7a0565bd0d53770b6905ac7 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 c4303f47908db5e22ebfe6b576e1bcad29663546..1e00e85629629072775531d0c579c0dc327de2a7 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 c57d545debcd0563b650bfd5784176fe580ef02f..9059a6d51b280c1acbaef9090ab143cbb688acea 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 4e4d69b0663aa3344c9ae8682cd702eeb2a612a1..b7c994598010e8ee036136c62833bf5e555b6dab 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 944811029bb5abfdda7384fda8ebe002d01d7308..abb41ad06a8e812569217467106b04f8e2877600 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 6d33ccb06db2dd35e0ca2cab196375ca8dd89426..3fd9e896f91e5a0a785394abe255f1e7d52b7f4a 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');