@@ -36,7 +36,9 @@ bool g_bIsRevote = false;
3636bool g_bPlayedZM = false ;
3737bool g_bVoteFinished = true ;
3838bool bStartVoteNextRound = false ;
39+ bool g_bRaceAutoBhopStored = false ;
3940bool g_bRaceAirAccelerateStored = false ;
41+ bool g_bRaceAutoBhopOriginal ;
4042int g_iRaceAirAccelerateOriginal ;
4143
4244ArrayList g_CooldownQueue = null ; // FIFO queue of stages on cooldown
@@ -111,6 +113,14 @@ public void OnMapEnd()
111113 delete g_CooldownQueue ;
112114}
113115
116+ public void OnPluginEnd ()
117+ {
118+ if (! g_bValidMap )
119+ return ;
120+
121+ EndRaceSettings ();
122+ }
123+
114124stock bool VerifyMap ()
115125{
116126 char currentMap [64 ];
@@ -926,7 +936,15 @@ void TerminateRound()
926936void StartRaceSettings ()
927937{
928938 if (g_cSvAutoBhop != null )
939+ {
940+ if (! g_bRaceAutoBhopStored )
941+ {
942+ g_bRaceAutoBhopOriginal = g_cSvAutoBhop .BoolValue ;
943+ g_bRaceAutoBhopStored = true ;
944+ }
945+
929946 g_cSvAutoBhop .BoolValue = true ;
947+ }
930948
931949 if (g_cSvAirAccelerate == null )
932950 g_cSvAirAccelerate = FindConVar (" sv_airaccelerate" );
@@ -945,8 +963,11 @@ void StartRaceSettings()
945963
946964void EndRaceSettings ()
947965{
948- if (g_cSvAutoBhop != null )
949- g_cSvAutoBhop .BoolValue = false ;
966+ if (g_cSvAutoBhop != null && g_bRaceAutoBhopStored )
967+ {
968+ g_cSvAutoBhop .BoolValue = g_bRaceAutoBhopOriginal ;
969+ g_bRaceAutoBhopStored = false ;
970+ }
950971
951972 if (g_cSvAirAccelerate == null )
952973 g_cSvAirAccelerate = FindConVar (" sv_airaccelerate" );
0 commit comments