]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ent_cs.qc
Merge remote-tracking branch 'origin/divVerent/allow-override-item-model'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ent_cs.qc
index 0763785bc0cd996a6ffb1b7551ec442e18fb4413..af9a73ecaed21e347608e137aa2ec52b6ccd5d81 100644 (file)
@@ -18,7 +18,7 @@
 void entcs_init()
 {
        print("Initializing ClientSide information entities\n");
-};
+}
 
 float entcs_customize()
 {
@@ -30,8 +30,8 @@ float entcs_customize()
                return FALSE;
        if(other == o)
                return FALSE;
-       if(other.classname == "player")
-               if(!teams_matter || o.team != other.team)
+       if((other.classname == "player") || other.caplayer)
+               if(!teamplay || o.team != other.team)
                        if not (radar_showennemies)
                                return FALSE;
        return TRUE;
@@ -39,12 +39,6 @@ float entcs_customize()
 
 float entcs_send(entity to, float sf)
 {
-       // a simple safeguard, should not REALLY be needed
-       sf |= 128;
-       if(teams_matter && !radar_showennemies)
-               if(to.team != self.team)
-                       sf &~= (8 | 16 | 128); // don't send h/a for enemies
-
        WriteByte(MSG_ENTITY, ENT_CLIENT_ENTCS);
        WriteByte(MSG_ENTITY, sf);
        if(sf & 1)
@@ -62,11 +56,11 @@ 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()
 {
-       self.nextthink = time;
+       self.nextthink = time + 0.033333333333; // increase this to like 0.15 once the client can do smoothing
 
        entity o;
        o = self.owner;
@@ -91,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";
@@ -109,10 +103,10 @@ entity attach_entcs()
        self.entcs = ent;
 
        return ent;
-};
+}
 
 void detach_entcs()
 {
        remove(self.entcs);
        self.entcs = world;
-};
+}