-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Syntax updates and minor fixes. (#395)
* Update 'rock_stumble_block'. 1) Update syntax. 2) Removed unnecessary checks. * Small update 'l4d_bash_kills'. 1) Fixed variable names. * Update 'si_fire_immunity'. 1) Added 'trigger_hurt' to prevent first damage. * Update syntax. Update syntax. * Cleanup Cleanup * Update l4d2_ladderblock.sp * Fixed incorrect timer parameters. Fixed incorrect timer parameters.
- Loading branch information
Showing
41 changed files
with
321 additions
and
283 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file modified
BIN
+140 Bytes
(100%)
addons/sourcemod/plugins/optional/finale_tank_blocker.smx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,61 @@ | ||
#pragma semicolon 1 | ||
#pragma newdecls required | ||
|
||
#include <sourcemod> | ||
#include <sdktools> | ||
#include <left4dhooks> | ||
|
||
public Plugin:myinfo = | ||
ConVar | ||
g_hCvarEnabled = null, | ||
g_hCvarSkipStaticMaps = null; | ||
|
||
public Plugin myinfo = | ||
{ | ||
name = "Versus Boss Spawn Persuasion", | ||
author = "ProdigySim", | ||
description = "Makes Versus Boss Spawns obey cvars", | ||
version = "1.2", | ||
url = "http://compl4d2.com/" | ||
} | ||
|
||
new Handle:hCvarEnabled; | ||
new Handle:hCvarSkipStaticMaps; | ||
version = "1.3", | ||
url = "https://github.com/SirPlease/L4D2-Competitive-Rework" | ||
}; | ||
|
||
|
||
public OnPluginStart() | ||
public void OnPluginStart() | ||
{ | ||
hCvarEnabled = CreateConVar("l4d_obey_boss_spawn_cvars", "1", "Enable forcing boss spawns to obey boss spawn cvars"); | ||
hCvarSkipStaticMaps = CreateConVar("l4d_obey_boss_spawn_except_static", "1", "Don't override boss spawning rules on Static Tank Spawn maps (c7m1, c13m2)"); | ||
g_hCvarEnabled = CreateConVar("l4d_obey_boss_spawn_cvars", "1", "Enable forcing boss spawns to obey boss spawn cvars", _, true, 0.0, true, 1.0); | ||
g_hCvarSkipStaticMaps = CreateConVar("l4d_obey_boss_spawn_except_static", "1", "Don't override boss spawning rules on Static Tank Spawn maps (c7m1, c13m2)", _, true, 0.0, true, 1.0); | ||
} | ||
|
||
|
||
public Action:L4D_OnGetScriptValueInt(const String:key[], &retVal) | ||
public Action L4D_OnGetScriptValueInt(const char[] sKey, int &retVal) | ||
{ | ||
if(GetConVarBool(hCvarEnabled)) | ||
{ | ||
if(StrEqual(key, "DisallowThreatType")) | ||
{ | ||
if (g_hCvarEnabled.BoolValue) { | ||
if (strcmp(sKey, "DisallowThreatType") == 0) { | ||
// Stop allowing threat types! | ||
retVal = 0; | ||
return Plugin_Handled; | ||
} | ||
|
||
if(StrEqual(key, "ProhibitBosses")) | ||
{ | ||
// Fuck that! | ||
|
||
if (strcmp(sKey, "ProhibitBosses") == 0) { | ||
retVal = 0; | ||
return Plugin_Handled; | ||
return Plugin_Handled; | ||
} | ||
} | ||
return Plugin_Continue; | ||
|
||
|
||
return Plugin_Continue; | ||
} | ||
|
||
public Action:L4D_OnGetMissionVSBossSpawning(&Float:spawn_pos_min, &Float:spawn_pos_max, &Float:tank_chance, &Float:witch_chance) | ||
public Action L4D_OnGetMissionVSBossSpawning(float &spawn_pos_min, float &spawn_pos_max, float &tank_chance, float &witch_chance) | ||
{ | ||
if(GetConVarBool(hCvarEnabled)) | ||
{ | ||
if(GetConVarBool(hCvarSkipStaticMaps)) | ||
{ | ||
decl String:mapbuf[32]; | ||
GetCurrentMap(mapbuf, sizeof(mapbuf)); | ||
if(StrEqual(mapbuf, "c7m1_docks") || StrEqual(mapbuf, "c13m2_southpinestream")) | ||
{ | ||
if (g_hCvarEnabled.BoolValue) { | ||
if (g_hCvarSkipStaticMaps.BoolValue) { | ||
char sMapName[32]; | ||
GetCurrentMap(sMapName, sizeof(sMapName)); | ||
|
||
if (strcmp(sMapName, "c7m1_docks") == 0 || strcmp(sMapName, "c13m2_southpinestream") == 0) { | ||
return Plugin_Continue; | ||
} | ||
} | ||
|
||
return Plugin_Handled; | ||
} | ||
|
||
return Plugin_Continue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,70 @@ | ||
#pragma semicolon 1 | ||
#pragma newdecls required | ||
|
||
#include <sourcemod> | ||
#include <sdktools> | ||
#include <left4dhooks> | ||
|
||
#define FINALE_STAGE_TANK 8 | ||
|
||
new Handle:hFinaleExceptionMaps; | ||
StringMap | ||
g_hFinaleExceptionMaps = null; | ||
|
||
new iTankCount[2]; | ||
int | ||
g_iTankCount[2] = {0, 0}; | ||
|
||
public Plugin:myinfo = | ||
public Plugin myinfo = | ||
{ | ||
name = "Finale Even-Numbered Tank Blocker", | ||
author = "Stabby, Visor", | ||
description = "Blocks even-numbered non-flow finale tanks.", | ||
version = "2", | ||
url = "http://github.com/ConfoglTeam/ProMod" | ||
version = "2.1", | ||
url = "https://github.com/SirPlease/L4D2-Competitive-Rework" | ||
}; | ||
|
||
public OnPluginStart() | ||
public void OnPluginStart() | ||
{ | ||
RegServerCmd("finale_tank_default", SetFinaleExceptionMap); | ||
|
||
hFinaleExceptionMaps = CreateTrie(); | ||
g_hFinaleExceptionMaps = new StringMap(); | ||
} | ||
|
||
public Action:SetFinaleExceptionMap(args) | ||
public void OnMapEnd() | ||
{ | ||
decl String:mapname[64]; | ||
GetCmdArg(1, mapname, sizeof(mapname)); | ||
SetTrieValue(hFinaleExceptionMaps, mapname, true); | ||
g_iTankCount[0] = 0; | ||
g_iTankCount[1] = 0; | ||
} | ||
|
||
public Action SetFinaleExceptionMap(int iArgs) | ||
{ | ||
if (iArgs != 1) { | ||
PrintToServer("Usage: finale_tank_default <mapname>"); | ||
LogError("Usage: finale_tank_default <mapname>"); | ||
return Plugin_Handled; | ||
} | ||
|
||
char sMapName[64]; | ||
GetCmdArg(1, sMapName, sizeof(sMapName)); | ||
g_hFinaleExceptionMaps.SetValue(sMapName, true); | ||
|
||
return Plugin_Handled; | ||
} | ||
|
||
public Action:L4D2_OnChangeFinaleStage(&finaleType, const String:arg[]) | ||
public Action L4D2_OnChangeFinaleStage(int &iFinaleType, const char[] sArg) | ||
{ | ||
decl String:mapname[64]; | ||
GetCurrentMap(mapname, sizeof(mapname)); | ||
char sMapName[64]; | ||
GetCurrentMap(sMapName, sizeof(sMapName)); | ||
|
||
decl dummy; | ||
if (GetTrieValue(hFinaleExceptionMaps, mapname, dummy)) | ||
int iValue = 0; | ||
if (g_hFinaleExceptionMaps.GetValue(sMapName, iValue)) { | ||
return Plugin_Continue; | ||
} | ||
|
||
if (finaleType == FINALE_STAGE_TANK) | ||
{ | ||
if (++iTankCount[GameRules_GetProp("m_bInSecondHalfOfRound")] % 2 == 0) | ||
if (iFinaleType == FINALE_STAGE_TANK) { | ||
if (++g_iTankCount[GameRules_GetProp("m_bInSecondHalfOfRound")] % 2 == 0) { | ||
return Plugin_Handled; | ||
} | ||
} | ||
|
||
return Plugin_Continue; | ||
} | ||
|
||
public OnMapEnd() | ||
{ | ||
iTankCount[0] = 0; | ||
iTankCount[1] = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
#pragma semicolon 1 | ||
#pragma newdecls required | ||
|
||
#include <sourcemod> | ||
#include <sdktools> | ||
|
||
public Plugin:myinfo = | ||
#define TEAM_SURVIVOR 2 | ||
|
||
public Plugin myinfo = | ||
{ | ||
name = "L4D2 Finale Incap Distance Fixifier", | ||
author = "CanadaRox", | ||
description = "Kills survivors before the score is calculated so you don't get full distance if you are incapped as the rescue vehicle leaves.", | ||
version = "1.0.1", | ||
url = "https://bitbucket.org/CanadaRox/random-sourcemod-stuff" | ||
version = "1.0.2", | ||
url = "https://github.com/SirPlease/L4D2-Competitive-Rework" | ||
}; | ||
|
||
public OnPluginStart() | ||
public void OnPluginStart() | ||
{ | ||
HookEvent("finale_vehicle_leaving", FinaleEnd_Event, EventHookMode_PostNoCopy); | ||
} | ||
|
||
public FinaleEnd_Event(Handle:event, const String:name[], bool:dontBroadcast) | ||
public void FinaleEnd_Event(Event hEvent, const char[] sEventName, bool bDontBroadcast) | ||
{ | ||
for (new i = 1; i <= MaxClients; i++) | ||
{ | ||
if (IsClientInGame(i) && GetClientTeam(i) == 2 && IsPlayerIncap(i)) | ||
{ | ||
for (int i = 1; i <= MaxClients; i++) { | ||
if (IsClientInGame(i) && GetClientTeam(i) == TEAM_SURVIVOR && IsPlayerIncap(i)) { | ||
ForcePlayerSuicide(i); | ||
} | ||
} | ||
} | ||
|
||
stock IsPlayerIncap(client) return GetEntProp(client, Prop_Send, "m_isIncapacitated"); | ||
bool IsPlayerIncap(int iClient) | ||
{ | ||
return view_as<bool>(GetEntProp(iClient, Prop_Send, "m_isIncapacitated", 1)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.