X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fent_cs.qc;h=4bec01a969053dc43abd606791afa0afe9a0475f;hb=6c4f62990980e74d4a0963b7179c7c964f535398;hp=af9a73ecaed21e347608e137aa2ec52b6ccd5d81;hpb=3a264e945a45a04f4566feb9e9a91e0d5266361e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/ent_cs.qc b/qcsrc/server/ent_cs.qc index af9a73eca..4bec01a96 100644 --- a/qcsrc/server/ent_cs.qc +++ b/qcsrc/server/ent_cs.qc @@ -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") || other.caplayer) + if((IS_PLAYER(other)) || other.caplayer) if(!teamplay || o.team != other.team) - if not (radar_showennemies) + if (!radar_showennemies) return FALSE; return TRUE; } @@ -45,12 +45,12 @@ float entcs_send(entity to, float sf) WriteByte(MSG_ENTITY, num_for_edict(self.owner)-1); if(sf & 2) { - WriteShort(MSG_ENTITY, self.origin_x); - WriteShort(MSG_ENTITY, self.origin_y); - WriteShort(MSG_ENTITY, self.origin_z); + WriteShort(MSG_ENTITY, self.origin.x); + WriteShort(MSG_ENTITY, self.origin.y); + WriteShort(MSG_ENTITY, self.origin.z); } if(sf & 4) - WriteByte(MSG_ENTITY, self.angles_y * 256.0 / 360); + WriteByte(MSG_ENTITY, self.angles.y * 256.0 / 360); if(sf & 8) WriteByte(MSG_ENTITY, self.health / 10); // FIXME use a better scale? if(sf & 16) @@ -70,7 +70,7 @@ void entcs_think() setorigin(self, o.origin); self.SendFlags |= 2; } - if(o.angles_y != self.angles_y) + if(o.angles.y != self.angles.y) { self.angles = o.angles; self.SendFlags |= 4;