You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
floatTRACE_FADE_TIME = 60.0f; // how long to keep the trace positions for
113
125
ConVar cl_trace_player_max_targets("cl_trace_player_max_targets", "3", FCVAR_ARCHIVE | FCVAR_CLIENTDLL, "Maximum number of players to trace positions for in the client.", true, 1.0f, true, 7.0f);
114
-
ConVar cl_trace_player_opacity("cl_trace_player_opacity", "0.5", FCVAR_ARCHIVE | FCVAR_CLIENTDLL, "Opacity of the player trace positions in the client. 0.0 means fully transparent, 1.0 means fully opaque.", true, 0.0f, true, 1.0f);
126
+
ConVar cl_trace_player_opacity("cl_trace_player_opacity", "1", FCVAR_ARCHIVE | FCVAR_CLIENTDLL, "Opacity of the player trace positions in the client. 0.0 means fully transparent, 1.0 means fully opaque.", true, 0.0f, true, 1.0f);
127
+
//ConVar cl_trace_player_line_thickness("cl_trace_player_line_thickness", "30", FCVAR_ARCHIVE | FCVAR_CLIENTDLL, "Thickness of the player trace.", true, 1.0f, true, 100.0f);
128
+
//ConVar cl_trace_player_border_thickness("cl_trace_player_border_thickness", "5", FCVAR_ARCHIVE | FCVAR_CLIENTDLL, "Thickness of the player trace border.", true, 1.0f, true, 10.0f);
129
+
130
+
voidRemoveInvalidTracePlayersAndColors()
131
+
{
132
+
for (int i = 1; i <= 7; i++)
133
+
{
134
+
// if this color's playerIndex is not a valid player, or if the color index is greater than the max targets, reset it
135
+
if (g_nTraceColor2Player[i] <= 0 || g_nTraceColor2Player[i] >= MAX_PLAYERS || !UTIL_PlayerByIndex(g_nTraceColor2Player[i]) || i > cl_trace_player_max_targets.GetInt())
136
+
{
137
+
g_nTraceColor2Player[i] = 0;
138
+
}
139
+
}
140
+
for (int i = 1; i < MAX_PLAYERS; i++)
141
+
{
142
+
// if this playerIndex is not a valid player, or if the player's colorIndex is greater than the max targets, reset it
143
+
if (!UTIL_PlayerByIndex(i) || g_nTracePlayer2Color[i] <= 0 || g_nTracePlayer2Color[i] > cl_trace_player_max_targets.GetInt())
144
+
{
145
+
g_nTracePlayer2Color[i] = 0;
146
+
}
147
+
148
+
}
149
+
// cross-check the color -> player mapping, remove any record if not match
150
+
for (int i = 1; i <= cl_trace_player_max_targets.GetInt(); i++)
151
+
{
152
+
if (g_nTracePlayer2Color[g_nTraceColor2Player[i]] != i)
153
+
{
154
+
g_nTraceColor2Player[i] = 0;
155
+
}
156
+
}
157
+
// cross-check the player -> color mapping, remove any record if not match
158
+
for (int i = 1; i < MAX_PLAYERS; i++)
159
+
{
160
+
if (g_nTraceColor2Player[g_nTracePlayer2Color[i]] != i)
161
+
{
162
+
g_nTracePlayer2Color[i] = 0;
163
+
}
164
+
}
165
+
}
166
+
167
+
voidToggleTraceColor(int playerIndex)
168
+
{
169
+
RemoveInvalidTracePlayersAndColors();
170
+
if ( playerIndex < 0 || playerIndex >= MAX_PLAYERS )
171
+
return;
172
+
int nColorIndex = g_nTracePlayer2Color[playerIndex];
173
+
if ( nColorIndex != 0 )
174
+
{
175
+
g_nTracePlayer2Color[playerIndex] == 0;
176
+
g_nTraceColor2Player[nColorIndex] = 0;
177
+
}
178
+
else
179
+
{
180
+
// find an available color index
181
+
bool hasAvailableColor = false;
182
+
for ( int i = 1; i <= cl_trace_player_max_targets.GetInt(); i++ )
voidCASWHudEmotes::PaintTracesFor(C_ASW_Marine* pMarine, Color color)
318
326
{
319
327
// Not sure if the engine is single threaded or not, meanwhile, the list is accessed form other places. Therefore, lock m_TraceLock, just in case we are accessing the list from multiple threads, preventing concurrent modification of m_lstTracePlayerMovementList. Can safely remove the lock if the engine is gauranteed to be single threaded.
0 commit comments