From: Lyberta Date: Mon, 28 Aug 2017 22:05:31 +0000 (+0300) Subject: URS: Ported Blood loss mutator to URS. X-Git-Tag: xonotic-v0.8.5~2488^2~14 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=098655201f3710fde7eb66c512f46006a7561d82;p=xonotic%2Fxonotic-data.pk3dir.git URS: Ported Blood loss mutator to URS. --- diff --git a/qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qc b/qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qc index 61b0c0601..d1b265816 100644 --- a/qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qc +++ b/qcsrc/common/mutators/mutator/bloodloss/sv_bloodloss.qc @@ -9,7 +9,7 @@ MUTATOR_HOOKFUNCTION(bloodloss, PlayerPreThink) entity player = M_ARGV(0, entity); if(IS_PLAYER(player)) - if(player.health <= autocvar_g_bloodloss && !IS_DEAD(player)) + if(GetResourceAmount(player, RESOURCE_HEALTH) <= autocvar_g_bloodloss && !IS_DEAD(player)) { PHYS_INPUT_BUTTON_CROUCH(player) = true; @@ -28,7 +28,7 @@ MUTATOR_HOOKFUNCTION(bloodloss, PlayerJump) { entity player = M_ARGV(0, entity); - if(player.health <= autocvar_g_bloodloss) + if(GetResourceAmount(player, RESOURCE_HEALTH) <= autocvar_g_bloodloss) return true; }