]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/ent_cs.qc
Merge remote-tracking branch 'origin/master' into terencehill/menu_remove_tab_title
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / ent_cs.qc
index 4bec01a969053dc43abd606791afa0afe9a0475f..52b15b0953fabc047fcefb668db5c6143bb6221f 100644 (file)
@@ -1,3 +1,8 @@
+#include "_all.qh"
+
+#include "defs.qh"
+#include "mutators/mutators_include.qh"
+
 /**
  * The point of these entities is to avoid the problems
  * with clientprediction.
@@ -25,19 +30,19 @@ float entcs_customize()
        entity o;
        o = self.owner;
        if(o.deadflag != DEAD_NO)
-               return FALSE;
+               return false;
        if (!IS_PLAYER(o))
-               return FALSE;
+               return false;
        if(other == o)
-               return FALSE;
+               return false;
        if((IS_PLAYER(other)) || other.caplayer)
                if(!teamplay || o.team != other.team)
                        if (!radar_showennemies)
-                               return FALSE;
-       return TRUE;
+                               return false;
+       return true;
 }
 
-float entcs_send(entity to, float sf)
+float entcs_send(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_ENTCS);
        WriteByte(MSG_ENTITY, sf);
@@ -55,7 +60,7 @@ float entcs_send(entity to, float sf)
                WriteByte(MSG_ENTITY, self.health / 10); // FIXME use a better scale?
        if(sf & 16)
                WriteByte(MSG_ENTITY, self.armorvalue / 10); // FIXME use a better scale?
-       return TRUE;
+       return true;
 }
 
 void entcs_think()
@@ -97,7 +102,7 @@ entity attach_entcs()
        ent.think = entcs_think;
        ent.nextthink = time;
 
-       Net_LinkEntity(ent, FALSE, 0, entcs_send);
+       Net_LinkEntity(ent, false, 0, entcs_send);
        ent.customizeentityforclient = entcs_customize;
 
        self.entcs = ent;