From 79d3a361069ad452c4c725d9f8b633ca0d325358 Mon Sep 17 00:00:00 2001 From: Dino Bollinger Date: Sun, 14 Jun 2020 01:22:16 +0200 Subject: [PATCH] Duke3D: Fix frozen players floating in mid-air --- source/duke3d/src/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 062429b42..ae36a8060 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -3529,9 +3529,9 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura t->x -= mulscale16(65536-smoothratio,ps->pos.x-ps->opos.x); t->y -= mulscale16(65536-smoothratio,ps->pos.y-ps->opos.y); // dirty hack - if (ps->dead_flag) t->z = ps->opos.z; + if (ps->dead_flag || sprite[ps->i].extra <= 0) t->z = ps->opos.z; t->z += mulscale16(smoothratio,ps->pos.z-ps->opos.z) - - (ps->dead_flag ? 0 : PHEIGHT) + PHEIGHT; + ((ps->dead_flag || sprite[ps->i].extra <= 0) ? 0 : PHEIGHT) + PHEIGHT; } else if (pSprite->picnum != CRANEPOLE) {