X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fonslaught%2Fsv_controlpoint.qc;h=fde9ed6fd7a8c5a058dc756eeada0cf842868693;hb=45d8904a100765555e622598a39967963733df1d;hp=d3b6d5c7f4c09f62d510db50b61c79685f1847b0;hpb=95a5a2479a35e264473e8ba3fc4e584553da42b3;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..fde9ed6fd 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, 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; @@ -36,5 +36,5 @@ void onslaught_controlpoint_icon_link(entity e, void(entity this) spawnproc) { Net_LinkEntity(e, true, 0, cpicon_send); setthink(e, spawnproc); - e.nextthink = time * sys_frametime; + e.nextthink = time + sys_frametime; }