mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 05:01:41 +00:00
Add SetSubtitleNumber(int num, str sound) ACS function. Works exactly like its ZScript counterpart. The activator of the script must be a player.
This commit is contained in:
parent
952d43b884
commit
b7bbfd4efd
1 changed files with 22 additions and 0 deletions
|
@ -4779,6 +4779,7 @@ enum EACSFunctions
|
||||||
ACSF_StartSlideshow,
|
ACSF_StartSlideshow,
|
||||||
ACSF_GetSectorHealth,
|
ACSF_GetSectorHealth,
|
||||||
ACSF_GetLineHealth,
|
ACSF_GetLineHealth,
|
||||||
|
ACSF_SetSubtitleNumber,
|
||||||
|
|
||||||
// Eternity's
|
// Eternity's
|
||||||
ACSF_GetLineX = 300,
|
ACSF_GetLineX = 300,
|
||||||
|
@ -6697,6 +6698,27 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
||||||
}
|
}
|
||||||
return DoubleToACS(result);
|
return DoubleToACS(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case ACSF_SetSubtitleNumber:
|
||||||
|
if (argCount >= 2)
|
||||||
|
{
|
||||||
|
// only players allowed as activator
|
||||||
|
if (activator != nullptr && activator->player != nullptr)
|
||||||
|
{
|
||||||
|
int logNum = args[0];
|
||||||
|
FSoundID sid = 0;
|
||||||
|
|
||||||
|
const char* lookup = Level->Behaviors.LookupString(args[1]);
|
||||||
|
if (lookup != nullptr)
|
||||||
|
{
|
||||||
|
sid = lookup;
|
||||||
|
}
|
||||||
|
|
||||||
|
activator->player->SetSubtitle(logNum, sid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue