From ae2df6e848cc17ebec51b18fa2427675e39ee996 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 11 Sep 2018 01:02:08 +1000 Subject: [PATCH] Fix a random reference to .health and .armorvalue in bot CTF code --- qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index efbbf94e7..2696a4e87 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -1519,7 +1519,7 @@ void havocbot_goalrating_ctf_enemyflag(entity this, float ratingscale) { // adjust rating of our flag carrier depending on his health head = head.tag_entity; - float f = bound(0, (head.health + head.armorvalue) / 100, 2) - 1; + float f = bound(0, (GetResourceAmount(head, RESOURCE_HEALTH) + GetResourceAmount(head, RESOURCE_ARMOR)) / 100, 2) - 1; ratingscale += ratingscale * f * 0.1; } navigation_routerating(this, head, ratingscale, 10000); -- 2.39.2