diff --git a/SQF/dayz_code/Configs/CfgVehicles/Zeds/Bloodsuckers.hpp b/SQF/dayz_code/Configs/CfgVehicles/Zeds/Bloodsuckers.hpp index cc3f8de77..fc0589a0b 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Zeds/Bloodsuckers.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Zeds/Bloodsuckers.hpp @@ -24,8 +24,8 @@ class z_bloodsucker : Zed_Base { forcedSpeed = 6; // Left here to prevent errors in player_zombieCheck class Eventhandlers { - init = "[(_this select 0)] execFSM ""\z\AddOns\dayz_code\system\mutant_agent.fsm"""; - local = "_z = _this select 0; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [_z,true] execFSM '\z\AddOns\dayz_code\system\mutant_agent.fsm';"; + init = "_this call mutant_initialize;"; + local = "_z = _this select 0; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [_z,true] call mutant_initialize;"; HandleDamage = "_this call mutant_damageHandler;"; Killed = "_this call mutant_eventKill;"; }; diff --git a/SQF/dayz_code/compile/mutant_initialize.sqf b/SQF/dayz_code/compile/mutant_initialize.sqf new file mode 100644 index 000000000..09cd41648 --- /dev/null +++ b/SQF/dayz_code/compile/mutant_initialize.sqf @@ -0,0 +1,7 @@ +// Moved from config to allow admins to modify + +if (count _this == 1) then { + [(_this select 0)] execFSM "\z\addons\dayz_code\system\mutant_agent.fsm"; +} else { + [(_this select 0),true] execFSM "\z\addons\dayz_code\system\mutant_agent.fsm"; +}; \ No newline at end of file diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index c875834cb..fe89faaab 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -52,6 +52,9 @@ DZE_doorManagement = true; // Enable Door Management by @DevZupa. // Group System dayz_groupSystem = false; // Enable group system +// Bloodsuckers +DZE_Bloodsuckers = false; // Enable bloodsucker spawning. + // Bury and Butcher Bodies DZE_Bury_Body = false; // Enable Bury Bodies DZE_Butcher_Body = false; // Enable Butcher Bodies @@ -346,9 +349,7 @@ if (!isDedicated) then { */ }; - // Bloodsuckers - DZE_Bloodsuckers = false; // Enable bloodsucker spawning. - + // Bloodsuckers if (DZE_Bloodsuckers) then { DZE_BloodsuckerChance = .15; // Chance that a building will spawn a bloodsucker. Default .15 (15%) DZE_BloodsuckerBuildings = ["Land_Hlidac_budka","Land_Mil_Guardhouse","Land_Mil_Barracks","Land_Mil_House","Land_Mil_Barracks_i","CrashSite_RU","CrashSite_US","CrashSite_EU","CrashSite_UN"]; // Bloodsuckers will spawn near these building classes. diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index c0133067e..78a67038a 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -810,6 +810,9 @@ fnc_Obj_FenceHandleDam = {}; //Needed for vanilla fences to prevent rpt errors object_roadFlare = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_roadFlare.sqf"; fn_shuffleArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_shuffleArray.sqf"; zombie_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_initialize.sqf"; +if (DZE_Bloodsuckers) then { + mutant_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\mutant_initialize.sqf"; +}; call compile preprocessFileLineNumbers "\z\addons\dayz_code\traps\init.sqf"; fnc_fieldOfView = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_fieldOfView.sqf"; fnc_deleteAt = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_deleteAt.sqf";