mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-08 09:12:52 +03:00
Remove some unused legacy code
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
//diag_log ("Bubble Start");
|
||||
|
||||
//Create bubble around the default view distance.
|
||||
//_position = getPosATL player;
|
||||
|
||||
/*
|
||||
//All zeds fall under "Zed_Base", 1600 is default viewdistance
|
||||
_zedsMonitored = (getPosATL player) nearEntities ["Zed_Base",1600];
|
||||
|
||||
{
|
||||
if (!(_x in dayz_zedMonitor)) then {
|
||||
//add active zed to var
|
||||
dayz_zedMonitor set [count dayz_zedMonitor, _x];
|
||||
};
|
||||
} foreach _zedsMonitored;
|
||||
|
||||
|
||||
diag_log format["Agent's in Bubble: %1",(count dayz_zedMonitor)];
|
||||
//Enable check for all active zeds
|
||||
{
|
||||
//Swap zed back to server
|
||||
isAlive = alive _x;
|
||||
if (isAlive) then {
|
||||
_isWild = _x isKindOf "WildZombie_Base";
|
||||
if (_isWild) then {
|
||||
_isLocal = local _x;
|
||||
if (_isLocal) then {
|
||||
if ((player distance _x) > 200) then {
|
||||
//_agent = _x getVariable ["agentObject", _x];
|
||||
//_position = _x getVariable ["homePos",(getPosATL _x)];
|
||||
_Owner = _x getVariable ["Owner",1]; //default 1 is server
|
||||
PVDZ_Server_changeOwner = [_x, _Owner];
|
||||
publicVariableServer "PVDZ_Server_changeOwner";
|
||||
};
|
||||
} else {
|
||||
if ((player distance _x) <= 200) then {
|
||||
//["Target","Owner","Agent"]
|
||||
//Swap ownership to player
|
||||
if (!_isLocal) then {
|
||||
PVDZ_Server_changeOwner = [_x, player];
|
||||
publicVariableServer "PVDZ_Server_changeOwner";
|
||||
|
||||
waitUntil { local _x };
|
||||
_agent = _x getVariable ["agentObject", _x];
|
||||
_position = _x getVariable ["homePos",(getPosATL _x)];
|
||||
[_position,_agent] execFSM "\z\addons\dayz_code\system\zombie_wildagent.fsm";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//is zed aboue default view distance
|
||||
if ((player distance _x) <= 1600) then {
|
||||
//Animate zeds
|
||||
_x enableSimulation true;
|
||||
PVDZ_Server_Simulation = [_x, true];
|
||||
publicVariableServer "PVDZ_Server_Simulation";
|
||||
} else {
|
||||
//Remove zed from monitor
|
||||
if (_x in dayz_zedMonitor) then {
|
||||
dayz_zedMonitor = dayz_zedMonitor - [_x];
|
||||
};
|
||||
//Disable simulation
|
||||
_x enableSimulation false;
|
||||
PVDZ_Server_Simulation = [_x, false];
|
||||
publicVariableServer "PVDZ_Server_Simulation";
|
||||
};
|
||||
} else {
|
||||
dayz_zedMonitor = dayz_zedMonitor - [_x];
|
||||
};
|
||||
} foreach dayz_zedMonitor;
|
||||
*/
|
||||
|
||||
//BuildingMonitor
|
||||
// moved to dayz_code/system/scheduler/sched_buildingBubble.sqf
|
||||
|
||||
//diag_log ("Bubble END");
|
||||
@@ -56,7 +56,6 @@ if (!isDedicated) then {
|
||||
player_countMagazines = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_countMagazines.sqf";
|
||||
player_forceSave = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_forceSave.sqf";
|
||||
//player_destroyTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_destroyTent.sqf";
|
||||
player_Bubble = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_Bubble.sqf";
|
||||
vehicle_getOut = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getOut.sqf";
|
||||
//Objects
|
||||
object_setpitchbank = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_setpitchbank.sqf";
|
||||
|
||||
@@ -199,47 +199,6 @@ if (isServer) then {
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
"PVDZ_receiveVar" addPublicVariableEventHandler {
|
||||
_owner = (_this select 1) select 0;
|
||||
_object = (_this select 1) select 1;
|
||||
_name = (_this select 1) select 2;
|
||||
_value = (_this select 1) select 3;
|
||||
|
||||
switch (_name) do {
|
||||
case "looted": {
|
||||
diag_log format ["%4 - %1, %2, %3", _object, _name, _value, "receive looted"];
|
||||
};
|
||||
case "zombieSpawn": {
|
||||
//diag_log format ["%4 - %1, %2, %3", _object, _name, _value, "receive zombieSpawn"];
|
||||
};
|
||||
};
|
||||
|
||||
_ownerID = owner _owner;
|
||||
_return = _object getVariable [_name,_value];
|
||||
|
||||
//diag_log format ["%1", _return];
|
||||
|
||||
PVCDZ_SetVar = [_object,_name,_return];
|
||||
_ownerID publicVariableClient "PVCDZ_SetVar";
|
||||
};
|
||||
|
||||
"PVDZ_Server_changeOwner" addPublicVariableEventHandler {
|
||||
_agent = (_this select 1) select 0;
|
||||
_reciever = (_this select 1) select 1;
|
||||
_ownerID = owner _agent;
|
||||
_newownerID = 1; //1 = server
|
||||
|
||||
if (typeName _reciever == "OBJECT") then {
|
||||
_newownerID = owner _reciever;
|
||||
};
|
||||
if (isNil ("Owner")) then {
|
||||
_agent setVariable ["Owner",_ownerID];
|
||||
};
|
||||
|
||||
_agent setOwner _newownerID;
|
||||
diag_log ("TRANSFER OWNERSHIP: " + (typeOf _agent) + " OF _unit: " + str(_agent) + " TO _client: " + str(_reciever) );
|
||||
};
|
||||
|
||||
"PVDZ_Server_LogIt" addPublicVariableEventHandler {
|
||||
_unitSending = _this select 0;
|
||||
@@ -325,14 +284,6 @@ if (!isDedicated) then {
|
||||
_entity setVariable ["hit_legs", 2, true];
|
||||
};
|
||||
};
|
||||
|
||||
"PVCDZ_SetVar" addPublicVariableEventHandler {
|
||||
_object = (_this select 1) select 0;
|
||||
_name = (_this select 1) select 1;
|
||||
_value = (_this select 1) select 2;
|
||||
|
||||
_object setVariable [_name,_value];
|
||||
};
|
||||
|
||||
"PVDZ_receiveUnconscious" addPublicVariableEventHandler {
|
||||
_unit = (_this select 1) select 0;
|
||||
|
||||
Reference in New Issue
Block a user