diff --git a/plugins/l4d2_feedthetrolls.smx b/plugins/l4d2_feedthetrolls.smx index c4e9c41..3241da2 100644 Binary files a/plugins/l4d2_feedthetrolls.smx and b/plugins/l4d2_feedthetrolls.smx differ diff --git a/scripting/include/feedthetrolls/base.inc b/scripting/include/feedthetrolls/base.inc index 93cfa06..1f26db9 100644 --- a/scripting/include/feedthetrolls/base.inc +++ b/scripting/include/feedthetrolls/base.inc @@ -352,11 +352,11 @@ void ApplyTroll(int victim, const char[] name, int activator, trollModifier modi } } - bool isActive = IsTrollActive(victim, troll.name); + bool isActive = Trolls[trollIndex].activeFlagClients[victim] > -1; // Toggle on flags for client, if it's not a single run. if(modifier & TrollMod_Constant) { - Trolls[troll.id].activeFlagClients[victim] = isActive ? -1 : flags; + Trolls[trollIndex].activeFlagClients[victim] = isActive ? -1 : flags; } // Applies any custom logic needed for a troll, mostly only used for TrollMod_Instant diff --git a/scripting/include/feedthetrolls/misc.inc b/scripting/include/feedthetrolls/misc.inc index 7b1236a..7c7856b 100644 --- a/scripting/include/feedthetrolls/misc.inc +++ b/scripting/include/feedthetrolls/misc.inc @@ -21,7 +21,7 @@ bool SetWitchTarget(int witch, int target) { #if defined _actions_included g_iWitchAttackVictim = target; BehaviorAction action = ActionsManager.GetAction(witch, "WitchBehavior"); - if(action == INVALID_ACTION) { + if(action == INVALID_ACTION || action.Child == INVALID_ACTION) { return false; } action = action.Child; diff --git a/scripting/l4d2_feedthetrolls.sp b/scripting/l4d2_feedthetrolls.sp index ef89c1f..32dd64d 100644 --- a/scripting/l4d2_feedthetrolls.sp +++ b/scripting/l4d2_feedthetrolls.sp @@ -85,7 +85,6 @@ public void OnPluginStart() { RegAdminCmd("sm_insta", Command_InstaSpecial, ADMFLAG_KICK, "Spawns a special that targets them, close to them."); RegAdminCmd("sm_stagger", Command_Stagger, ADMFLAG_KICK, "Stagger a player"); RegAdminCmd("sm_inface", Command_InstaSpecialFace, ADMFLAG_KICK, "Spawns a special that targets them, right in their face."); - // TODO: Merge as trolls RegAdminCmd("sm_bots_attack", Command_BotsAttack, ADMFLAG_CHEATS, "Instructs all bots to attack a player until they have X health."); RegAdminCmd("sm_scharge", Command_SmartCharge, ADMFLAG_CHEATS, "Auto Smart charge"); RegAdminCmd("sm_healbots", Command_HealTarget, ADMFLAG_CHEATS, "Make bots heal a player");