]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/warpzonelib/common.qc
ent_cs: cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / warpzonelib / common.qc
index 7b0b9e723f40a8848fdefb16751f4a8ab8c39c89..0eaaac980c69a3e70cf0ba8974994741776f8507 100644 (file)
@@ -573,15 +573,13 @@ vector WarpZoneLib_NearestPointOnBox(vector mi, vector ma, vector org)
        return nearest;
 }
 
-float WarpZoneLib_BadClassname(string myclassname)
+bool WarpZoneLib_BadEntity(entity e)
 {
+       string myclassname = e.classname;
+       if (e.instanceOfObject) return true;
        switch(myclassname)
        {
-               case "weapon_info":
-               case "monster_info":
                case "deathtype":
-               case "callback":
-               case "callbackchain":
                case "weaponentity":
                case "exteriorweaponentity":
                case "csqc_score_team":
@@ -589,8 +587,8 @@ float WarpZoneLib_BadClassname(string myclassname)
                case "ent_client_scoreinfo":
                case "saved_cvar_value":
                case "accuracy":
-               case "entcs_sender_v2":
-               case "entcs_receiver_v2":
+               case "entcs_sender":
+               case "entcs_receiver":
                case "clientinit":
                case "sprite_waypoint":
                case "waypoint":
@@ -630,7 +628,7 @@ void WarpZone_FindRadius_Recurse(vector org, float rad,        vector org0,
 
        for(e = e0; e; e = e.chain)
        {
-               if(WarpZoneLib_BadClassname(e.classname))
+               if(WarpZoneLib_BadEntity(e))
                        continue;
                p = WarpZoneLib_NearestPointOnBox(e.origin + e.mins, e.origin + e.maxs, org0);
                if(needlineofsight)
@@ -667,7 +665,7 @@ void WarpZone_FindRadius_Recurse(vector org, float rad,        vector org0,
        }
        for(e = wz; e; e = e.WarpZone_findradius_next)
        {
-               if(WarpZoneLib_BadClassname(e.classname))
+               if(WarpZoneLib_BadEntity(e))
                        continue;
 
                org0_new = WarpZone_TransformOrigin(e, org);