Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions addons/sourcemod/scripting/current.sp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public Plugin myinfo =
name = "L4D2 Survivor Progress",
author = "CanadaRox, Visor",
description = "Print survivor progress in flow percents ",
version = "2.0.4",
version = "2.0.5",
url = "https://github.com/SirPlease/L4D2-Competitive-Rework"
};

Expand Down Expand Up @@ -53,12 +53,11 @@ float GetBossProximity()
*/
float GetMaxSurvivorCompletion()
{
float flow = 0.0, tmp_flow = 0.0, origin[3];
float flow = 0.0, tmp_flow = 0.0;
Address pNavArea;
for (int i = 1; i <= MaxClients; i++) {
if (IsClientInGame(i) && GetClientTeam(i) == TEAM_SURVIVORS && IsPlayerAlive(i)) {
GetClientAbsOrigin(i, origin);
pNavArea = L4D2Direct_GetTerrorNavArea(origin);
pNavArea = L4D_GetLastKnownArea(i);
if (pNavArea != Address_Null) {
tmp_flow = L4D2Direct_GetTerrorNavAreaFlow(pNavArea);
flow = (flow > tmp_flow) ? flow : tmp_flow;
Expand Down Expand Up @@ -87,4 +86,4 @@ stock void LoadTranslation(const char[] translation)
SetFailState("Missing translation file %s.txt", translation);

LoadTranslations(translation);
}
}
9 changes: 4 additions & 5 deletions addons/sourcemod/scripting/l4d2_tankrage.sp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public Plugin myinfo =
name = "L4D2 Tank Rage",
author = "Sir",
description = "Manage Tank Rage when Survivors are running back.",
version = "1.0.1",
version = "1.0.2",
url = "https://github.com/SirPlease/L4D2-Competitive-Rework"
};

Expand Down Expand Up @@ -172,12 +172,11 @@ int GetBossProximity()

float GetMaxSurvivorCompletion()
{
float flow = 0.0, tmp_flow = 0.0, origin[3];
float flow = 0.0, tmp_flow = 0.0;
Address pNavArea;
for (int i = 1; i <= MaxClients; i++) {
if (IsClientInGame(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i)) {
GetClientAbsOrigin(i, origin);
pNavArea = L4D2Direct_GetTerrorNavArea(origin);
pNavArea = L4D_GetLastKnownArea(i);
if (pNavArea != Address_Null) {
tmp_flow = L4D2Direct_GetTerrorNavAreaFlow(pNavArea);
flow = (flow > tmp_flow) ? flow : tmp_flow;
Expand Down Expand Up @@ -226,4 +225,4 @@ stock void LoadTranslation(const char[] translation)
SetFailState("Missing translation file %s.txt", translation);

LoadTranslations(translation);
}
}