FIXED THE MUSIC SYSTEM FINALLY AFTER THE 7TH REWRITE.

THANK YOU SO MUCH, @arieshi255 !!!

+ Made music system CONSIDERABLY more accurate, and virtually immune to server lag as we now base ticks off the game engine's real time clock in seconds, with an accuracy of up to 100ns.

+ Changed ChangeBGM function to accept a true or false, determining whether to stop the music and change it on the fly, or wait for the current song to finish.

+ Disabled debug info (getting real world time) from going into global chat.

+ Optimised music system's loop code to skip over index 0 (console) as the server console should never receive sound commands anyways.
This commit is contained in:
2025-08-19 01:58:06 -04:00
parent 06fa175eb9
commit 9fbe3b54ad
6 changed files with 78 additions and 67 deletions

View File

@@ -123,7 +123,7 @@ enum struct BOSSHANDLER {
}
case 2:{
//PrintToChatAll("Recognized 1 -> 2, things are heating up!");
AudioManager.ChangeBGM(22);
AudioManager.ChangeBGM(22, false);
FastFire2("FB.MetalFace.Train", "TeleportToPathTrack", "MFT1x0", 3.00, false);
FastFire2("FB.MetalFace.SkeleSpawner", "Enable", "", 0.0, false);
FastFire2("FB.MetalFace.SkeleSpawner", "Disable", "", 120.0, false);
@@ -137,7 +137,7 @@ enum struct BOSSHANDLER {
}
case 3:{
//PrintToChatAll("Recognized 2 -> 3, oh boi");
AudioManager.ChangeBGM(24);
AudioManager.ChangeBGM(24, false);
FastFire2("FB.MetalFace.Train", "TeleportToPathTrack", "MFT2x0", 3.00, false);
FastFire2("FB.MetalFace.MerasmusSpawner", "ForceSpawn", "", 5.0, false); //Spawn halloween bosses at MetalFace's location
FastFire2("FB.MetalFace.MonoculusSpawner", "ForceSpawn", "", 7.0, false); //Spawn halloween bosses at MetalFace's location
@@ -149,7 +149,7 @@ enum struct BOSSHANDLER {
}
case 4:{
//PrintToChatAll("Recognized 3 -> 4, OHSHITOHFUCKOHNO");
AudioManager.ChangeBGM(26);
AudioManager.ChangeBGM(26, true);
FastFire2("FB.MetalFace.Train", "TeleportToPathTrack", "MFT3x0", 3.00, false);
FastFire2("FB.MetalFace.GigaBuster", "ForceSpawn", "", 10.0, false);
}