From cf70f189524f902c93301375074a6a38b756c0ef Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 10 Apr 2023 13:51:01 -0400 Subject: [PATCH] Add a white outline to the carrier --- CHANGELOG.md | 3 ++- addons/sourcemod/scripting/misere.sp | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b463a5..3ae4f3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ - Shrink speed is doubled when the zone's team is carrying the ball - Force overtime to always occur regardless of goals scored - Increase round time to 10 minutes -- Show a screen flash to the carrier when they are leaving the zone +- Flash the carrier's screen when they are leaving the zone +- Add a white outline to the carrier - Block the interception condition from being applied to players - Suppress crowd reaction sounds when the ball is intercepted or stolen - Improve joinclass check to allow players to queue a class change while still preventing them from suiciding near the ball diff --git a/addons/sourcemod/scripting/misere.sp b/addons/sourcemod/scripting/misere.sp index b253b85..bd895f4 100644 --- a/addons/sourcemod/scripting/misere.sp +++ b/addons/sourcemod/scripting/misere.sp @@ -79,6 +79,7 @@ int g_iPrevMaxScores; // Hud/visual entities int g_iPDLogic; +int g_iGlow; int g_iCapFlags[2]; int g_iZoneProps[2]; @@ -465,6 +466,9 @@ void Event_TeamplayRoundStart(Handle hEvent, const char[] sName, bool bDontBroad SetEntPropString(g_iPDLogic, Prop_Send, "m_szResFile", "resource/UI/HudObjectivePlayerDestruction.res"); SetEntProp(g_iPDLogic, Prop_Send, "m_nMaxPoints", MAX_SCORES); + g_iGlow = CreateEntityByName("tf_glow"); + SetEntProp(g_iGlow, Prop_Send, "m_glowColor", 0xffffffff); + /* PD "escrow" is counted by the client hud code by iterating over all stolen * CCaptureFlags, adding up their point values and attributing them to the * previous owner's team. We create two teamed dummy flags here (which have @@ -529,14 +533,18 @@ void OnPassCarried(int iClient) { g_iCarrier = iClient; g_iCarrierTeam = GetClientTeam(g_iCarrier) - 2; + SetEntProp(g_iPDLogic, Prop_Send, g_iCarrierTeam ? "m_nBlueTargetPoints" : "m_nRedTargetPoints", MAX_SCORES); + SetEntPropEnt(g_iGlow, Prop_Send, "m_hTarget", g_iCarrier); } //------------------------------------------------------------------------------ void Event_PassFree(Handle hEvent, const char[] sName, bool bDontBroadcast) { g_iCarrier = 0; + SetEntProp(g_iPDLogic, Prop_Send, g_iCarrierTeam ? "m_nBlueTargetPoints" : "m_nRedTargetPoints", 0); + SetEntPropEnt(g_iGlow, Prop_Send, "m_hTarget", -1); } //------------------------------------------------------------------------------