From: TimePath Date: Sun, 8 Oct 2017 01:01:59 +0000 (+1100) Subject: Remove some classname assignments X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4778ff6deb1651d926a57fc1d9aeaee1bd7b4791;p=xonotic%2Fxonotic-data.pk3dir.git Remove some classname assignments --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 6499a683e..abf117c11 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -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)); } diff --git a/qcsrc/client/miscfunctions.qh b/qcsrc/client/miscfunctions.qh index f23a3976b..db653decd 100644 --- a/qcsrc/client/miscfunctions.qh +++ b/qcsrc/client/miscfunctions.qh @@ -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 diff --git a/qcsrc/client/teamradar.qc b/qcsrc/client/teamradar.qc index 7f1654de0..c3e3a5660 100644 --- a/qcsrc/client/teamradar.qc +++ b/qcsrc/client/teamradar.qc @@ -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) diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 3d2d32d9a..bbebd374d 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -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; diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index 12abc21b1..7a1685096 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -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); diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index dc0be6ae2..bbafc15c9 100644 --- a/qcsrc/common/triggers/func/door.qc +++ b/qcsrc/common/triggers/func/door.qc @@ -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; diff --git a/qcsrc/common/triggers/target/location.qc b/qcsrc/common/triggers/target/location.qc index c673308a6..2169e1b89 100644 --- a/qcsrc/common/triggers/target/location.qc +++ b/qcsrc/common/triggers/target/location.qc @@ -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 diff --git a/qcsrc/common/triggers/trigger/impulse.qc b/qcsrc/common/triggers/trigger/impulse.qc index 4be6e86bc..7fec91da1 100644 --- a/qcsrc/common/triggers/trigger/impulse.qc +++ b/qcsrc/common/triggers/trigger/impulse.qc @@ -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; diff --git a/qcsrc/common/triggers/trigger/jumppads.qc b/qcsrc/common/triggers/trigger/jumppads.qc index df9650745..31e12ae46 100644 --- a/qcsrc/common/triggers/trigger/jumppads.qc +++ b/qcsrc/common/triggers/trigger/jumppads.qc @@ -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(); diff --git a/qcsrc/common/triggers/trigger/keylock.qc b/qcsrc/common/triggers/trigger/keylock.qc index bf20d1e97..de1eb9120 100644 --- a/qcsrc/common/triggers/trigger/keylock.qc +++ b/qcsrc/common/triggers/trigger/keylock.qc @@ -192,7 +192,6 @@ NET_HANDLE(ENT_CLIENT_KEYLOCK, bool isnew) return = true; - this.classname = "trigger_keylock"; this.entremove = keylock_remove; } #endif diff --git a/qcsrc/common/triggers/trigger/swamp.qc b/qcsrc/common/triggers/trigger/swamp.qc index 71c5247c7..9de11dc1e 100644 --- a/qcsrc/common/triggers/trigger/swamp.qc +++ b/qcsrc/common/triggers/trigger/swamp.qc @@ -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; diff --git a/qcsrc/common/triggers/trigger/teleport.qc b/qcsrc/common/triggers/trigger/teleport.qc index 5f545f014..6be885aa0 100644 --- a/qcsrc/common/triggers/trigger/teleport.qc +++ b/qcsrc/common/triggers/trigger/teleport.qc @@ -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; } diff --git a/qcsrc/common/triggers/trigger/viewloc.qc b/qcsrc/common/triggers/trigger/viewloc.qc index 198b18a33..c5befdb07 100644 --- a/qcsrc/common/triggers/trigger/viewloc.qc +++ b/qcsrc/common/triggers/trigger/viewloc.qc @@ -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 } diff --git a/qcsrc/common/wepent.qc b/qcsrc/common/wepent.qc index 8d74a7b32..321224ebc 100644 --- a/qcsrc/common/wepent.qc +++ b/qcsrc/common/wepent.qc @@ -155,8 +155,6 @@ MACRO_END NET_HANDLE(ENT_CLIENT_WEPENT, bool isnew) { - if (isnew) - this.classname = "wepent_receiver"; return ReadWepent(this); } diff --git a/qcsrc/lib/csqcmodel/cl_model.qc b/qcsrc/lib/csqcmodel/cl_model.qc index 05aba388c..a65f0291c 100644 --- a/qcsrc/lib/csqcmodel/cl_model.qc +++ b/qcsrc/lib/csqcmodel/cl_model.qc @@ -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