Retore traffic on disconnect

This commit is contained in:
Sardelka
2022-08-14 10:35:59 +08:00
parent 609fd90561
commit 2b8a3db6bf
2 changed files with 5 additions and 4 deletions

View File

@ -101,7 +101,7 @@ namespace RageCoop.Client
Util.NativeMemory();
Counter.Restart();
}
#if DEBUG
#endif
public static Ped P;
@ -109,7 +109,7 @@ namespace RageCoop.Client
private bool _lastDead;
private void OnTick(object sender, EventArgs e)
{
if (Game.IsLoading)
{
return;
@ -284,7 +284,8 @@ namespace RageCoop.Client
Sync.Voice.ClearAll();
EntityPool.Cleanup();
PlayerList.Cleanup();
Main.LocalPlayerID=default;
LocalPlayerID=default;
WorldThread.Traffic(true);
}
private static void DoQueuedActions()
{

View File

@ -91,7 +91,7 @@ namespace RageCoop.Client
_lastDisableTraffic = Main.Settings.DisableTraffic;
}
private void Traffic(bool enable)
public static void Traffic(bool enable)
{
if (enable)
{