From da9d5a4830ce8551bb42a91dbe08713424b9e23f Mon Sep 17 00:00:00 2001 From: Twirlbug Date: Fri, 30 Jun 2023 00:38:31 -0500 Subject: [PATCH] Fixed the Exchange Fireworks. They now play for all players in range and moved to debugging on standalone --- .gitignore | 1 + SRMP.sln | 21 +++++++++++++-------- SRMP/Networking/NetworkHandlerClient.cs | 9 +++++++++ SRMP/Patches/Patch_PauseMenu.cs | 5 +---- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 50f9ec9..4dbc2d9 100644 --- a/.gitignore +++ b/.gitignore @@ -329,3 +329,4 @@ ASALocalRun/ # MFractors (Xamarin productivity tool) working folder .mfractor/ +/SRMP/_info.txt diff --git a/SRMP.sln b/SRMP.sln index 285d74f..bf9122f 100644 --- a/SRMP.sln +++ b/SRMP.sln @@ -1,32 +1,37 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.1267 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33815.320 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SRMP", "SRMP\SRMP.csproj", "{E1BF7CDA-F2AE-4042-A992-DCBF62E79238}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{623884D3-E475-43F6-A6DF-64B8860E3EDD}" + ProjectSection(SolutionItems) = preProject + SRMP\_info.txt = SRMP\_info.txt + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU - SRML|Any CPU = SRML|Any CPU SRML NoVer|Any CPU = SRML NoVer|Any CPU - Standalone|Any CPU = Standalone|Any CPU + SRML|Any CPU = SRML|Any CPU Standalone NoVer|Any CPU = Standalone NoVer|Any CPU + Standalone|Any CPU = Standalone|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Debug|Any CPU.Build.0 = Debug|Any CPU {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Release|Any CPU.ActiveCfg = Release|Any CPU {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Release|Any CPU.Build.0 = Release|Any CPU - {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.SRML|Any CPU.ActiveCfg = SRML|Any CPU - {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.SRML|Any CPU.Build.0 = SRML|Any CPU {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.SRML NoVer|Any CPU.ActiveCfg = SRML NoVer|Any CPU {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.SRML NoVer|Any CPU.Build.0 = SRML NoVer|Any CPU - {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Standalone|Any CPU.ActiveCfg = Standalone|Any CPU - {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Standalone|Any CPU.Build.0 = Standalone|Any CPU + {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.SRML|Any CPU.ActiveCfg = SRML|Any CPU + {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.SRML|Any CPU.Build.0 = SRML|Any CPU {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Standalone NoVer|Any CPU.ActiveCfg = Standalone NoVer|Any CPU {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Standalone NoVer|Any CPU.Build.0 = Standalone NoVer|Any CPU + {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Standalone|Any CPU.ActiveCfg = Standalone|Any CPU + {E1BF7CDA-F2AE-4042-A992-DCBF62E79238}.Standalone|Any CPU.Build.0 = Standalone|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SRMP/Networking/NetworkHandlerClient.cs b/SRMP/Networking/NetworkHandlerClient.cs index 398c473..8ded6e6 100644 --- a/SRMP/Networking/NetworkHandlerClient.cs +++ b/SRMP/Networking/NetworkHandlerClient.cs @@ -363,6 +363,15 @@ namespace SRMultiplayer.Networking { rewarder.AwardIfType(type); } + + //trigger fireworks + //get ExchangeEjector + foreach (var eject in Resources.FindObjectsOfTypeAll()) + { + //send off fireworks + SRBehaviour.InstantiateDynamic(eject.awardFX, eject.awardAt.position, eject.awardAt.rotation); + } + SRSingleton.Instance.ExchangeDirector.ClearOffer(type); } diff --git a/SRMP/Patches/Patch_PauseMenu.cs b/SRMP/Patches/Patch_PauseMenu.cs index b55f264..d34d87b 100644 --- a/SRMP/Patches/Patch_PauseMenu.cs +++ b/SRMP/Patches/Patch_PauseMenu.cs @@ -18,10 +18,7 @@ namespace SRMultiplayer.Patches if (!Globals.IsMultiplayer) return; //only handle the client if the client is the one disconnecting - if (!Globals.IsServer) - { - NetworkClient.Instance.Disconnect(); - } + NetworkClient.Instance.Disconnect(); //if server ahndle the shutdown NetworkServer.Instance.Disconnect(); }