X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fonslaught%2Fsv_controlpoint.qc;h=a00af18ff83119b0c991312fefdf3c8f981f0ec2;hb=50d6cb6a02a959a7303b5b687631b664a807b26f;hp=d3b6d5c7f4c09f62d510db50b61c79685f1847b0;hpb=b465997efce43e701dc89d56d82b5ae510505056;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 d3b6d5c7f..a00af18ff 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc @@ -12,7 +12,7 @@ bool cpicon_send(entity this, entity to, int sf) { WriteVector(MSG_ENTITY, this.origin); - WriteByte(MSG_ENTITY, this.health); + WriteByte(MSG_ENTITY, GetResourceAmount(this, RESOURCE_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(GetResourceAmount(this, RESOURCE_HEALTH) <= 0) WriteByte(MSG_ENTITY, 0); else - WriteByte(MSG_ENTITY, ceil((this.health / this.max_health) * 255)); + WriteByte(MSG_ENTITY, ceil((GetResourceAmount(this, RESOURCE_HEALTH) / this.max_health) * 255)); } return true;