mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
CallFunc_DialogueSetCustomSpeaker: Support empty string
This commit is contained in:
parent
426e9001a5
commit
f01e3bce9b
1 changed files with 8 additions and 3 deletions
|
|
@ -2082,13 +2082,18 @@ bool CallFunc_DialogueSetCustomSpeaker(ACSVM::Thread *thread, const ACSVM::Word
|
||||||
|
|
||||||
patchStr = map->getString(argV[1]);
|
patchStr = map->getString(argV[1]);
|
||||||
patchName = patchStr->str;
|
patchName = patchStr->str;
|
||||||
patch = static_cast<patch_t *>( W_CachePatchName(patchName, PU_CACHE) );
|
|
||||||
|
|
||||||
colorStr = map->getString(argV[2]);
|
colorStr = map->getString(argV[2]);
|
||||||
colorName = colorStr->str;
|
colorName = colorStr->str;
|
||||||
if (ACS_GetColorFromString(colorName, &colorID) == true)
|
|
||||||
|
if (patchName && patchName[0])
|
||||||
{
|
{
|
||||||
colormap = R_GetTranslationColormap(TC_DEFAULT, colorID, GTC_CACHE);
|
patch = static_cast<patch_t *>( W_CachePatchName(patchName, PU_CACHE) );
|
||||||
|
|
||||||
|
if (ACS_GetColorFromString(colorName, &colorID) == true)
|
||||||
|
{
|
||||||
|
colormap = R_GetTranslationColormap(TC_DEFAULT, colorID, GTC_CACHE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
voiceStr = map->getString(argV[3]);
|
voiceStr = map->getString(argV[3]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue