fix: Fixes decaying kill on disconnect (#2199)

This commit is contained in:
Kamron Batman 2025-05-25 22:06:26 -07:00 committed by GitHub
parent 902797bee0
commit fec5f8ee50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -106,8 +106,8 @@ public class PlayerMurderSystem : GenericPersistence
return;
}
context.DecayKills();
_contextTerms.Remove(context);
UpdateMurderContext(context);
if (pm.Kills <= 0 && context.ShortTermMurders <= 0)
{
@ -172,6 +172,8 @@ public class PlayerMurderSystem : GenericPersistence
{
var context = GetOrCreateMurderContext(player);
context.ShortTermMurders = shortTermMurders;
context.ResetKillTime();
UpdateMurderContext(context);
}
@ -181,13 +183,13 @@ public class PlayerMurderSystem : GenericPersistence
context.ShortTermMurders++;
player.Kills++;
context.ResetKillTime();
UpdateMurderContext(context);
}
private static void UpdateMurderContext(MurderContext context)
{
var player = context.Player;
context.ResetKillTime();
if (!context.CheckStart())
{