mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-14 16:40:46 +00:00
- copied $pitchset SNDINFO command from GZDoom.
This commit is contained in:
parent
8de7aa5975
commit
8859712a7b
1 changed files with 22 additions and 0 deletions
|
@ -59,6 +59,7 @@ enum SICommands
|
|||
SI_Alias,
|
||||
SI_Limit,
|
||||
SI_Singular,
|
||||
SI_PitchSet,
|
||||
SI_DukePitchRange,
|
||||
SI_DukeFlags,
|
||||
};
|
||||
|
@ -91,6 +92,7 @@ static const char *SICommandStrings[] =
|
|||
"$alias",
|
||||
"$limit",
|
||||
"$singular",
|
||||
"$pitchset",
|
||||
"$dukepitchrange",
|
||||
"$dukeflags",
|
||||
NULL
|
||||
|
@ -293,6 +295,26 @@ static void S_AddSNDINFO (int lump)
|
|||
}
|
||||
break;
|
||||
|
||||
case SI_PitchSet: {
|
||||
// $pitchset <logical name> <pitch amount as float> [range maximum]
|
||||
FSoundID sfx;
|
||||
|
||||
sc.MustGetString();
|
||||
sfx = soundEngine->FindSoundTentative(sc.String);
|
||||
sc.MustGetFloat();
|
||||
auto sfxp = soundEngine->GetWritableSfx(sfx);
|
||||
sfxp->DefPitch = (float)sc.Float;
|
||||
if (sc.CheckFloat())
|
||||
{
|
||||
sfxp->DefPitchMax = (float)sc.Float;
|
||||
}
|
||||
else
|
||||
{
|
||||
sfxp->DefPitchMax = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case SI_ConReserve: {
|
||||
// $conreserve <logical name> <resource id>
|
||||
|
|
Loading…
Reference in a new issue