Update more to 1.11

This commit is contained in:
Jackz 2022-07-05 13:50:51 -05:00
parent 0718b24855
commit 25a35284cd
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
13 changed files with 36 additions and 22 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -116,10 +116,10 @@ public Action OnClientSayCommand(int client, const char[] command, const char[]
int target = FindTarget(client, arg, true, false);
if (target == -1 || len == -1) {
PrintToChat(client, "Cannot send a private msg: Invalid user specified.");
} else {
SendPrivateChat(client, target, sArgs[startidx+len]);
}
PrintToChat(client, "Cannot send a private msg: Invalid user specified.");
} else {
SendPrivateChat(client, target, sArgs[startidx+len]);
}
return Plugin_Stop;
@ -436,5 +436,6 @@ void SendPanelToAll(int from, char[] message)
public int Handler_DoNothing(Menu menu, MenuAction action, int param1, int param2)
{
return 0;
/* Do nothing */
}

View file

@ -11,7 +11,6 @@
#include <sourcemod>
#include <sdktools>
#include <geoip>
public Plugin myinfo =
{

View file

@ -272,7 +272,7 @@ public Action L4D2_OnEntityShoved(int client, int entity, int weapon, float vecD
}
public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs) {
if(sArgs[0] == '@') return Plugin_Continue; //Ignore admin chat
if(client <= 0 || sArgs[0] == '@') return Plugin_Continue; //Ignore admin chat or console
static int honkID;
static int profanityID;

View file

@ -280,4 +280,5 @@ Action Timer_SpawnBotsPost(Handle h) {
}
}
}
return Plugin_Handled;
}

View file

@ -196,12 +196,12 @@ stock void GetHorizontalPositionFromClient(int client, float units, float finalP
finalPosition = pos;
}
void SetParent(int child, int parent) {
stock void SetParent(int child, int parent) {
SetVariantString("!activator");
AcceptEntityInput(child, "SetParent", parent);
}
void SetParentAttachment(int child, const char[] attachment, bool withOffset = false) {
stock void SetParentAttachment(int child, const char[] attachment, bool withOffset = false) {
SetVariantString(attachment);
if(withOffset)
AcceptEntityInput(child, "SetParentAttachmentMaintainOffset");
@ -209,12 +209,10 @@ void SetParentAttachment(int child, const char[] attachment, bool withOffset = f
AcceptEntityInput(child, "SetParentAttachment");
}
void ClearParent(int child) {
stock void ClearParent(int child) {
AcceptEntityInput(child, "ClearParent");
}
static float EMPTY_ANG[3] = { 0.0, 0.0, 0.0 };
void SetPeekCamTarget(int target, bool showFPOV = false) {
if(seekerCam == INVALID_ENT_REFERENCE || !IsValidEntity(seekerCam)) {
seekerCam = CreateEntityByName("point_viewcontrol_survivor");
@ -253,10 +251,6 @@ void SetPeekCamTarget(int target, bool showFPOV = false) {
}
}
bool IsPeekCamActive(int client) {
return isViewingCam[client];
}
// int GetClientsInRange(const float origin[3], ClientRangeType rangeType, int[] clients, int size)
void SetPeekCamActive(int client, bool active) {
if(seekerCam != INVALID_ENT_REFERENCE) {

View file

@ -58,9 +58,9 @@
// Natives: 226
// L4D1 = 29 [left4downtown] + 47 [l4d_direct] + 15 [l4d2addresses] + 43 [silvers - mine!] + 4 [anim] = 132
// L4D2 = 59 [left4downtown] + 61 [l4d_direct] + 26 [l4d2addresses] + 79 [silvers - mine!] + 4 [anim] = 223
// Natives: 227
// L4D1 = 29 [left4downtown] + 47 [l4d_direct] + 15 [l4d2addresses] + 43 [silvers - mine!] + 4 [anim] = 133
// L4D2 = 60 [left4downtown] + 61 [l4d_direct] + 26 [l4d2addresses] + 80 [silvers - mine!] + 4 [anim] = 224
// Forwards: 144
// L4D1 = 109;
@ -331,6 +331,7 @@ public void __pl_l4dh_SetNTVOptional()
MarkNativeAsOptional("L4D2_Charger_StartCarryingVictim");
MarkNativeAsOptional("L4D2_Charger_PummelVictim");
MarkNativeAsOptional("L4D2_Charger_EndPummel");
MarkNativeAsOptional("L4D2_Jockey_EndRide");
MarkNativeAsOptional("L4D_CancelStagger");
MarkNativeAsOptional("L4D_CreateRescuableSurvivors");
MarkNativeAsOptional("L4D_ReviveSurvivor");
@ -4671,6 +4672,7 @@ native void L4D_CancelStagger(int client);
*
* @noreturn
*/
// L4D2 only.
native void L4D2_Charger_ThrowImpactedSurvivor(int victim, int attacker);
/**
@ -4683,6 +4685,7 @@ native void L4D2_Charger_ThrowImpactedSurvivor(int victim, int attacker);
*
* @noreturn
*/
// L4D2 only.
native void L4D2_Charger_StartCarryingVictim(int victim, int attacker);
/**
@ -4693,6 +4696,7 @@ native void L4D2_Charger_StartCarryingVictim(int victim, int attacker);
*
* @noreturn
*/
// L4D2 only.
native void L4D2_Charger_PummelVictim(int victim, int attacker);
/**
@ -4703,8 +4707,20 @@ native void L4D2_Charger_PummelVictim(int victim, int attacker);
*
* @noreturn
*/
// L4D2 only.
native void L4D2_Charger_EndPummel(int victim, int attacker);
/**
* @brief Makes a Jockey stop riding a Survivor
*
* @param victim Client index of the Survivor to affect
* @param attacker Client index of the Jockey riding the Survivor
*
* @noreturn
*/
// L4D2 only.
native void L4D2_Jockey_EndRide(int victim, int attacker);
/**
* @brief Spawns all dead survivors in rescuable rooms.
* @remarks L4D1: Any survivor must not be in the starting area for it to work.

View file

@ -661,7 +661,7 @@ stock int L4D_GetPendingTankPlayer()
* @return True if glow was set, false if entity does not support glow.
*/
// L4D2 only.
stock bool L4D2_SetEntityGlow(int entity, L4D2GlowType type, int range, int minRange, int colorOverride[3], bool flashing)
stock bool L4D2_SetEntityGlow(int entity, L4D2GlowType type, int range, int minRange, colorOverride[3], bool flashing)
{
if (!IsValidEntity(entity))
{

View file

@ -66,7 +66,7 @@ public void OnPluginStart() {
hAutoPunish = CreateConVar("sm_ftt_autopunish_action", "0", "Setup automatic punishment of players. Add bits together\n0=Disabled, 1=Tank magnet, 2=Special magnet, 4=Swarm, 8=InstantVomit", FCVAR_NONE, true, 0.0);
hAutoPunishExpire = CreateConVar("sm_ftt_autopunish_expire", "0", "How many minutes of gametime until autopunish is turned off? 0 for never.", FCVAR_NONE, true, 0.0);
hMagnetChance = CreateConVar("sm_ftt_magnet_chance", "1.0", "% of the time that the magnet will work on a player.", FCVAR_NONE, true, 0.0, true, 1.0);
hMagnetTargetMode = CreateConVar("sm_ftt_magnet_targetting", "4", "How does the specials target players. Add bits together\n0=Incapped are ignored, 1=Specials targets incapped, 2=Tank targets incapped 4=Witch targets incapped");
hMagnetTargetMode = CreateConVar("sm_ftt_magnet_targetting", "6", "How does the specials target players. Add bits together\n0=Incapped are ignored, 1=Specials targets incapped, 2=Tank targets incapped 4=Witch targets incapped");
hShoveFailChance = CreateConVar("sm_ftt_shove_fail_chance", "0.65", "The % chance that a shove fails", FCVAR_NONE, true, 0.0, true, 1.0);
hBadThrowHitSelf = CreateConVar("sm_ftt_badthrow_fail_chance", "1", "The % chance that on a throw, they will instead hit themselves. 0 to disable", FCVAR_NONE, true, 0.0, true, 1.0);
hBotReverseFFDefend = CreateConVar("sm_ftt_bot_defend", "0", "Should bots defend themselves?\n0 = OFF\n1 = Will retaliate against non-admins\n2 = Anyone", FCVAR_NONE, true, 0.0, true, 2.0);

View file

@ -217,6 +217,7 @@ public void OnSceneStageChanged(int scene, SceneStages stage) {
}
}
bool wasEnabled;
public void Event_GamemodeChange(ConVar cvar, const char[] oldValue, const char[] newValue) {
cvar.GetString(gamemode, sizeof(gamemode));
#if defined FORCE_ENABLED
@ -250,7 +251,9 @@ public void Event_GamemodeChange(ConVar cvar, const char[] oldValue, const char[
}
}
}
} else if(!lateLoaded) {
wasEnabled = true;
} else if(wasEnabled) {
wasEnabled = false;
UnhookEvent("round_end", Event_RoundEnd);
UnhookEvent("round_start", Event_RoundStart);
UnhookEvent("item_pickup", Event_ItemPickup);
@ -271,6 +274,7 @@ public Action Timer_StopPeekCam(Handle h) {
}
AcceptEntityInput(seekerCam, "Kill");
seekerCam = INVALID_ENT_REFERENCE;
return Plugin_Handled;
}
public void Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast) {
@ -547,7 +551,6 @@ public Action Timer_RoundStart(Handle h) {
PrintToServer("[H&S] Map time is %d seconds", GetMapTime());
return Plugin_Continue;
}
static float SHAKE_SIZE[3] = { 40.0, 40.0, 20.0 };
static float lastShakeTime;
public void Hook_OnAttackPost(int entity, int attacker, int inflictor, float damage, int damagetype, int ammotype, int hitbox, int hitgroup) {