]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ent_cs.qc
We DO need to detect double-hits, due to the weird engine tracing that
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ent_cs.qc
index 3ffcb3b3868aa23f16e7628ab816fbb75a5a1ea7..7b3af04bfd9aa9f988f72f7e9a53b28d4ad2a96c 100644 (file)
@@ -18,7 +18,7 @@
 void entcs_init()
 {
        print("Initializing ClientSide information entities\n");
-};
+}
 
 float entcs_customize()
 {
@@ -26,13 +26,13 @@ float entcs_customize()
        o = self.owner;
        if(o.deadflag != DEAD_NO)
                return FALSE;
-       if(o.classname != "player")
+       if (!IS_PLAYER(o))
                return FALSE;
        if(other == o)
                return FALSE;
-       if(other.classname == "player")
-               if(!teams_matter || o.team != other.team)
-                       if not (radar_showennemies)
+       if((IS_PLAYER(other)) || other.caplayer)
+               if(!teamplay || o.team != other.team)
+                       if (!radar_showennemies)
                                return FALSE;
        return TRUE;
 }
@@ -56,7 +56,7 @@ float entcs_send(entity to, float sf)
        if(sf & 16)
                WriteByte(MSG_ENTITY, self.armorvalue / 10); // FIXME use a better scale?
        return TRUE;
-};
+}
 
 void entcs_think()
 {
@@ -85,11 +85,11 @@ void entcs_think()
                self.armorvalue = o.armorvalue;
                self.SendFlags |= 16;
        }
-};
+}
 
 entity attach_entcs()
 {
-       local entity ent;
+       entity ent;
 
        ent = spawn();
        ent.classname = "entcs_sender_v2";
@@ -103,10 +103,10 @@ entity attach_entcs()
        self.entcs = ent;
 
        return ent;
-};
+}
 
 void detach_entcs()
 {
        remove(self.entcs);
        self.entcs = world;
-};
+}