mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-04 12:50:57 +00:00
CON: Add "actorsound" command.
Patch from Striker. git-svn-id: https://svn.eduke32.com/eduke32@6504 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bad61e3934
commit
38df0b7e82
3 changed files with 20 additions and 0 deletions
|
@ -118,6 +118,7 @@ static tokenmap_t const vm_keywords[] =
|
||||||
{ "activatebysector", CON_ACTIVATEBYSECTOR },
|
{ "activatebysector", CON_ACTIVATEBYSECTOR },
|
||||||
{ "activatecheat", CON_ACTIVATECHEAT },
|
{ "activatecheat", CON_ACTIVATECHEAT },
|
||||||
{ "actor", CON_ACTOR },
|
{ "actor", CON_ACTOR },
|
||||||
|
{ "actorsound", CON_ACTORSOUND },
|
||||||
{ "addammo", CON_ADDAMMO },
|
{ "addammo", CON_ADDAMMO },
|
||||||
{ "addinventory", CON_ADDINVENTORY },
|
{ "addinventory", CON_ADDINVENTORY },
|
||||||
{ "addkills", CON_ADDKILLS },
|
{ "addkills", CON_ADDKILLS },
|
||||||
|
@ -4111,6 +4112,7 @@ DO_DEFSTATE:
|
||||||
case CON_QSTRCAT:
|
case CON_QSTRCAT:
|
||||||
case CON_QSTRCPY:
|
case CON_QSTRCPY:
|
||||||
case CON_QGETSYSSTR:
|
case CON_QGETSYSSTR:
|
||||||
|
case CON_ACTORSOUND:
|
||||||
case CON_STOPACTORSOUND:
|
case CON_STOPACTORSOUND:
|
||||||
case CON_STARTTRACKSLOT:
|
case CON_STARTTRACKSLOT:
|
||||||
C_GetManyVars(2);
|
C_GetManyVars(2);
|
||||||
|
|
|
@ -1145,6 +1145,7 @@ enum ScriptKeywords_t
|
||||||
CON_DRAWLINERGB, // 405
|
CON_DRAWLINERGB, // 405
|
||||||
CON_STARTTRACKSLOT, // 406
|
CON_STARTTRACKSLOT, // 406
|
||||||
CON_STOPALLMUSIC, // 407
|
CON_STOPALLMUSIC, // 407
|
||||||
|
CON_ACTORSOUND, // 408
|
||||||
CON_END
|
CON_END
|
||||||
};
|
};
|
||||||
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua
|
// KEEPINSYNC with the keyword list in lunatic/con_lang.lua
|
||||||
|
|
|
@ -1679,6 +1679,23 @@ skip_check:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case CON_ACTORSOUND:
|
||||||
|
insptr++;
|
||||||
|
{
|
||||||
|
int const spriteNum = (*insptr++ != g_thisActorVarID) ? Gv_GetVarX(*(insptr - 1)) : vm.spriteNum;
|
||||||
|
int const soundNum = Gv_GetVarX(*insptr++);
|
||||||
|
|
||||||
|
if (EDUKE32_PREDICT_FALSE((unsigned)soundNum >= MAXSOUNDS))
|
||||||
|
{
|
||||||
|
CON_ERRPRINTF("invalid sound %d\n", soundNum);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
A_PlaySound(soundNum, spriteNum);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
case CON_SETACTORSOUNDPITCH:
|
case CON_SETACTORSOUNDPITCH:
|
||||||
insptr++;
|
insptr++;
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue