From 2e8f513eb52384af393931e1faeaa53783a62b29 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 30 Aug 2018 16:28:01 -0400 Subject: [PATCH] Put on player's center during this animation --- src/k_kart.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/k_kart.c b/src/k_kart.c index 9bc1cd1b..2923b187 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2966,6 +2966,10 @@ static void K_MoveHeldObjects(player_t *player) z = cur->ceilingz - cur->height; } } + + // Center it during the scale up animation + z += (FixedMul(mobjinfo[cur->type].height, player->mo->scale - cur->scale)>>1) * P_MobjFlip(cur); + cur->z = z; cur->momx = cur->momy = 0; cur->angle += ANGLE_90;