@@ -277,28 +277,6 @@ public void OnPluginStart()
277277 g_evEngineVersion = GetEngineVersion ();
278278}
279279
280- public void OnPluginEnd ()
281- {
282- // Clean up on map end just so we can start a fresh connection when we need it later.
283- if (g_hDatabase != null )
284- {
285- delete g_hDatabase ;
286- g_hDatabase = null ;
287- }
288- if (g_sColorsArray != null )
289- delete g_sColorsArray ;
290- if (g_smReplacePendingTriggers != null )
291- {
292- delete g_smReplacePendingTriggers ;
293- g_smReplacePendingTriggers = null ;
294- }
295-
296- g_DatabaseState = DatabaseState_Disconnected ;
297- g_hDatabase = null ;
298- g_hReconnectTimer = null ;
299- g_bDBConnectDelayActive = false ;
300- }
301-
302280public void OnAllPluginsLoaded ()
303281{
304282 g_bPlugin_SelfMute = LibraryExists (" SelfMute" );
@@ -399,6 +377,26 @@ public void OnConfigsExecuted()
399377 g_cSmChatColor .GetString (g_sSmChatColor , sizeof (g_sSmChatColor ));
400378}
401379
380+ public void OnMapEnd ()
381+ {
382+ // Clean up on map end just so we can start a fresh connection when we need it later.
383+ if (g_hReconnectTimer != null )
384+ {
385+ delete g_hReconnectTimer ;
386+ g_hReconnectTimer = null ;
387+ }
388+
389+ if (g_hDatabase != null )
390+ {
391+ delete g_hDatabase ;
392+ g_hDatabase = null ;
393+ }
394+
395+ g_DatabaseState = DatabaseState_Disconnected ;
396+ g_iConnectLock = 0 ;
397+ g_bDBConnectDelayActive = false ;
398+ }
399+
402400public void OnClientDisconnect (int client )
403401{
404402 g_bClientDataLoaded [client ] = false ;
@@ -4042,15 +4040,11 @@ public void Menu_TagPrefs(int client)
40424040
40434041public void Menu_AddColors (Menu ColorsMenu )
40444042{
4045- char info [64 ];
4043+ char key [64 ];
40464044 for (int i = 0 ; i < g_sColorsArray .Length ; i ++ )
40474045 {
4048- char key [64 ];
40494046 g_sColorsArray .GetString (i , key , sizeof (key ));
4050-
4051- Format (info , sizeof (info ), " %s " , key );
4052-
4053- ColorsMenu .AddItem (key , info );
4047+ ColorsMenu .AddItem (key , key );
40544048 }
40554049}
40564050
0 commit comments