Skip to content

Commit

Permalink
Merge branch 'SirPlease_master'
Browse files Browse the repository at this point in the history
  • Loading branch information
altair-sossai committed Jun 21, 2024
2 parents 6597d0b + 4237589 commit f1564ab
Show file tree
Hide file tree
Showing 166 changed files with 1,052 additions and 940 deletions.
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ $RECYCLE.BIN/
# =========================
# Operating System Files
# =========================
.vscode
.local
cfg/server_secret.cfg
addons/sourcemod/logs/
cvars_secret.cfg

# Visual Studio Code files
/.vscode
Binary file modified addons/sourcemod/plugins/optional/l4d_tank_control_eq.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/optional/playermanagement.smx
Binary file not shown.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/1v1.sp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void OnPluginStart()
HookEvent("player_hurt", Event_PlayerHurt, EventHookMode_Post);
}

public void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast)
void Event_PlayerHurt(Event hEvent, const char[] sEventName, bool bDontBroadcast)
{
int fDamage = hEvent.GetInt("dmg_health");
if (fDamage < g_hCvarDmgThreshold.IntValue) {
Expand Down
48 changes: 21 additions & 27 deletions addons/sourcemod/scripting/1v1_skeetstats.sp
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@ public void OnPluginStart()
}
}

/*
public OnPluginEnd()
{
// nothing
}
*/
public void OnClientPutInServer(int client)
{
char tmpBuffer[64];
Expand All @@ -274,7 +268,7 @@ public void OnClientPutInServer(int client)
* convar changes (phase this out later)
* ==============
*/
public void ConVarChange_CountTankDamage(Handle cvar, const char[] oldValue, const char[] newValue)
void ConVarChange_CountTankDamage(Handle cvar, const char[] oldValue, const char[] newValue)
{
if (StringToInt(newValue) == 0)
{
Expand All @@ -286,7 +280,7 @@ public void ConVarChange_CountTankDamage(Handle cvar, const char[] oldValue, con
}
}

public void ConVarChange_CountWitchDamage(Handle cvar, const char[] oldValue, const char[] newValue)
void ConVarChange_CountWitchDamage(Handle cvar, const char[] oldValue, const char[] newValue)
{
if (StringToInt(newValue) == 0)
{
Expand All @@ -298,12 +292,12 @@ public void ConVarChange_CountWitchDamage(Handle cvar, const char[] oldValue, co
}
}

public void ConVarChange_BrevityFlags(Handle cvar, const char[] oldValue, const char[] newValue)
void ConVarChange_BrevityFlags(Handle cvar, const char[] oldValue, const char[] newValue)
{
iBrevityFlags = StringToInt(newValue);
}

public void ConVarChange_RUPActive(Handle cvar, const char[] oldValue, const char[] newValue)
void ConVarChange_RUPActive(Handle cvar, const char[] oldValue, const char[] newValue)
{
if (StringToInt(newValue) == 0)
{
Expand All @@ -315,7 +309,7 @@ public void ConVarChange_RUPActive(Handle cvar, const char[] oldValue, const cha
}
}

public void ConVarChange_PounceDmgInt(Handle cvar, const char[] oldValue, const char[] newValue)
void ConVarChange_PounceDmgInt(Handle cvar, const char[] oldValue, const char[] newValue)
{
iPounceDmgInt = StringToInt(newValue);
}
Expand All @@ -324,7 +318,7 @@ public void ConVarChange_PounceDmgInt(Handle cvar, const char[] oldValue, const
* map load / round start/end
* ==========================
*/
public Action PlayerLeftStartArea(Handle event, const char[] name, bool dontBroadcast)
Action PlayerLeftStartArea(Handle event, const char[] name, bool dontBroadcast)
{
iClientPlaying = GetCurrentSurvivor();
bPlayerLeftStartArea = true; // if RUP active, now we can start tracking
Expand All @@ -346,7 +340,7 @@ public void OnMapEnd()
bInRound = false;
}

public void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast)
void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast)
{
iClientPlaying = GetCurrentSurvivor();
bPlayerLeftStartArea = false;
Expand All @@ -366,7 +360,7 @@ public void RoundStart_Event(Handle event, const char[] name, bool dontBroadcast
}
}

public void RoundEnd_Event(Handle event, const char[] name, bool dontBroadcast)
void RoundEnd_Event(Handle event, const char[] name, bool dontBroadcast)
{
// only show / log stuff when the round is done "the first time"
if (bInRound)
Expand All @@ -381,7 +375,7 @@ public void RoundEnd_Event(Handle event, const char[] name, bool dontBroadcast)
* cmds / reports
* ==============
*/
public Action Say_Cmd(int client, int args)
Action Say_Cmd(int client, int args)
{
if (!client)
{
Expand All @@ -399,15 +393,15 @@ public Action Say_Cmd(int client, int args)
return Plugin_Continue;
}

public Action SkeetStat_Cmd(int client, int args)
Action SkeetStat_Cmd(int client, int args)
{
// FloatSub(GetEngineTime(), fPreviousShot[user]) < SHOTGUN_TIME // <-- use this to avoid the following from affecting stats.. maybe.
ResolveOpenShots(); // make sure we're up to date (this *might* affect the stats, but it'd have to be insanely badly timed
PrintSkeetStats(client);
return Plugin_Handled;
}

public Action delayedSkeetStatPrint(Handle timer)
Action delayedSkeetStatPrint(Handle timer)
{
PrintSkeetStats(0);
return Plugin_Continue;
Expand All @@ -417,7 +411,7 @@ public Action delayedSkeetStatPrint(Handle timer)
* track damage/kills & accuracy
* =============================
*/
public void PlayerHurt_Event(Handle event, const char[] name, bool dontBroadcast)
void PlayerHurt_Event(Handle event, const char[] name, bool dontBroadcast)
{
int zombieClass = 0;

Expand Down Expand Up @@ -507,7 +501,7 @@ public void PlayerHurt_Event(Handle event, const char[] name, bool dontBroadcast
}
}

public void InfectedHurt_Event(Handle event, const char[] name, bool dontBroadcast)
void InfectedHurt_Event(Handle event, const char[] name, bool dontBroadcast)
{
// check user
int userId = GetEventInt(event, "attacker");
Expand Down Expand Up @@ -646,7 +640,7 @@ public void InfectedHurt_Event(Handle event, const char[] name, bool dontBroadca
}
}

public void PlayerDeath_Event(Handle event, const char[] name, bool dontBroadcast)
void PlayerDeath_Event(Handle event, const char[] name, bool dontBroadcast)
{
int zombieClass = 0;

Expand Down Expand Up @@ -710,7 +704,7 @@ public void PlayerDeath_Event(Handle event, const char[] name, bool dontBroadcas
}
}

public void InfectedDeath_Event(Handle event, const char[] name, bool dontBroadcast)
void InfectedDeath_Event(Handle event, const char[] name, bool dontBroadcast)
{
int attackerId = GetEventInt(event, "attacker");
int attacker = GetClientOfUserId(attackerId);
Expand All @@ -724,7 +718,7 @@ public void InfectedDeath_Event(Handle event, const char[] name, bool dontBroadc
}
}

public void PlayerShoved_Event(Handle event, const char[] name, bool dontBroadcast)
void PlayerShoved_Event(Handle event, const char[] name, bool dontBroadcast)
{
// check user
int userId = GetEventInt(event, "attacker");
Expand All @@ -748,7 +742,7 @@ public void PlayerShoved_Event(Handle event, const char[] name, bool dontBroadca
}

// hunters pouncing / tracking
public void AbilityUse_Event(Handle event, const char[] name, bool dontBroadcast)
void AbilityUse_Event(Handle event, const char[] name, bool dontBroadcast)
{
// track hunters pouncing
int userId = GetEventInt(event, "userid");
Expand All @@ -771,7 +765,7 @@ public void AbilityUse_Event(Handle event, const char[] name, bool dontBroadcast
}
}

public Action groundTouchTimer(Handle timer, int client)
Action groundTouchTimer(Handle timer, int client)
{
if (IsClientAndInGame(client) && (isGrounded(client) || !IsPlayerAlive(client)))
{
Expand All @@ -782,13 +776,13 @@ public Action groundTouchTimer(Handle timer, int client)
return Plugin_Continue;
}

public bool isGrounded(int client)
bool isGrounded(int client)
{
return (GetEntProp(client, Prop_Data, "m_fFlags") & FL_ONGROUND) > 0;
}

// accuracy:
public void WeaponFire_Event(Handle event, const char[] name, bool dontBroadcast)
void WeaponFire_Event(Handle event, const char[] name, bool dontBroadcast)
{
// check user
int userId = GetEventInt(event, "userid");
Expand Down Expand Up @@ -1004,7 +998,7 @@ void PrintSkeetStats(int toClient)
*/

// resolve hits, for the final shotgun blasts before wipe/saferoom
public void ResolveOpenShots()
void ResolveOpenShots()
{
if (iClientPlaying <= 0)
{
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/8ball.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void OnPluginStart()
RegConsoleCmd("sm_8ball", Command_8ball);
}

public Action Command_8ball(int iClient, int iArgs)
Action Command_8ball(int iClient, int iArgs)
{
if (iArgs == 0)
{
Expand Down Expand Up @@ -63,4 +63,4 @@ public Action Command_8ball(int iClient, int iArgs)
}

return Plugin_Handled;
}
}
6 changes: 3 additions & 3 deletions addons/sourcemod/scripting/MeleeInTheSafeRoom.sp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public OnPluginStart()
RegAdminCmd("sm_melee", Command_SMMelee, ADMFLAG_KICK, "Lists all melee weapons spawnable in current campaign" );
}

public Action:Command_SMMelee(client, args)
Action:Command_SMMelee(client, args)
{
for( new i = 0; i < g_iMeleeClassCount; i++ )
{
Expand Down Expand Up @@ -116,7 +116,7 @@ public OnMapStart()
RemoveEdict(index);
}

public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
if( !GetConVarBool( g_hEnabled ) ) return Plugin_Continue;

Expand All @@ -131,7 +131,7 @@ public Action:Event_RoundStart(Handle:event, const String:name[], bool:dontBroad
return Plugin_Continue;
}

public Action:Timer_SpawnMelee( Handle:timer )
Action:Timer_SpawnMelee( Handle:timer )
{
new client = GetInGameClient();

Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/aitankgank.sp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void OnPluginStart()
HookEvent("player_bot_replace", OnTankGoneAi);
}

public void OnTankGoneAi(Event hEvent, const char[] sEventName, bool bDontBroadcast)
void OnTankGoneAi(Event hEvent, const char[] sEventName, bool bDontBroadcast)
{
int iNewTank = GetClientOfUserId(hEvent.GetInt("bot"));

Expand All @@ -45,7 +45,7 @@ public void OnTankGoneAi(Event hEvent, const char[] sEventName, bool bDontBroadc
}
}

public Action Timed_CheckAndKill(Handle hTimer, any iNewTank)
Action Timed_CheckAndKill(Handle hTimer, any iNewTank)
{
if (IsFakeClient(iNewTank) && IsPlayerAlive(iNewTank)) {
ForcePlayerSuicide(iNewTank);
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/annoyance_exploit_fixes.sp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void OnCedapugEnded()
g_bCedaGame = false;
}

public Action Listener_CallVote(int client, const char[] command, int argc)
Action Listener_CallVote(int client, const char[] command, int argc)
{
if (!client || !IsClientInGame(client))
return Plugin_Handled;
Expand Down
8 changes: 4 additions & 4 deletions addons/sourcemod/scripting/autopause.sp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void OnClientPutInServer(int client)
}
}

public void Event_RoundStart(Event hEvent, char[] sEventName, bool dontBroadcast)
void Event_RoundStart(Event hEvent, char[] sEventName, bool dontBroadcast)
{
ClearTrie(crashedPlayers);
ClearArray(generalCrashers);
Expand All @@ -157,12 +157,12 @@ public void Event_RoundStart(Event hEvent, char[] sEventName, bool dontBroadcast
bRoundEnd = false;
}

public void Event_RoundEnd(Event hEvent, char[] sEventName, bool dontBroadcast)
void Event_RoundEnd(Event hEvent, char[] sEventName, bool dontBroadcast)
{
bRoundEnd = true;
}

public void Event_PlayerTeam(Event hEvent, char[] sEventName, bool dontBroadcast)
void Event_PlayerTeam(Event hEvent, char[] sEventName, bool dontBroadcast)
{
int client = GetClientOfUserId(hEvent.GetInt("userid"));

Expand Down Expand Up @@ -239,7 +239,7 @@ public void Event_PlayerTeam(Event hEvent, char[] sEventName, bool dontBroadcast
}
}

public void Event_PlayerDisconnect(Event hEvent, char[] sEventName, bool dontBroadcast)
void Event_PlayerDisconnect(Event hEvent, char[] sEventName, bool dontBroadcast)
{
int client = GetClientOfUserId(hEvent.GetInt("userid"));

Expand Down
12 changes: 6 additions & 6 deletions addons/sourcemod/scripting/bequiet.sp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void OnPluginStart()
LoadTranslations("bequiet.phrases");
}

public Action Say_Callback(int client, char[] command, int args)
Action Say_Callback(int client, char[] command, int args)
{
char sayWord[MAX_NAME_LENGTH];
GetCmdArg(1, sayWord, sizeof(sayWord));
Expand All @@ -58,7 +58,7 @@ public Action Say_Callback(int client, char[] command, int args)
return Plugin_Continue;
}

public Action TeamSay_Callback(int client, char[] command, int args)
Action TeamSay_Callback(int client, char[] command, int args)
{
char sayWord[MAX_NAME_LENGTH];
GetCmdArg(1, sayWord, sizeof(sayWord));
Expand Down Expand Up @@ -90,13 +90,13 @@ public Action TeamSay_Callback(int client, char[] command, int args)
return Plugin_Continue;
}

public Action Event_ServerConVar(Event event, const char[] name, bool dontBroadcast)
Action Event_ServerConVar(Event event, const char[] name, bool dontBroadcast)
{
if (bCvarChange) return Plugin_Handled;
return Plugin_Continue;
}

public Action Event_NameChange(Event event, const char[] name, bool dontBroadcast)
Action Event_NameChange(Event event, const char[] name, bool dontBroadcast)
{
int clientid = event.GetInt("userid");
int client = GetClientOfUserId(clientid);
Expand All @@ -109,15 +109,15 @@ public Action Event_NameChange(Event event, const char[] name, bool dontBroadcas
return Plugin_Continue;
}

public void cvarChanged(Handle convar, const char[] oldValue, const char[] newValue)
void cvarChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
bCvarChange = hCvarCvarChange.BoolValue;
bNameChange = hCvarNameChange.BoolValue;
bSpecNameChange = hCvarSpecNameChange.BoolValue;
bSpecSeeChat = hCvarSpecSeeChat.BoolValue;
}

stock bool IsValidClient(int client)
bool IsValidClient(int client)
{
if (client <= 0 || client > MaxClients || !IsClientConnected(client) || !IsClientInGame(client)) return false;
return true;
Expand Down
Loading

0 comments on commit f1564ab

Please sign in to comment.