Skip to content
This repository was archived by the owner on Jan 25, 2025. It is now read-only.

Commit 80f81e0

Browse files
committed
Patch v4.3.3
1 parent d8c74a4 commit 80f81e0

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

CHANGELOG

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
-- 2023.05.17 - V4.3.2
1+
-- 2023.05.18 - V4.3.3
2+
3+
- fix: Threading problems
4+
- fix: All player load was full bad and caused too much resource usage on map changes
5+
6+
-- 2023.05.18 - V4.3.2
27

38
- fix: Connect message shown even if its disabled
49
- fix: Placeholder replaced error logs

K4-System/src/Plugin/PluginDatabase.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,10 @@ LEFT JOIN
369369

370370
foreach (var row in rows)
371371
{
372-
LoadPlayerRowToCache(k4player, row, false);
372+
Server.NextFrame(() =>
373+
{
374+
LoadPlayerRowToCache(k4player, row, false);
375+
});
373376
}
374377
}
375378
}
@@ -393,6 +396,7 @@ private void LoadAllPlayersCache()
393396
}
394397

395398
string combinedQuery = $@"SELECT
399+
r.`steam_id`,
396400
r.`points`,
397401
s.`kills`,
398402
s.`firstblood`,
@@ -466,14 +470,14 @@ public async Task LoadAllPlayersCacheAsync(string combinedQuery)
466470
string steamId = row.steam_id;
467471
K4Player? k4player = K4Players.FirstOrDefault(p => p.SteamID == ulong.Parse(steamId));
468472

469-
if (k4player is null)
470-
continue;
471-
472-
Server.NextFrame(() =>
473+
if (k4player != null)
473474
{
474-
if (k4player.IsValid && k4player.IsPlayer)
475-
LoadPlayerRowToCache(k4player, row, true);
476-
});
475+
Server.NextFrame(() =>
476+
{
477+
if (k4player.IsValid && k4player.IsPlayer)
478+
LoadPlayerRowToCache(k4player, row, true);
479+
});
480+
}
477481
}
478482
}
479483
}

K4-System/src/Plugin/PluginManifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public sealed partial class Plugin : BasePlugin
1010

1111
public override string ModuleAuthor => "K4ryuu";
1212

13-
public override string ModuleVersion => "4.3.2 " +
13+
public override string ModuleVersion => "4.3.3 " +
1414
#if RELEASE
1515
"(release)";
1616
#else

0 commit comments

Comments
 (0)