mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-23 04:00:38 +00:00
Hotfix - server loading
- Fix for server loading
This commit is contained in:
@@ -17,6 +17,8 @@ namespace CS2_SimpleAdmin;
|
||||
|
||||
public partial class CS2_SimpleAdmin
|
||||
{
|
||||
private bool _serverLoading;
|
||||
|
||||
private void RegisterEvents()
|
||||
{
|
||||
RegisterListener<Listeners.OnMapStart>(OnMapStart);
|
||||
@@ -49,6 +51,10 @@ public partial class CS2_SimpleAdmin
|
||||
|
||||
private void OnGameServerSteamAPIActivated()
|
||||
{
|
||||
if (_serverLoading)
|
||||
return;
|
||||
|
||||
_serverLoading = true;
|
||||
new ServerManager().LoadServerData();
|
||||
}
|
||||
|
||||
@@ -330,11 +336,11 @@ public partial class CS2_SimpleAdmin
|
||||
if (Config.OtherSettings.ReloadAdminsEveryMapChange && ServerLoaded && ServerId != null)
|
||||
AddTimer(3.0f, () => ReloadAdmins(null));
|
||||
|
||||
AddTimer(34, () =>
|
||||
{
|
||||
if (!ServerLoaded)
|
||||
OnGameServerSteamAPIActivated();
|
||||
});
|
||||
// AddTimer(34, () =>
|
||||
// {
|
||||
// if (!ServerLoaded)
|
||||
// OnGameServerSteamAPIActivated();
|
||||
// });
|
||||
|
||||
GodPlayers.Clear();
|
||||
SilentPlayers.Clear();
|
||||
|
||||
Reference in New Issue
Block a user