Re-arrange channels. PLAYER channel sounds will now trigger even on a channel thats in use (stops sound glitching too badly if doors etc are nearby)

This commit is contained in:
stevenhowes
2021-09-01 19:16:24 +01:00
parent 42c5fcad69
commit f210658025
4 changed files with 5 additions and 2 deletions
Binary file not shown.
+3
View File
@@ -662,6 +662,9 @@ void game2_triggerevent(int id)
else if(EventActions[i].Action == 1) // Change area name
sprintf(areaname,"%s",Areas[EventActions[i].ActionValue].name);
else if(EventActions[i].Action == 2) // Play sound
if(EventActions[i].ActionTarget == PCMCHANNEL_PLAYER)
sound_pcm_playsample(EventActions[i].ActionTarget,EventActions[i].ActionValue);
else
sound_pcm_playsample_ifidle(EventActions[i].ActionTarget,EventActions[i].ActionValue);
else if(EventActions[i].Action == 3) // Re-arm
Events[EventActions[i].ActionTarget].Triggered = 0;
+1 -1
View File
@@ -39,8 +39,8 @@
// Formatting is important as compile.php parses this
enum pcmchannel_e{
PCMCHANNEL_UI = 5, /*channelid*/
PCMCHANNEL_PLAYER = 5, /*channelid*/
PCMCHANNEL_UI = 6, /*channelid*/
PCMCHANNEL_NPC1 = 6, /*channelid*/
PCMCHANNEL_NPC2 = 7, /*channelid*/
PCMCHANNEL_AMBIENT = 8, /*channelid*/
Binary file not shown.