mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-22 16:02:29 +00:00
Small improvements to Dialogue internals
- Guarantee not-visible dialogue on map transition/invalidation - Don't grab a portrait for skins that don't have portraits
This commit is contained in:
parent
4c284680ff
commit
42f37e7ded
1 changed files with 11 additions and 5 deletions
|
|
@ -70,15 +70,20 @@ void Dialogue::SetSpeaker(std::string skinName, int portraitID)
|
|||
if (sprdef->numframes > 0)
|
||||
{
|
||||
portraitID %= sprdef->numframes;
|
||||
|
||||
const spriteframe_t *sprframe = &sprdef->spriteframes[portraitID];
|
||||
|
||||
portrait = static_cast<patch_t *>( W_CachePatchNum(sprframe->lumppat[0], PU_CACHE) );
|
||||
portraitColormap = R_GetTranslationColormap(skinID, static_cast<skincolornum_t>(skin->prefcolor), GTC_CACHE);
|
||||
}
|
||||
else
|
||||
{
|
||||
portrait = nullptr;
|
||||
portraitColormap = nullptr;
|
||||
}
|
||||
|
||||
const spriteframe_t *sprframe = &sprdef->spriteframes[portraitID];
|
||||
|
||||
speaker = skin->realname;
|
||||
|
||||
portrait = static_cast<patch_t *>( W_CachePatchNum(sprframe->lumppat[0], PU_CACHE) );
|
||||
portraitColormap = R_GetTranslationColormap(skinID, static_cast<skincolornum_t>(skin->prefcolor), GTC_CACHE);
|
||||
|
||||
voiceSfx = skin->soundsid[ S_sfx[sfx_ktalk].skinsound ];
|
||||
}
|
||||
else
|
||||
|
|
@ -333,6 +338,7 @@ void Dialogue::Unset(void)
|
|||
{
|
||||
Dismiss();
|
||||
SetSpeaker();
|
||||
slide = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue