]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean out some more SELFPARAMs
authorMario <mario@smbclan.net>
Fri, 10 Jun 2016 12:07:16 +0000 (22:07 +1000)
committerMario <mario@smbclan.net>
Fri, 10 Jun 2016 12:07:16 +0000 (22:07 +1000)
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/func/rainsnow.qc
qcsrc/common/turrets/targettrigger.qc
qcsrc/lib/net.qh
qcsrc/server/g_models.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_subs.qh

index d4abe5b8168fa92a62c3647de13e896893ad920d..9bbdfd48b548dcc1dd217328d970343581673054 100644 (file)
@@ -319,7 +319,7 @@ spawnfunc(func_breakable)
                this.dmg_force = 200;
 
        this.mdl = this.model;
-       WITHSELF(this, SetBrushEntityModel());
+       SetBrushEntityModel(this);
 
        if(this.spawnflags & 4)
                this.use = func_breakable_destroy;
index 1bb1bd47b416fb978f3b8af75ced491357b2ee56..dc569f69a1a738a1f8dbecefa82d6d69ee12fbc9 100644 (file)
@@ -37,7 +37,7 @@ spawnfunc(func_rain)
        this.angles = '0 0 0';
        this.movetype = MOVETYPE_NONE;
        this.solid = SOLID_NOT;
-       SetBrushEntityModel();
+       SetBrushEntityModel(this);
        if (!this.cnt)
                this.cnt = 12;
        if (!this.count)
@@ -75,7 +75,7 @@ spawnfunc(func_snow)
        this.angles = '0 0 0';
        this.movetype = MOVETYPE_NONE;
        this.solid = SOLID_NOT;
-       SetBrushEntityModel();
+       SetBrushEntityModel(this);
        if (!this.cnt)
                this.cnt = 12;
        if (!this.count)
index 362cd0883771310cf7b6e1b3f8ce4332c3fb18af..15dbaec4f009b0c8d87fba54e6c0269c72f41709 100644 (file)
@@ -18,7 +18,7 @@ spawnfunc(turret_targettrigger)
 {
     if(!autocvar_g_turrets) { remove(this); return; }
 
-    WITHSELF(this, InitTrigger());
+    InitTrigger(this);
 
     settouch(this, turret_targettrigger_touch);
 }
index 75644b3ad77089eaa3a478d925c7b91939b9252f..771782ea721ccdf0ac27ba4e06fa5160aabc5bcd 100644 (file)
@@ -133,10 +133,10 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); }
                e.SendEntity = func_null;
        }
 
-       .void() uncustomizeentityforclient;
+       .void(entity this) uncustomizeentityforclient;
        .float uncustomizeentityforclient_set;
 
-       void SetCustomizer(entity e, bool(entity this) customizer, void() uncustomizer)
+       void SetCustomizer(entity e, bool(entity this) customizer, void(entity this) uncustomizer)
        {
                setcefc(e, customizer);
                e.uncustomizeentityforclient = uncustomizer;
@@ -145,7 +145,7 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); }
 
        void UncustomizeEntitiesRun()
        {
-               FOREACH_ENTITY_FLOAT(uncustomizeentityforclient_set, true, WITHSELF(it, it.uncustomizeentityforclient()));
+               FOREACH_ENTITY_FLOAT(uncustomizeentityforclient_set, true, it.uncustomizeentityforclient(it));
        }
 
        STRING_ITERATOR(g_buf, string_null, 0);
index 363650ce8c097d9e710d68d0fea885bd4d8f870b..38e72c7329977c77e6d022c33908f5cc1742c5fd 100644 (file)
@@ -167,7 +167,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
 #define G_MODEL_INIT(ent,sol) \
        if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) ent.movetype = MOVETYPE_PHYSICS; \
        if(!ent.scale) ent.scale = ent.modelscale; \
-       SetBrushEntityModel(); \
+       SetBrushEntityModel(ent); \
        ent.use = g_model_setcolormaptoactivator; \
        InitializeEntity(ent, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
        if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT;
@@ -175,7 +175,7 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf)
 #define G_CLIENTMODEL_INIT(ent,sol) \
        if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) ent.movetype = MOVETYPE_PHYSICS; \
        if(!ent.scale) ent.scale = ent.modelscale; \
-       SetBrushEntityModel(); \
+       SetBrushEntityModel(ent); \
        ent.use = g_clientmodel_use; \
        InitializeEntity(ent, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
        if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT; \
index 5d4f156165e0c8ba1d646d8422ae3424565ff1bd..2134278a2b1027c71c63e3514814c6a79c98683f 100644 (file)
@@ -260,8 +260,8 @@ float LOD_customize(entity this)
        return true;
 }
 
-void LOD_uncustomize()
-{SELFPARAM();
+void LOD_uncustomize(entity this)
+{
        this.modelindex = this.lodmodelindex0;
 }
 
@@ -352,43 +352,43 @@ void ApplyMinMaxScaleAngles(entity e)
                setsize(e, e.mins, e.maxs);
 }
 
-void SetBrushEntityModel()
-{SELFPARAM();
-       if(self.model != "")
+void SetBrushEntityModel(entity this)
+{
+       if(this.model != "")
        {
-               precache_model(self.model);
-               if(self.mins != '0 0 0' || self.maxs != '0 0 0')
+               precache_model(this.model);
+               if(this.mins != '0 0 0' || this.maxs != '0 0 0')
                {
-                       vector mi = self.mins;
-                       vector ma = self.maxs;
-                       _setmodel(self, self.model); // no precision needed
-                       setsize(self, mi, ma);
+                       vector mi = this.mins;
+                       vector ma = this.maxs;
+                       _setmodel(this, this.model); // no precision needed
+                       setsize(this, mi, ma);
                }
                else
-                       _setmodel(self, self.model); // no precision needed
-               InitializeEntity(self, LODmodel_attach, INITPRIO_FINDTARGET);
+                       _setmodel(this, this.model); // no precision needed
+               InitializeEntity(this, LODmodel_attach, INITPRIO_FINDTARGET);
        }
-       setorigin(self, self.origin);
-       ApplyMinMaxScaleAngles(self);
+       setorigin(this, this.origin);
+       ApplyMinMaxScaleAngles(this);
 }
 
-void SetBrushEntityModelNoLOD()
-{SELFPARAM();
-       if(self.model != "")
+void SetBrushEntityModelNoLOD(entity this)
+{
+       if(this.model != "")
        {
-               precache_model(self.model);
-               if(self.mins != '0 0 0' || self.maxs != '0 0 0')
+               precache_model(this.model);
+               if(this.mins != '0 0 0' || this.maxs != '0 0 0')
                {
-                       vector mi = self.mins;
-                       vector ma = self.maxs;
-                       _setmodel(self, self.model); // no precision needed
-                       setsize(self, mi, ma);
+                       vector mi = this.mins;
+                       vector ma = this.maxs;
+                       _setmodel(this, this.model); // no precision needed
+                       setsize(this, mi, ma);
                }
                else
-                       _setmodel(self, self.model); // no precision needed
+                       _setmodel(this, this.model); // no precision needed
        }
-       setorigin(self, self.origin);
-       ApplyMinMaxScaleAngles(self);
+       setorigin(this, this.origin);
+       ApplyMinMaxScaleAngles(this);
 }
 
 /*
@@ -410,28 +410,28 @@ void SetMovedir(entity this)
        this.angles = '0 0 0';
 }
 
-void InitTrigger()
-{SELFPARAM();
+void InitTrigger(entity this)
+{
 // trigger angles are used for one-way touches.  An angle of 0 is assumed
 // to mean no restrictions, so use a yaw of 360 instead.
        SetMovedir(self);
        self.solid = SOLID_TRIGGER;
-       SetBrushEntityModel();
+       SetBrushEntityModel(this);
        self.movetype = MOVETYPE_NONE;
        self.modelindex = 0;
        self.model = "";
 }
 
-void InitSolidBSPTrigger()
-{SELFPARAM();
+void InitSolidBSPTrigger(entity this)
+{
 // trigger angles are used for one-way touches.  An angle of 0 is assumed
 // to mean no restrictions, so use a yaw of 360 instead.
-       SetMovedir(self);
-       self.solid = SOLID_BSP;
-       SetBrushEntityModel();
-       self.movetype = MOVETYPE_NONE; // why was this PUSH? -div0
-//     self.modelindex = 0;
-       self.model = "";
+       SetMovedir(this);
+       this.solid = SOLID_BSP;
+       SetBrushEntityModel(this);
+       this.movetype = MOVETYPE_NONE; // why was this PUSH? -div0
+//     this.modelindex = 0;
+       this.model = "";
 }
 
 bool InitMovingBrushTrigger(entity this)
@@ -439,7 +439,7 @@ bool InitMovingBrushTrigger(entity this)
 // trigger angles are used for one-way touches.  An angle of 0 is assumed
 // to mean no restrictions, so use a yaw of 360 instead.
        this.solid = SOLID_BSP;
-       WITHSELF(this, SetBrushEntityModel());
+       SetBrushEntityModel(this);
        this.movetype = MOVETYPE_PUSH;
        if(this.modelindex == 0)
        {
index 59199334638918308487ea18189a80c20823d845..b18cc67b5ddd26ed83d9015ed81b3f7aa4e38e88 100644 (file)
@@ -140,15 +140,15 @@ float angc (float a1, float a2);
 
 float LOD_customize(entity this);
 
-void LOD_uncustomize();
+void LOD_uncustomize(entity this);
 
 void LODmodel_attach(entity this);
 
 void ApplyMinMaxScaleAngles(entity e);
 
-void SetBrushEntityModel();
+void SetBrushEntityModel(entity this);
 
-void SetBrushEntityModelNoLOD();
+void SetBrushEntityModelNoLOD(entity this);
 
 /*
 ================
@@ -158,8 +158,8 @@ InitTrigger
 
 void SetMovedir(entity this);
 
-void InitTrigger();
+void InitTrigger(entity this);
 
-void InitSolidBSPTrigger();
+void InitSolidBSPTrigger(entity this);
 
 bool InitMovingBrushTrigger(entity this);