Skip to content

Commit

Permalink
Add a white outline to the carrier
Browse files Browse the repository at this point in the history
  • Loading branch information
osyu committed Apr 10, 2023
1 parent 1bd7b74 commit cf70f18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions addons/sourcemod/scripting/misere.sp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ int g_iPrevMaxScores;

// Hud/visual entities
int g_iPDLogic;
int g_iGlow;
int g_iCapFlags[2];
int g_iZoneProps[2];

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

//------------------------------------------------------------------------------
Expand Down

0 comments on commit cf70f18

Please sign in to comment.