diff --git a/SQF/dayz_code/Configs/CfgVehicles/Zeds/SwarmZeds.hpp b/SQF/dayz_code/Configs/CfgVehicles/Zeds/SwarmZeds.hpp index 6a210e116..1afabd94f 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Zeds/SwarmZeds.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Zeds/SwarmZeds.hpp @@ -24,7 +24,7 @@ class Swarm_Base : Citizen1 { class Eventhandlers { init = "if (isNil 'dayz_clientPreload') then {dayz_clientPreload = false;}; _this execFSM ""\z\AddOns\dayz_code\system\zombie_agent.fsm"""; //local = "if(_this select 1) then {[(position (_this select 0)),(_this select 0),true] execFSM '\z\AddOns\dayz_code\system\fn_swarmagent.fsm'};"; - local = "_z = _this select 0; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [(position _z), _z, true] execFSM '\z\AddOns\dayz_code\system\zombie_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\zombie_agent.fsm';"; HandleDamage = "_this call local_zombieDamage;"; Killed = "[_this,'zombieKills'] call local_eventKill;"; }; diff --git a/SQF/dayz_code/Configs/CfgVehicles/Zeds/WildZeds.hpp b/SQF/dayz_code/Configs/CfgVehicles/Zeds/WildZeds.hpp index 6524a39fd..36d16e333 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Zeds/WildZeds.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Zeds/WildZeds.hpp @@ -24,8 +24,8 @@ class WildZombie_Base : Zed_Base { class Eventhandlers { init = "if (isNil 'dayz_clientPreload') then {dayz_clientPreload = false;}; _this execFSM ""\z\AddOns\dayz_code\system\zombie_wildagent.fsm"""; - //local = "_z = _this select 0; if ((!isServer and !isNull _z) and {(side _z != civilian)}) exitWith { PVDZ_sec_atp = [ 'wrong side', player ]; publicVariableServer 'PVDZ_sec_atp'; deleteVehicle _z; }; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [(position _z), _z, true] execFSM '\z\AddOns\dayz_code\system\zombie_wildagent.fsm';"; - local = "_z = _this select 0; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [(position _z), _z, true] execFSM '\z\AddOns\dayz_code\system\zombie_wildagent.fsm';"; + //local = "_z = _this select 0; if ((!isServer and !isNull _z) and {(side _z != civilian)}) exitWith { PVDZ_sec_atp = [ 'wrong side', player ]; publicVariableServer 'PVDZ_sec_atp'; deleteVehicle _z; }; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [_z,true] execFSM '\z\AddOns\dayz_code\system\zombie_wildagent.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\zombie_wildagent.fsm';"; HandleDamage = "_this call local_zombieDamage;"; Killed = "[_this,'zombieKills'] call local_eventKill;"; }; diff --git a/SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp b/SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp index 402cc0074..4508c1e4e 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/Zeds/Zeds.hpp @@ -53,8 +53,8 @@ class zZombie_Base : Zed_Base { class Eventhandlers { init = "if (isNil 'dayz_clientPreload') then {dayz_clientPreload = false;}; _this execFSM ""\z\AddOns\dayz_code\system\zombie_agent.fsm"""; - //local = "_z = _this select 0; if ((!isServer and !isNull _z) and {(side _z != civilian)}) exitWith { PVDZ_sec_atp = [ 'wrong side', player ]; publicVariableServer 'PVDZ_sec_atp'; deleteVehicle _z; }; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [(position _z), _z, true] execFSM '\z\AddOns\dayz_code\system\zombie_agent.fsm';"; - local = "_z = _this select 0; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [(position _z), _z, true] execFSM '\z\AddOns\dayz_code\system\zombie_agent.fsm';"; + //local = "_z = _this select 0; if ((!isServer and !isNull _z) and {(side _z != civilian)}) exitWith { PVDZ_sec_atp = [ 'wrong side', player ]; publicVariableServer 'PVDZ_sec_atp'; deleteVehicle _z; }; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [_z,true] execFSM '\z\AddOns\dayz_code\system\zombie_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\zombie_agent.fsm';"; HandleDamage = "_this call local_zombieDamage;"; Killed = "[_this,'zombieKills'] call local_eventKill;"; }; diff --git a/SQF/dayz_code/system/zombie_agent.fsm b/SQF/dayz_code/system/zombie_agent.fsm index c6c59c300..aa27345d5 100644 --- a/SQF/dayz_code/system/zombie_agent.fsm +++ b/SQF/dayz_code/system/zombie_agent.fsm @@ -215,7 +215,7 @@ class FSM "_position = _agent modelToWorld [0,0,0];" \n "_secondHand = false;" \n "" \n - "if (count _this > 2) then {" \n + "if (count _this > 1) then {" \n " _secondHand = true;" \n " diag_log (""Second Hand Zombie Initialized: "" + str(_this));" \n "};"/*%FSM*/; diff --git a/SQF/dayz_code/system/zombie_wildagent.fsm b/SQF/dayz_code/system/zombie_wildagent.fsm index 7b213d0c9..f45ca4e39 100644 --- a/SQF/dayz_code/system/zombie_wildagent.fsm +++ b/SQF/dayz_code/system/zombie_wildagent.fsm @@ -114,13 +114,13 @@ class FSM class init { name = "init"; - init = /*%FSM*/"_position = _this select 0;" \n - "_agent = _this select 1;" \n + init = /*%FSM*/"_agent = _this select 0;" \n + "_position = _agent modelToWorld [0,0,0];" \n "" \n "_secondHand = false;" \n "" \n "" \n - "if (count _this > 2) then {" \n + "if (count _this > 1) then {" \n " //_secondHand = true;" \n " diag_log (""Second Hand Zombie Initialized: "" + str(_this));" \n "};" \n @@ -136,7 +136,7 @@ class FSM priority = 0.000000; to="End_1"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"count _this > 2"/*%FSM*/; + condition=/*%FSM*/"count _this > 1"/*%FSM*/; action=/*%FSM*/"diag_log (""Second Hand"");"/*%FSM*/; }; /*%FSM*/ diff --git a/SQF/dayz_server/compile/zombie_Wildgenerate.sqf b/SQF/dayz_server/compile/zombie_Wildgenerate.sqf index b83a68242..e5468af75 100644 --- a/SQF/dayz_server/compile/zombie_Wildgenerate.sqf +++ b/SQF/dayz_server/compile/zombie_Wildgenerate.sqf @@ -38,7 +38,7 @@ while {_counter < _amount} do { _counter = _counter + 1; //Start behavior - //_id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_wildagent.fsm"; + //_id = [_agent] execFSM "\z\AddOns\dayz_code\system\zombie_wildagent.fsm"; //_agent setVariable [ "fsmid", _id ]; //Disable all zed systems