Skip to content

Commit c0e5ae9

Browse files
authored
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.
1 parent 3b49522 commit c0e5ae9

41 files changed

Lines changed: 321 additions & 283 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
-42 Bytes
Binary file not shown.
140 Bytes
Binary file not shown.
734 Bytes
Binary file not shown.
-200 Bytes
Binary file not shown.
-327 Bytes
Binary file not shown.
27 Bytes
Binary file not shown.
-30 Bytes
Binary file not shown.

addons/sourcemod/scripting/1v1.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBr
7171

7272
int iRemainingHealth = GetClientHealth(iAttacker);
7373

74-
// [1v1] A1m` (Hunter) had 250 health remaining!
74+
// [1v1] Player (Hunter) had 250 health remaining!
7575
// [1v1] AI (Hunter) had 250 health remaining!
7676

7777
char sName[MAX_NAME_LENGTH];
Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,61 @@
1+
#pragma semicolon 1
2+
#pragma newdecls required
3+
14
#include <sourcemod>
25
#include <sdktools>
36
#include <left4dhooks>
47

5-
public Plugin:myinfo =
8+
ConVar
9+
g_hCvarEnabled = null,
10+
g_hCvarSkipStaticMaps = null;
11+
12+
public Plugin myinfo =
613
{
714
name = "Versus Boss Spawn Persuasion",
815
author = "ProdigySim",
916
description = "Makes Versus Boss Spawns obey cvars",
10-
version = "1.2",
11-
url = "http://compl4d2.com/"
12-
}
13-
14-
new Handle:hCvarEnabled;
15-
new Handle:hCvarSkipStaticMaps;
17+
version = "1.3",
18+
url = "https://github.com/SirPlease/L4D2-Competitive-Rework"
19+
};
1620

17-
18-
public OnPluginStart()
21+
public void OnPluginStart()
1922
{
20-
hCvarEnabled = CreateConVar("l4d_obey_boss_spawn_cvars", "1", "Enable forcing boss spawns to obey boss spawn cvars");
21-
hCvarSkipStaticMaps = CreateConVar("l4d_obey_boss_spawn_except_static", "1", "Don't override boss spawning rules on Static Tank Spawn maps (c7m1, c13m2)");
23+
g_hCvarEnabled = CreateConVar("l4d_obey_boss_spawn_cvars", "1", "Enable forcing boss spawns to obey boss spawn cvars", _, true, 0.0, true, 1.0);
24+
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);
2225
}
2326

24-
25-
public Action:L4D_OnGetScriptValueInt(const String:key[], &retVal)
27+
public Action L4D_OnGetScriptValueInt(const char[] sKey, int &retVal)
2628
{
27-
if(GetConVarBool(hCvarEnabled))
28-
{
29-
if(StrEqual(key, "DisallowThreatType"))
30-
{
29+
if (g_hCvarEnabled.BoolValue) {
30+
if (strcmp(sKey, "DisallowThreatType") == 0) {
3131
// Stop allowing threat types!
3232
retVal = 0;
3333
return Plugin_Handled;
3434
}
35-
36-
if(StrEqual(key, "ProhibitBosses"))
37-
{
38-
// Fuck that!
35+
36+
if (strcmp(sKey, "ProhibitBosses") == 0) {
3937
retVal = 0;
40-
return Plugin_Handled;
38+
return Plugin_Handled;
4139
}
4240
}
43-
return Plugin_Continue;
44-
4541

42+
return Plugin_Continue;
4643
}
4744

48-
public Action:L4D_OnGetMissionVSBossSpawning(&Float:spawn_pos_min, &Float:spawn_pos_max, &Float:tank_chance, &Float:witch_chance)
45+
public Action L4D_OnGetMissionVSBossSpawning(float &spawn_pos_min, float &spawn_pos_max, float &tank_chance, float &witch_chance)
4946
{
50-
if(GetConVarBool(hCvarEnabled))
51-
{
52-
if(GetConVarBool(hCvarSkipStaticMaps))
53-
{
54-
decl String:mapbuf[32];
55-
GetCurrentMap(mapbuf, sizeof(mapbuf));
56-
if(StrEqual(mapbuf, "c7m1_docks") || StrEqual(mapbuf, "c13m2_southpinestream"))
57-
{
47+
if (g_hCvarEnabled.BoolValue) {
48+
if (g_hCvarSkipStaticMaps.BoolValue) {
49+
char sMapName[32];
50+
GetCurrentMap(sMapName, sizeof(sMapName));
51+
52+
if (strcmp(sMapName, "c7m1_docks") == 0 || strcmp(sMapName, "c13m2_southpinestream") == 0) {
5853
return Plugin_Continue;
5954
}
6055
}
56+
6157
return Plugin_Handled;
6258
}
59+
6360
return Plugin_Continue;
6461
}

addons/sourcemod/scripting/code_patcher.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ArrayList
2020
public Plugin myinfo =
2121
{
2222
name = "Code patcher",
23-
author = "Jahze?", //new syntax A1m`, fix unload error
23+
author = "Jahze?, A1m`",
2424
version = "1.1",
2525
description = "Code patcher",
2626
url = "https://github.com/SirPlease/L4D2-Competitive-Rework"

0 commit comments

Comments
 (0)