mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
Fix sound effect crash
This commit is contained in:
parent
0c1c9d49a5
commit
a1675b577a
1 changed files with 8 additions and 0 deletions
|
@ -120,6 +120,14 @@ static void PerformAnimCommands(ItemInfo& item, bool isFrameBased)
|
|||
int soundID = commandDataPtr[1] & 0xFFF; // Exclude last 4 bits for sound ID.
|
||||
int soundEnvFlag = commandDataPtr[1] & 0xF000; // Keep only last 4 bits for sound environment flag.
|
||||
|
||||
// FAILSAFE.
|
||||
if (item.RoomNumber == NO_VALUE)
|
||||
{
|
||||
SoundEffect(soundID, &item.Pose, SoundEnvironment::Always);
|
||||
commandDataPtr += 2;
|
||||
break;
|
||||
}
|
||||
|
||||
// Get required sound environment from flag.
|
||||
auto requiredSoundEnv = SoundEnvironment::Always;
|
||||
switch (soundEnvFlag)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue