From: terencehill Date: Sat, 2 May 2020 09:07:14 +0000 (+0200) Subject: Fix height of csqcplayer when dead, previously it was wrongly applied the ducked... X-Git-Tag: xonotic-v0.8.5~1094 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ecfecb7987105113a9b1d0fd1f5590cdfbdddbb8;p=xonotic%2Fxonotic-data.pk3dir.git Fix height of csqcplayer when dead, previously it was wrongly applied the ducked height since the bloodloss code wrongly set do_crouch to true when dead --- diff --git a/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc index 2a0ebec45..41ceaa91f 100644 --- a/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc +++ b/qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc @@ -57,12 +57,12 @@ MUTATOR_HOOKFUNCTION(bloodloss, BuildMutatorsPrettyString) #ifdef CSQC MUTATOR_HOOKFUNCTION(bloodloss, PlayerCanCrouch) { - if(STAT(HEALTH) <= STAT(BLOODLOSS)) + if(STAT(HEALTH) > 0 && STAT(HEALTH) <= STAT(BLOODLOSS)) M_ARGV(1, bool) = true; // do_crouch } MUTATOR_HOOKFUNCTION(bloodloss, PlayerJump) { - if(STAT(HEALTH) <= STAT(BLOODLOSS)) + if(STAT(HEALTH) > 0 && STAT(HEALTH) <= STAT(BLOODLOSS)) return true; } #endif diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index 19a6c0461..a5610b3de 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -108,6 +108,8 @@ void CSQCPlayer_SetMinsMaxs(entity this) { this.mins = PHYS_PL_MIN(this); this.maxs = PHYS_PL_MAX(this); + if (IS_DEAD(this)) + this.maxs.z = 5; this.view_ofs = PHYS_PL_VIEWOFS(this); } }