Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
Patch v4.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
K4ryuu committed May 18, 2024
1 parent d8c74a4 commit 80f81e0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
-- 2023.05.17 - V4.3.2
-- 2023.05.18 - V4.3.3

- fix: Threading problems
- fix: All player load was full bad and caused too much resource usage on map changes

-- 2023.05.18 - V4.3.2

- fix: Connect message shown even if its disabled
- fix: Placeholder replaced error logs
Expand Down
20 changes: 12 additions & 8 deletions K4-System/src/Plugin/PluginDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ LEFT JOIN

foreach (var row in rows)
{
LoadPlayerRowToCache(k4player, row, false);
Server.NextFrame(() =>
{
LoadPlayerRowToCache(k4player, row, false);
});
}
}
}
Expand All @@ -393,6 +396,7 @@ private void LoadAllPlayersCache()
}

string combinedQuery = $@"SELECT
r.`steam_id`,
r.`points`,
s.`kills`,
s.`firstblood`,
Expand Down Expand Up @@ -466,14 +470,14 @@ public async Task LoadAllPlayersCacheAsync(string combinedQuery)
string steamId = row.steam_id;
K4Player? k4player = K4Players.FirstOrDefault(p => p.SteamID == ulong.Parse(steamId));

if (k4player is null)
continue;

Server.NextFrame(() =>
if (k4player != null)
{
if (k4player.IsValid && k4player.IsPlayer)
LoadPlayerRowToCache(k4player, row, true);
});
Server.NextFrame(() =>
{
if (k4player.IsValid && k4player.IsPlayer)
LoadPlayerRowToCache(k4player, row, true);
});
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion K4-System/src/Plugin/PluginManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public sealed partial class Plugin : BasePlugin

public override string ModuleAuthor => "K4ryuu";

public override string ModuleVersion => "4.3.2 " +
public override string ModuleVersion => "4.3.3 " +
#if RELEASE
"(release)";
#else
Expand Down

0 comments on commit 80f81e0

Please sign in to comment.