From dd71c2c0dcc0bf975cdbfc2d92fd970798cc9819 Mon Sep 17 00:00:00 2001 From: MSWS Date: Sat, 31 Aug 2024 19:29:51 -0700 Subject: [PATCH] Fix color applications --- mod/Jailbreak.Rebel/RebelManager.cs | 5 +---- .../SpecialTreatment/SpecialTreatmentBehavior.cs | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/mod/Jailbreak.Rebel/RebelManager.cs b/mod/Jailbreak.Rebel/RebelManager.cs index f99d6b64..b9ccd7af 100644 --- a/mod/Jailbreak.Rebel/RebelManager.cs +++ b/mod/Jailbreak.Rebel/RebelManager.cs @@ -135,10 +135,7 @@ private void applyRebelColor(CCSPlayerController player) { if (!player.IsReal() || player.Pawn.Value == null) return; var color = getRebelColor(player); - player.Pawn.Value.RenderMode = RenderMode_t.kRenderTransColor; - player.Pawn.Value.Render = color; - Utilities.SetStateChanged(player.Pawn.Value, "CBaseModelEntity", - "m_clrRender"); + player.SetColor(color); player.ColorScreen( Color.FromArgb(8 + (int)Math.Round(getRebelTimePercentage(player) * 32), diff --git a/mod/Jailbreak.Warden/SpecialTreatment/SpecialTreatmentBehavior.cs b/mod/Jailbreak.Warden/SpecialTreatment/SpecialTreatmentBehavior.cs index a0857c83..1f79aae9 100644 --- a/mod/Jailbreak.Warden/SpecialTreatment/SpecialTreatmentBehavior.cs +++ b/mod/Jailbreak.Warden/SpecialTreatment/SpecialTreatmentBehavior.cs @@ -58,10 +58,7 @@ private void setSpecialColor(CCSPlayerController player, bool hasSt) { Color.FromArgb(255, 0, 255, 0) : Color.FromArgb(255, 255, 255, 255); - player.Pawn.Value.RenderMode = RenderMode_t.kRenderTransColor; - player.Pawn.Value.Render = color; - Utilities.SetStateChanged(player.Pawn.Value, "CBaseModelEntity", - "m_clrRender"); + player.SetColor(color); } private class SpecialTreatmentState {