X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fonslaught%2Fsv_controlpoint.qc;h=4617d6a3ca1e711b5371c0cc0e960343311fca0f;hb=5d929ee0b1dc587e3154a4fa4b56e83b9ba9100b;hp=491acdd007d8635cac7417c2bd5acdc11c6cff95;hpb=fc15d72b041c9a748b605ba28735380fbe5b5b01;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc index 491acdd00..4617d6a3c 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc @@ -5,14 +5,14 @@ bool cpicon_send(entity this, entity to, int sf) { WriteHeader(MSG_ENTITY, ENT_CLIENT_CONTROLPOINT_ICON); + if(sf & CPSF_SETUP) + sf &= ~CPSF_STATUS; WriteByte(MSG_ENTITY, sf); if(sf & CPSF_SETUP) { - WriteCoord(MSG_ENTITY, this.origin_x); - WriteCoord(MSG_ENTITY, this.origin_y); - WriteCoord(MSG_ENTITY, this.origin_z); + WriteVector(MSG_ENTITY, this.origin); - WriteByte(MSG_ENTITY, this.health); + WriteByte(MSG_ENTITY, GetResource(this, RES_HEALTH)); WriteByte(MSG_ENTITY, this.max_health); WriteByte(MSG_ENTITY, this.count); WriteByte(MSG_ENTITY, this.team); @@ -23,10 +23,10 @@ bool cpicon_send(entity this, entity to, int sf) { WriteByte(MSG_ENTITY, this.team); - if(this.health <= 0) + if(GetResource(this, RES_HEALTH) <= 0) WriteByte(MSG_ENTITY, 0); else - WriteByte(MSG_ENTITY, ceil((this.health / this.max_health) * 255)); + WriteByte(MSG_ENTITY, ceil((GetResource(this, RES_HEALTH) / this.max_health) * 255)); } return true;