mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- Fixed: Don't use the player skin in the cast call if the class being shown has been removed
from the PlayerClasses array (and therefore does not have a valid default skin). SVN r4010 (trunk)
This commit is contained in:
parent
ca2d75307c
commit
002aa807c5
1 changed files with 10 additions and 6 deletions
|
@ -589,18 +589,22 @@ void DIntermissionScreenCast::Drawer ()
|
|||
// draw the current frame in the middle of the screen
|
||||
if (caststate != NULL)
|
||||
{
|
||||
int castsprite;
|
||||
int castsprite = caststate->sprite;
|
||||
|
||||
if (!(mDefaults->flags4 & MF4_NOSKIN) &&
|
||||
mDefaults->SpawnState != NULL && caststate->sprite == mDefaults->SpawnState->sprite &&
|
||||
mClass->IsDescendantOf(RUNTIME_CLASS(APlayerPawn)) &&
|
||||
skins != NULL)
|
||||
{
|
||||
castsprite = skins[players[consoleplayer].userinfo.skin].sprite;
|
||||
}
|
||||
else
|
||||
{
|
||||
castsprite = caststate->sprite;
|
||||
// Only use the skin sprite if this class has not been removed from the
|
||||
// PlayerClasses list.
|
||||
for (unsigned i = 0; i < PlayerClasses.Size(); ++i)
|
||||
{
|
||||
if (PlayerClasses[i].Type == mClass)
|
||||
{
|
||||
castsprite = skins[players[consoleplayer].userinfo.skin].sprite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sprframe = &SpriteFrames[sprites[castsprite].spriteframes + caststate->GetFrame()];
|
||||
|
|
Loading…
Reference in a new issue