mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 05:40:44 +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
|
// draw the current frame in the middle of the screen
|
||||||
if (caststate != NULL)
|
if (caststate != NULL)
|
||||||
{
|
{
|
||||||
int castsprite;
|
int castsprite = caststate->sprite;
|
||||||
|
|
||||||
if (!(mDefaults->flags4 & MF4_NOSKIN) &&
|
if (!(mDefaults->flags4 & MF4_NOSKIN) &&
|
||||||
mDefaults->SpawnState != NULL && caststate->sprite == mDefaults->SpawnState->sprite &&
|
mDefaults->SpawnState != NULL && caststate->sprite == mDefaults->SpawnState->sprite &&
|
||||||
mClass->IsDescendantOf(RUNTIME_CLASS(APlayerPawn)) &&
|
mClass->IsDescendantOf(RUNTIME_CLASS(APlayerPawn)) &&
|
||||||
skins != NULL)
|
skins != NULL)
|
||||||
{
|
{
|
||||||
castsprite = skins[players[consoleplayer].userinfo.skin].sprite;
|
// Only use the skin sprite if this class has not been removed from the
|
||||||
}
|
// PlayerClasses list.
|
||||||
else
|
for (unsigned i = 0; i < PlayerClasses.Size(); ++i)
|
||||||
{
|
{
|
||||||
castsprite = caststate->sprite;
|
if (PlayerClasses[i].Type == mClass)
|
||||||
|
{
|
||||||
|
castsprite = skins[players[consoleplayer].userinfo.skin].sprite;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sprframe = &SpriteFrames[sprites[castsprite].spriteframes + caststate->GetFrame()];
|
sprframe = &SpriteFrames[sprites[castsprite].spriteframes + caststate->GetFrame()];
|
||||||
|
|
Loading…
Reference in a new issue