diff --git a/plugins/basechat.smx b/plugins/basechat.smx index a0e54ab..c81a652 100644 Binary files a/plugins/basechat.smx and b/plugins/basechat.smx differ diff --git a/plugins/globalbans.smx b/plugins/globalbans.smx index 6c87ad8..c15ef42 100644 Binary files a/plugins/globalbans.smx and b/plugins/globalbans.smx differ diff --git a/plugins/l4d2_feedthetrolls.smx b/plugins/l4d2_feedthetrolls.smx index 21ebcb7..baba10b 100644 Binary files a/plugins/l4d2_feedthetrolls.smx and b/plugins/l4d2_feedthetrolls.smx differ diff --git a/plugins/l4d2_hideandseek.smx b/plugins/l4d2_hideandseek.smx index 3ca1e2c..3b1d441 100644 Binary files a/plugins/l4d2_hideandseek.smx and b/plugins/l4d2_hideandseek.smx differ diff --git a/scripting/basechat.sp b/scripting/basechat.sp index 61c2a96..d00c1db 100644 --- a/scripting/basechat.sp +++ b/scripting/basechat.sp @@ -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 */ } diff --git a/scripting/globalbans.sp b/scripting/globalbans.sp index b84d668..d045f22 100644 --- a/scripting/globalbans.sp +++ b/scripting/globalbans.sp @@ -11,7 +11,6 @@ #include #include -#include public Plugin myinfo = { diff --git a/scripting/include/feedthetrolls/events.inc b/scripting/include/feedthetrolls/events.inc index 7a10171..2c37550 100644 --- a/scripting/include/feedthetrolls/events.inc +++ b/scripting/include/feedthetrolls/events.inc @@ -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; diff --git a/scripting/include/feedthetrolls/timers.inc b/scripting/include/feedthetrolls/timers.inc index 2979873..1cd1128 100644 --- a/scripting/include/feedthetrolls/timers.inc +++ b/scripting/include/feedthetrolls/timers.inc @@ -280,4 +280,5 @@ Action Timer_SpawnBotsPost(Handle h) { } } } + return Plugin_Handled; } \ No newline at end of file diff --git a/scripting/include/hideandseek/hsgame.inc b/scripting/include/hideandseek/hsgame.inc index d4c8934..446ac04 100644 --- a/scripting/include/hideandseek/hsgame.inc +++ b/scripting/include/hideandseek/hsgame.inc @@ -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) { diff --git a/scripting/include/left4dhooks.inc b/scripting/include/left4dhooks.inc index 2e73b85..af5dfa6 100644 --- a/scripting/include/left4dhooks.inc +++ b/scripting/include/left4dhooks.inc @@ -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. diff --git a/scripting/include/left4dhooks_stocks.inc b/scripting/include/left4dhooks_stocks.inc index 5e674e9..6e7810c 100644 --- a/scripting/include/left4dhooks_stocks.inc +++ b/scripting/include/left4dhooks_stocks.inc @@ -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)) { diff --git a/scripting/l4d2_feedthetrolls.sp b/scripting/l4d2_feedthetrolls.sp index b2d521f..323c088 100644 --- a/scripting/l4d2_feedthetrolls.sp +++ b/scripting/l4d2_feedthetrolls.sp @@ -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); diff --git a/scripting/l4d2_hideandseek.sp b/scripting/l4d2_hideandseek.sp index 8e9f044..b9e5092 100644 --- a/scripting/l4d2_hideandseek.sp +++ b/scripting/l4d2_hideandseek.sp @@ -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) {