From 6bce5ddc4b66e831896c86af17b64067f6a6ffd5 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 30 Jan 2016 18:30:20 +0200 Subject: [PATCH] Scale of player's skin is now preserved on corpses after reborn --- src/g_game.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/g_game.cpp b/src/g_game.cpp index 7257ed269..7f6305ca4 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1631,6 +1631,18 @@ static void G_QueueBody (AActor *body) translationtables[TRANSLATION_PlayerCorpses][modslot]->UpdateNative(); } + const int skinidx = body->player->userinfo.GetSkin(); + + if (0 != skinidx && !(body->flags4 & MF4_NOSKIN)) + { + // Apply skin's scale to actor's scale, it will be lost otherwise + const AActor *const defaultActor = body->GetDefault(); + const FPlayerSkin &skin = skins[skinidx]; + + body->scaleX = Scale(body->scaleX, skin.ScaleX, defaultActor->scaleX); + body->scaleY = Scale(body->scaleY, skin.ScaleY, defaultActor->scaleY); + } + bodyqueslot++; }