]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove some classname assignments TimePath/spawnfuncs
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 8 Oct 2017 01:01:59 +0000 (12:01 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 8 Oct 2017 01:07:55 +0000 (12:07 +1100)
15 files changed:
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/miscfunctions.qh
qcsrc/client/teamradar.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/ent_cs.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/target/location.qc
qcsrc/common/triggers/trigger/impulse.qc
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/keylock.qc
qcsrc/common/triggers/trigger/swamp.qc
qcsrc/common/triggers/trigger/teleport.qc
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/common/wepent.qc
qcsrc/lib/csqcmodel/cl_model.qc

index 6499a683e8f4c2cf198be39cb0bee2c9eb9e9a3f..abf117c11a8975a1a1b4c68bf5aa43532befd88c 100644 (file)
@@ -415,7 +415,7 @@ void CSQCModel_AutoTagIndex_Apply(entity this)
                }
 
                // recursive predraw call to fix issues with forcemodels and LOD if bone indexes mismatch
-               if(this.tag_entity.classname == "csqcmodel")
+               if(this.tag_entity.classname == "ENT_CLIENT_MODEL")
                {
                        CSQCModel_Hook_PreDraw(this.tag_entity, (this.tag_entity.entnum >= 1 && this.tag_entity.entnum <= maxclients));
                }
index f23a3976b55c6fcaba36a0ec2d5301f80ab0ba8f..db653decdcf607bebdf3fb4b21ffad047a9ef367 100644 (file)
@@ -34,7 +34,7 @@ float PreviewExists(string name);
 vector Rotate(vector v, float a);
 
 
-#define IS_DEAD(s) (((s).classname == "csqcmodel") ? (s).csqcmodel_isdead : ((s).health <= 0))
+#define IS_DEAD(s) (((s).classname == "ENT_CLIENT_MODEL") ? (s).csqcmodel_isdead : ((s).health <= 0))
 
 
 // decolorizes and team colors the player name when needed
index 7f1654de0660b3d20890730feb19f0417c3252d6..c3e3a56600e5c77cf2439c9aaebfe09c8bb08cb1 100644 (file)
@@ -203,7 +203,6 @@ NET_HANDLE(ENT_CLIENT_RADARLINK, bool isnew)
        InterpolateOrigin_Undo(this);
 
        this.iflags = IFLAG_VELOCITY | IFLAG_ORIGIN;
-       this.classname = "radarlink";
        if (isnew) IL_PUSH(g_radarlinks, this);
 
        if(sendflags & 1)
index 3d2d32d9af16bff4eeb0c6ca89d1e7951c71e1c5..bbebd374dce8a1907ef245c8800d43f0238ef7a1 100644 (file)
@@ -500,7 +500,6 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
        if (!(this.count & 0x80))
                InterpolateOrigin_Note(this);
 
-       this.classname = "csqcprojectile";
        this.draw = Projectile_Draw;
        if (isnew) IL_PUSH(g_drawables, this);
        this.entremove = Ent_RemoveProjectile;
index 12abc21b18a255a29821912a00f8968ac1588ff9..7a1685096bbf7b2706a35d2d1ccd443de14ee8e2 100644 (file)
@@ -201,7 +201,7 @@ ENTCS_PROP(FRAGS, true, frags, ENTCS_SET_NORMAL,
                {
                        if (!this)
                                // initial = temp
-                               e = new_pure(entcs_receiver);
+                               e = new_pure(ENT_CLIENT_ENTCS);
                        else
                                // initial = linked
                                e = this;
@@ -237,7 +237,6 @@ ENTCS_PROP(FRAGS, true, frags, ENTCS_SET_NORMAL,
                if (isnew)
                {
                        make_pure(this);
-                       this.classname = "entcs_receiver";
                        this.entremove = Ent_RemoveEntCS;
                }
                return ReadEntcs(this);
index dc0be6ae24a9822b67865e2c4a2cb0c6b0b32c6b..bbafc15c91cc87d408e2308a4d42876c992cffdd 100644 (file)
@@ -424,7 +424,7 @@ void door_trigger_touch(entity this, entity toucher)
 #ifdef SVQC
                if (!((toucher.iscreature || (toucher.flags & FL_PROJECTILE)) && !IS_DEAD(toucher)))
 #elif defined(CSQC)
-               if(!((IS_CLIENT(toucher) || toucher.classname == "csqcprojectile") && !IS_DEAD(toucher)))
+               if(!((IS_CLIENT(toucher) || toucher.classname == "ENT_CLIENT_PROJECTILE") && !IS_DEAD(toucher)))
 #endif
                        return;
 
index c673308a6c02349a381d4450e8df58df56800162..2169e1b89e809486aa8bf9827682a7ea4687350a 100644 (file)
@@ -14,11 +14,7 @@ spawnfunc(target_location)
 
 spawnfunc(info_location)
 {
-    this.classname = "target_location";
     this.message = this.netname;
-
-    target_push_init(this);
-
-    IL_PUSH(g_locations, this);
+    spawnfunc_target_location(this);
 }
 #endif
index 4be6e86bca66c6c02fcf2adbd3c7141721292647..7fec91da18e57a9d6617c76d7c0973dffcae0e18 100644 (file)
@@ -200,7 +200,6 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_IMPULSE, bool isnew)
        trigger_common_read(this, true);
        return = true;
 
-       this.classname = "trigger_impulse";
        this.solid = SOLID_TRIGGER;
        this.entremove = trigger_remove_generic;
        this.move_time = time;
index df965074587315eebbc4781704aba2f7386410f9..31e12ae46fa1a89fd82feed9181581d81716ead8 100644 (file)
@@ -457,7 +457,6 @@ spawnfunc(target_position) { target_push_init(this); }
 
 NET_HANDLE(ENT_CLIENT_TRIGGER_PUSH, bool isnew)
 {
-       this.classname = "jumppad";
        int mytm = ReadByte(); if(mytm) { this.team = mytm - 1; }
        this.spawnflags = ReadInt24_t();
        this.active = ReadByte();
@@ -491,7 +490,6 @@ void target_push_remove(entity this)
 
 NET_HANDLE(ENT_CLIENT_TARGET_PUSH, bool isnew)
 {
-       this.classname = "push_target";
        this.cnt = ReadByte();
        this.targetname = strzone(ReadString());
        this.origin_x = ReadCoord();
index bf20d1e9732e4dfe133ed4fc5473ae50b5021bd9..de1eb91205272e7a8f934968abc44d589b1459c6 100644 (file)
@@ -192,7 +192,6 @@ NET_HANDLE(ENT_CLIENT_KEYLOCK, bool isnew)
 
        return = true;
 
-       this.classname = "trigger_keylock";
        this.entremove = keylock_remove;
 }
 #endif
index 71c5247c7446c5332d12e62b7f9084e105e47bd9..9de11dc1ed0950f3321edae31933cee9b29bdaaf 100644 (file)
@@ -147,7 +147,6 @@ NET_HANDLE(ENT_CLIENT_SWAMP, bool isnew)
 
        return = true;
 
-       this.classname = "trigger_swamp";
        this.solid = SOLID_TRIGGER;
        settouch(this, swamp_touch);
        this.drawmask = MASK_NORMAL;
index 5f545f01418488f4375c229715a06040e3fb2c87..6be885aa0a090d640e3404cb8f033b74366a4cbf 100644 (file)
@@ -104,7 +104,6 @@ spawnfunc(trigger_teleport)
 #elif defined(CSQC)
 NET_HANDLE(ENT_CLIENT_TRIGGER_TELEPORT, bool isnew)
 {
-       this.classname = "trigger_teleport";
        if(isnew)
                IL_PUSH(g_teleporters, this);
        int mytm = ReadByte(); if(mytm) { this.team = mytm - 1; }
index 198b18a3353343ce51e276bf6b9e6788fa15f68c..c5befdb07f0377fe38e04c69af3789b97df724d4 100644 (file)
@@ -161,7 +161,6 @@ NET_HANDLE(ENT_CLIENT_VIEWLOC_TRIGGER, bool isnew)
        setthink(this, trigger_viewloc_updatelink);
        this.nextthink = time + 1; // we need to delay this or else
 
-       this.classname = "trigger_viewlocation";
        this.drawmask = MASK_NORMAL; // not so concerned, but better keep it alive
 }
 
index 8d74a7b3272ffc2da3ef3650fff42a223357cf16..321224ebc12d0dd6eaa3741ba72f6c23e02fdf11 100644 (file)
@@ -155,8 +155,6 @@ MACRO_END
 
        NET_HANDLE(ENT_CLIENT_WEPENT, bool isnew)
        {
-               if (isnew)
-                       this.classname = "wepent_receiver";
                return ReadWepent(this);
        }
 
index 05aba388c4b7c27a49d13cdb160a75afc559a43b..a65f0291cf6484853a850fc041efdbad62367c25 100644 (file)
@@ -234,7 +234,6 @@ NET_HANDLE(ENT_CLIENT_MODEL, bool isnew)
        bool islocalplayer = (this.entnum == player_localnum + 1);
        noref bool isnolocalplayer = (isplayer && !islocalplayer);
 
-       this.classname = "csqcmodel";
        this.iflags |= IFLAG_ORIGIN; // interpolate origin too
        this.iflags |= IFLAG_ANGLES; // interpolate angles too
        this.iflags |= IFLAG_VELOCITY | IFLAG_AUTOVELOCITY; // let's calculate velocity automatically