File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,6 @@ bool CP2MMServerPlugin::Load(CreateInterfaceFn interfaceFactory, const CreateInt
155155 if (m_bPluginLoaded)
156156 {
157157 Log (WARNING, false , " Plugin already loaded!" );
158- m_bNoUnload = true ;
159158 return false ;
160159 }
161160
@@ -518,6 +517,15 @@ void CP2MMServerPlugin::Unload(void)
518517 return ;
519518 }
520519
520+ if (IsGameActive ())
521+ {
522+ m_bNoUnload = false ;
523+ Log (WARNING, false , " You unloaded the P2:MM plugin mid play session! This will cause issues and crashes!" );
524+ Log (WARNING, false , " You unloaded the P2:MM plugin mid play session! This will cause issues and crashes!" );
525+ Log (WARNING, false , " You unloaded the P2:MM plugin mid play session! This will cause issues and crashes!" );
526+ return ;
527+ }
528+
521529 Log (INFO, false , " Unloading Plugin..." );
522530 this ->m_bPluginUnloading = true ;
523531 CDiscordIntegration::UpdateDiscordRPC ();
You can’t perform that action at this time.
0 commit comments