This repository was archived by the owner on Jan 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Expand file tree Collapse file tree 3 files changed +19
-10
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments