Change sm_beacon to use game-specific team colors (#1187)
Added game color config & specific settings for L4D/L4D2 Created the following keys: "Team1Color" "75,255,75,255" "Team2Color" "255,75,75,255" "Team3Color" "75,75,255,255" "Team4Color" "255,128,0,255" "TeamUnknownColor" "255,255,255,255" Added a specific setting for L4D/L4D2 game: "Team2Color" "75,75,255,255" "Team3Color" "255,75,75,255"
This commit is contained in:
@@ -85,8 +85,6 @@ public Action Timer_Beacon(Handle timer, any value)
|
||||
KillBeacon(client);
|
||||
return Plugin_Stop;
|
||||
}
|
||||
|
||||
int team = GetClientTeam(client);
|
||||
|
||||
float vec[3];
|
||||
GetClientAbsOrigin(client, vec);
|
||||
@@ -94,22 +92,21 @@ public Action Timer_Beacon(Handle timer, any value)
|
||||
|
||||
if (g_BeamSprite > -1 && g_HaloSprite > -1)
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, g_Cvar_BeaconRadius.FloatValue, g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
int teamBeaconColor[4];
|
||||
|
||||
switch (GetClientTeam(client))
|
||||
{
|
||||
case 1: teamBeaconColor = g_Team1BeaconColor;
|
||||
case 2: teamBeaconColor = g_Team2BeaconColor;
|
||||
case 3: teamBeaconColor = g_Team3BeaconColor;
|
||||
case 4: teamBeaconColor = g_Team4BeaconColor;
|
||||
default: teamBeaconColor = g_TeamUnknownBeaconColor;
|
||||
}
|
||||
|
||||
TE_SetupBeamRingPoint(vec, 10.0, g_Cvar_BeaconRadius.FloatValue, g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, g_ExternalBeaconColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
|
||||
if (team == 2)
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, g_Cvar_BeaconRadius.FloatValue, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, redColor, 10, 0);
|
||||
}
|
||||
else if (team == 3)
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, g_Cvar_BeaconRadius.FloatValue, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, blueColor, 10, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, g_Cvar_BeaconRadius.FloatValue, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, greenColor, 10, 0);
|
||||
}
|
||||
|
||||
|
||||
TE_SetupBeamRingPoint(vec, 10.0, g_Cvar_BeaconRadius.FloatValue, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, teamBeaconColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user