mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
Merge pull request #521 from alexey-lysiuk/fix_corpse_scale
Scale of player's skin is now preserved on corpses after reborn
This commit is contained in:
commit
d826ef8be1
1 changed files with 12 additions and 0 deletions
|
@ -1631,6 +1631,18 @@ static void G_QueueBody (AActor *body)
|
||||||
translationtables[TRANSLATION_PlayerCorpses][modslot]->UpdateNative();
|
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++;
|
bodyqueslot++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue