Fix anti-cheat highlight

This commit is contained in:
D1GQ committed 2024-12-05 20:17:50 -06:00
1 parent ad698566f2
commit 4a1551a871
4 files changed
+12

No files matched your search

+1
View File
@@ -11,5 +11,6 @@ public class RemoveAllCommand : BaseCommand
{
BetterDataManager.ClearCheatData();
Utils.AddChatPrivate($"All data successfully removed from local <color=#4f92ff>Anti-Cheat</color>!");
Utils.DirtyAllNames();
}
}
+1
View File
@@ -26,6 +26,7 @@ public class RemovePlayerCommand : BaseCommand
if (BetterDataManager.RemovePlayer(identifierArgument.Arg) == true)
{
Utils.AddChatPrivate($"{identifierArgument.Arg} successfully removed from local <color=#4f92ff>Anti-Cheat</color> data!");
Utils.DirtyAllNames();
}
else
{
+1
View File
@@ -71,6 +71,7 @@ class BetterNotificationManager
Notify(text, Time: 8f);
}
Logger.LogCheat($"{player.cosmetics.nameText.text} Info: {player.Data.PlayerName} - {player.Data.FriendCode} - {player.GetHashPuid()}");
Logger.LogCheat(Utils.RemoveHtmlText(rawText));
player.DirtyName();
+9
View File
@@ -20,9 +20,18 @@ class PlayerControlPatch
public static void FixedUpdate_Prefix(PlayerControl __instance)
{
SetPlayerInfo(__instance);
SetPlayerHighlight(__instance);
__instance.UpdateColorBlindTextPosition();
}
public static void SetPlayerHighlight(PlayerControl player)
{
string hashPuid = Utils.GetHashPuid(player);
string friendCode = ValidateFriendCode(player, out string _);
SetPlayerOutline(player, hashPuid, friendCode, new());
}
public static void SetPlayerInfo(PlayerControl player)
{
if (player?.Data == null || player?.BetterData()?.IsDirtyInfo != true) return;