Made some plugins optional

This commit is contained in:
Jackz 2022-07-12 23:12:03 -05:00
parent 53191a9e3c
commit 0179109b05
No known key found for this signature in database
GPG key ID: E0BBD94CF657F603
6 changed files with 15 additions and 3 deletions

Binary file not shown.

View file

@ -42,7 +42,9 @@ void SetupsTrollCombos() {
SetupCombo(combo, "Magnet Galore");
combo.AddTroll("Special Magnet");
combo.AddTroll("Tank Magnet");
#if defined _behavior_included
combo.AddTroll("Witch Magnet");
#endif
SetupCombo(combo, "Tank Run Noob");
combo.AddTroll("Slow Speed");
@ -52,7 +54,9 @@ void SetupsTrollCombos() {
combo.AddTroll("Slow Speed");
combo.AddTroll("Special Magnet");
combo.AddTroll("Tank Magnet");
#if defined _behavior_included
combo.AddTroll("Witch Magnet");
#endif
combo.AddTroll("Reverse FF", .flags=2);
combo.AddTroll("Vomit Player");

View file

@ -737,6 +737,7 @@ public Action OnVocalizeCommand(int client, const char[] vocalize, int initiator
return Plugin_Continue;
}
#if defined _sceneprocessor_included
public void OnSceneStageChanged(int scene, SceneStages stage) {
if(stage == SceneStage_Spawned) {
static int vocalGagID, vocalizeSpecials;
@ -770,6 +771,7 @@ public void OnSceneStageChanged(int scene, SceneStages stage) {
}
}
}
#endif
public Action SoundHook(int clients[MAXPLAYERS], int& numClients, char sample[PLATFORM_MAX_PATH], int& entity, int& channel, float& volume, int& level, int& pitch, int& flags, char soundEntry[PLATFORM_MAX_PATH], int& seed) {
static int honkID;

View file

@ -17,6 +17,7 @@ void ActivateAutoPunish(int client) {
}
void SetWitchTarget(int witch, int target) {
#if defined _behavior_included
Behavior behavior = Behavior(witch, WITCH_QUERY);
BehaviorAction action = behavior.CurrentAction.Last;
@ -25,6 +26,9 @@ void SetWitchTarget(int witch, int target) {
IActionResult result; result.Init(CHANGE_TO, newaction);
result.ToAction(action);
#else
PrintToServer("[FTT] SetWitchTarget() called when behaviors plugin not found");
#endif
}
bool ToggleMarkPlayer(int client, int target) {

View file

@ -18,7 +18,9 @@ void SetupTrolls() {
AddMagnetFlags(index);
index = SetupTroll("Tank Magnet", "Attracts ALL tanks to any alive target with this troll enabled", TrollMod_Constant);
AddMagnetFlags(index);
#if defined _behavior_included
index = SetupTroll("Witch Magnet", "All witches when startled will target any player with this troll", TrollMod_Constant);
#endif
// fireSpitMagnetTrollIndex = SetupTroll("Fire & Acid Magnet", "Make the player gravitate toward danger", TRollMod_Constant);
/// CATEGORY: Infected

View file

@ -11,12 +11,12 @@
#include <sdkhooks>
#include <jutils>
#include <left4dhooks>
#include <sceneprocessor>
#include <l4d2_behavior>
#tryinclude <sceneprocessor>
#tryinclude <l4d2_behavior>
#include <basecomm>
#include <ftt>
#include <multicolors>
#include <l4d_anti_rush>
#tryinclude <l4d_anti_rush>
public Plugin myinfo =