]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix height of csqcplayer when dead, previously it was wrongly applied the ducked...
authorterencehill <piuntn@gmail.com>
Sat, 2 May 2020 09:07:14 +0000 (11:07 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 2 May 2020 09:07:14 +0000 (11:07 +0200)
qcsrc/common/mutators/mutator/bloodloss/bloodloss.qc
qcsrc/lib/csqcmodel/cl_player.qc

index 2a0ebec455a3016b192630684880ab66703dcbd5..41ceaa91fab751c6bfa7761d77f15cdc44ff9058 100644 (file)
@@ -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
index 19a6c046102c2f9e5797e464f4e4215f76add966..a5610b3de4024428a748bb7aaf375376d569e827 100644 (file)
@@ -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);
        }
 }