mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-18 10:16:39 +03:00
1.0.1.7 DEV TEST
+ [CHANGED] Can now fill empty fuel barrels on standard fuel tanks. + [CHANGED] Increased range of crafting from 2m to 3m + [FIXED] Removed repair action from tow truck with VIL_asistvan_DZE + [ADDED] Tow truck VIL_asistvan_DZE can tow vehicles that fit within the bounding box of the model. + [ADDED] Ability for fuel trucks to fill nearby vehicles 30m when engine is running. + [CHANGED] Reworked Epoch events scheduler and made it more accurate. + [REMOVED] Road debris no longer spawn loot, helps with performance and we have added extra loot positions in the world. + and more
This commit is contained in:
@@ -11,11 +11,15 @@ if (isServer) then {
|
||||
//Send request
|
||||
_key = format["CHILD:304:%1:",_id];
|
||||
_key call server_hiveWrite;
|
||||
#ifdef DZE_SERVER_DEBUG_HIVE
|
||||
diag_log format["DELETE: Deleted by ID: %1",_id];
|
||||
#endif
|
||||
} else {
|
||||
//Send request
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
#ifdef DZE_SERVER_DEBUG_HIVE
|
||||
diag_log format["DELETE: Deleted by UID: %1",_uid];
|
||||
#endif
|
||||
};
|
||||
};
|
||||
@@ -1,6 +1,3 @@
|
||||
/*
|
||||
|
||||
*/
|
||||
private ["_object","_myGroup","_id","_playerID","_playerName","_characterID","_playerIDtoarray","_timeout"];
|
||||
_playerID = _this select 0;
|
||||
_playerName = _this select 1;
|
||||
@@ -18,27 +15,31 @@ if (vehicle _object != _object) then {
|
||||
if (59 in _playerIDtoarray) exitWith { };
|
||||
|
||||
if ((_timeout - time) > 0) then {
|
||||
|
||||
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
|
||||
|
||||
_object setVariable["NORRN_unconscious",true, true];
|
||||
_object setVariable["unconsciousTime",300,true];
|
||||
diag_log format["SET UNCONCIOUSNESS: %1", _playerName];
|
||||
|
||||
//_message = format["PLAYER COMBAT LOGGED: %1 (%2)",_playerName, _killerName, _weapon];
|
||||
//[nil, nil, rspawn, [_object, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
|
||||
diag_log format["SET UNCONCIOUSNESS: %1", _playerName];
|
||||
#endif
|
||||
|
||||
// Message whole server when player combat logs
|
||||
_message = format["PLAYER COMBAT LOGGED: %1",_playerName];
|
||||
[nil,nil,"per",rTITLETEXT,_message,"PLAIN DOWN"] call RE;
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log format["DISCONNECT: %1 (%2) Object: %3, _characterID: %4", _playerName,_playerID,_object,_characterID];
|
||||
#endif
|
||||
|
||||
_id = [_playerID,_characterID,2] spawn dayz_recordLogin;
|
||||
dayz_disco = dayz_disco - [_playerID];
|
||||
if (!isNull _object) then {
|
||||
//Update Vehicle
|
||||
//Update Vehicle
|
||||
{ [_x,"gear"] call server_updateObject } foreach
|
||||
(nearestObjects [getPosATL _object, dayz_updateObjects, 10]);
|
||||
if (alive _object) then {
|
||||
[_object,(magazines _object),true,true] call server_playerSync;
|
||||
//[_object,[],true,false] call server_playerSync;
|
||||
_myGroup = group _object;
|
||||
deleteVehicle _object;
|
||||
deleteGroup _myGroup;
|
||||
|
||||
@@ -3,9 +3,10 @@ private["_character","_clientID"];
|
||||
_character = _this select 0;
|
||||
_clientID = owner _character;
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("HIVE: Player Death list Request by ClientID: "+ str(_clientID));
|
||||
|
||||
diag_log(PlayerDeaths);
|
||||
#endif
|
||||
|
||||
dayzPlayerDeathsResult = PlayerDeaths;
|
||||
|
||||
|
||||
@@ -33,7 +33,10 @@ if (_killerName != "nil") then
|
||||
_loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PKILL
|
||||
diag_log _loc_message;
|
||||
#endif
|
||||
|
||||
if(DZE_DeathMsgGlobal) then {
|
||||
[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
|
||||
};
|
||||
@@ -57,13 +60,6 @@ if (_killerName != "nil") then
|
||||
dayz_disco = dayz_disco - [_playerID];
|
||||
_newObject setVariable["processedDeath",time];
|
||||
|
||||
/*
|
||||
diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
|
||||
if (isnil "_characterID") then {
|
||||
diag_log ("DW_DEBUG: _newObject: " + str(_newObject));
|
||||
};
|
||||
*/
|
||||
|
||||
if (typeName _minutes == "STRING") then
|
||||
{
|
||||
_minutes = parseNumber _minutes;
|
||||
@@ -72,7 +68,9 @@ if (typeName _minutes == "STRING") then
|
||||
if (_characterID != "0") then
|
||||
{
|
||||
_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
|
||||
//diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
#ifdef DZE_SERVER_DEBUG_HIVE
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
#endif
|
||||
_key call server_hiveWrite;
|
||||
}
|
||||
else
|
||||
@@ -80,16 +78,6 @@ else
|
||||
deleteVehicle _newObject;
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PKILL
|
||||
diag_log ("PDEATH: Player Died " + _playerID);
|
||||
/*
|
||||
_eh = [_newObject] spawn {
|
||||
_body = _this select 0;
|
||||
_method = _body getVariable["deathType","unknown"];
|
||||
_name = _body getVariable["bodyName","unknown"];
|
||||
waitUntil{!isPlayer _body;sleep 1};
|
||||
_body setVariable["deathType",_method,true];
|
||||
_body setVariable["bodyName",_name,true];
|
||||
diag_log ("PDEATH: Player Left Body " + _name);
|
||||
};
|
||||
*/
|
||||
//dead_bodyCleanup set [count dead_bodyCleanup,_newObject];
|
||||
#endif
|
||||
@@ -1,20 +1,20 @@
|
||||
private ["_isInfected","_doLoop","_hiveVer","_isHiveOk","_playerID","_playerObj","_primary","_key","_charID","_playerName","_backpack","_isNew","_inventory","_survival","_model","_mags","_wpns","_bcpk","_config","_newPlayer"];
|
||||
//Set Variables
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("STARTING LOGIN: " + str(_this));
|
||||
#endif
|
||||
|
||||
_playerID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
_playerName = name _playerObj;
|
||||
//_worldspace = [];
|
||||
|
||||
if (_playerName == '__SERVER__' || _playerID == '' || local player) exitWith {};
|
||||
|
||||
// Cancel any login until server_monitor terminates.
|
||||
// This is mandatory since all vehicles must be spawned before the first players spawn on the map.
|
||||
// Otherwise, all vehicle event handlers won't be created on players' client side.
|
||||
if (isNil "sm_done") exitWith { diag_log ("Login cancelled, server is not ready. " + str(_playerObj)); };
|
||||
|
||||
if (isNil "sm_done") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("Login cancelled, server is not ready. " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
if (count _this > 2) then {
|
||||
dayz_players = dayz_players - [_this select 2];
|
||||
@@ -23,29 +23,23 @@ if (count _this > 2) then {
|
||||
//Variables
|
||||
_inventory = [];
|
||||
_backpack = [];
|
||||
//_items = [];
|
||||
//_magazines = [];
|
||||
//_weapons = [];
|
||||
//_medicalStats = [];
|
||||
_survival = [0,0,0];
|
||||
//_tent = [];
|
||||
//_state = [];
|
||||
//_direction = 0;
|
||||
_isInfected = 0;
|
||||
_model = "";
|
||||
//_newUnit = objNull;
|
||||
//_botActive = false;
|
||||
|
||||
if (_playerID == "") then {
|
||||
_playerID = getPlayerUID _playerObj;
|
||||
};
|
||||
|
||||
if ((_playerID == "") or (isNil "_playerID")) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
|
||||
#endif
|
||||
};
|
||||
|
||||
//??? endLoadingScreen;
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
|
||||
#endif
|
||||
|
||||
//Do Connection Attempt
|
||||
_doLoop = 0;
|
||||
@@ -61,20 +55,25 @@ while {_doLoop < 5} do {
|
||||
};
|
||||
|
||||
if (isNull _playerObj or !isPlayer _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("LOGIN RESULT: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
if ((_primary select 0) == "ERROR") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log format ["LOGIN RESULT: Exiting, failed to load _primary: %1 for player: %2 ",_primary,_playerID];
|
||||
#endif
|
||||
};
|
||||
|
||||
//Process request
|
||||
_newPlayer = _primary select 1;
|
||||
_isNew = count _primary < 7; //_result select 1;
|
||||
_charID = _primary select 2;
|
||||
//_randomSpot = false;
|
||||
|
||||
//diag_log ("LOGIN RESULT: " + str(_primary));
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("LOGIN RESULT: " + str(_primary));
|
||||
#endif
|
||||
|
||||
/* PROCESS */
|
||||
_hiveVer = 0;
|
||||
@@ -127,18 +126,17 @@ if (!_isNew) then {
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
};
|
||||
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
|
||||
_isHiveOk = false; //EDITED
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
#endif
|
||||
|
||||
_isHiveOk = false;
|
||||
if (_hiveVer >= dayz_hiveVersionNo) then {
|
||||
_isHiveOk = true;
|
||||
};
|
||||
//diag_log ("SERVER RESULT: " + str("X") + " " + str(dayz_hiveVersionNo));
|
||||
|
||||
//Server publishes variable to clients and WAITS
|
||||
//_playerObj setVariable ["publish",[_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer],true];
|
||||
|
||||
dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected];
|
||||
if(!isNull _playerObj) then {
|
||||
(owner _playerObj) publicVariableClient "dayzPlayerLogin";
|
||||
};
|
||||
};
|
||||
@@ -1,17 +1,23 @@
|
||||
private ["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state","_doLoop","_key","_primary","_medical","_stats","_humanity","_lastinstance","_friendlies","_randomSpot","_position","_debug","_distance","_hit","_fractures","_score","_findSpot","_pos","_isIsland","_w","_clientID","_spawnMC"];
|
||||
//Wait for HIVE to be free
|
||||
//diag_log ("SETUP: attempted with " + str(_this));
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP: attempted with " + str(_this));
|
||||
#endif
|
||||
|
||||
_characterID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
_playerID = getPlayerUID _playerObj;
|
||||
|
||||
if (isNull _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
//Add MPHit event handler
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log("Adding MPHit EH for " + str(_playerObj));
|
||||
#endif
|
||||
_playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}];
|
||||
|
||||
if (_playerID == "") then {
|
||||
@@ -19,13 +25,17 @@ if (_playerID == "") then {
|
||||
};
|
||||
|
||||
if (_playerID == "") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP INIT FAILED: Exiting, no player ID: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
private["_dummy"];
|
||||
_dummy = getPlayerUID _playerObj;
|
||||
if ( _playerID != _dummy ) then {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
|
||||
#endif
|
||||
_playerID = _dummy;
|
||||
};
|
||||
|
||||
@@ -48,11 +58,15 @@ while {_doLoop < 5} do {
|
||||
};
|
||||
|
||||
if (isNull _playerObj or !isPlayer _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP RESULT: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
//Wait for HIVE to be free
|
||||
//diag_log ("SETUP: RESULT: Successful with " + str(_primary));
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP: RESULT: Successful with " + str(_primary));
|
||||
#endif
|
||||
|
||||
_medical = _primary select 1;
|
||||
_stats = _primary select 2;
|
||||
@@ -62,14 +76,11 @@ _humanity = _primary select 5;
|
||||
_lastinstance = _primary select 6;
|
||||
|
||||
_namespace = profileNamespace;
|
||||
|
||||
_friendlies = _namespace getVariable ["friendlies", []];;
|
||||
|
||||
//Set position
|
||||
_randomSpot = false;
|
||||
|
||||
//diag_log ("WORLDSPACE: " + str(_worldspace));
|
||||
|
||||
if (count _worldspace > 0) then {
|
||||
|
||||
_position = _worldspace select 1;
|
||||
@@ -98,7 +109,9 @@ if (count _worldspace > 0) then {
|
||||
_randomSpot = true;
|
||||
};
|
||||
|
||||
//diag_log ("LOGIN: Location: " + str(_worldspace) + " doRnd?: " + str(_randomSpot));
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("LOGIN: Location: " + str(_worldspace) + " doRnd?: " + str(_randomSpot));
|
||||
#endif
|
||||
|
||||
//set medical values
|
||||
if (count _medical > 0) then {
|
||||
@@ -110,16 +123,8 @@ if (count _medical > 0) then {
|
||||
_playerObj setVariable["USEC_isCardiac",(_medical select 5),true];
|
||||
_playerObj setVariable["USEC_lowBlood",(_medical select 6),true];
|
||||
_playerObj setVariable["USEC_BloodQty",(_medical select 7),true];
|
||||
|
||||
_playerObj setVariable["unconsciousTime",(_medical select 10),true];
|
||||
|
||||
// if (_playerID in dayz_disco) then {
|
||||
// _playerObj setVariable["NORRN_unconscious",true, true];
|
||||
// _playerObj setVariable["unconsciousTime",300,true];
|
||||
// } else {
|
||||
// _playerObj setVariable["unconsciousTime",(_medical select 10),true];
|
||||
// };
|
||||
|
||||
_playerObj setVariable["unconsciousTime",(_medical select 10),true];
|
||||
|
||||
//Add Wounds
|
||||
{
|
||||
_playerObj setVariable[_x,true,true];
|
||||
@@ -192,7 +197,6 @@ if (_randomSpot) then {
|
||||
endLoadingScreen;
|
||||
};
|
||||
|
||||
|
||||
//Spawn modify via mission init.sqf
|
||||
if(isnil "spawnArea") then {
|
||||
spawnArea = 1500;
|
||||
@@ -240,7 +244,6 @@ if (_randomSpot) then {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//Record player for management
|
||||
dayz_players set [count dayz_players,_playerObj];
|
||||
|
||||
@@ -263,9 +266,9 @@ if(!isNull _playerObj) then {
|
||||
_playerObj setVariable ["lastTime",time];
|
||||
//_playerObj setVariable ["model_CHK",typeOf _playerObj];
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("LOGIN PUBLISHING: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
#endif
|
||||
|
||||
dayzLogin = null;
|
||||
dayzLogin2 = null;
|
||||
|
||||
//Save Login
|
||||
dayzLogin2 = null;
|
||||
@@ -1,21 +1,4 @@
|
||||
private ["_character","_magazines","_force","_characterID","_charPos","_isInVehicle","_timeSince","_humanity","_debug","_distance","_isNewMed","_isNewPos","_isNewGear","_playerPos","_playerGear","_playerBackp","_medical","_distanceFoot","_lastPos","_backpack","_kills","_killsB","_killsH","_headShots","_lastTime","_timeGross","_timeLeft","_currentWpn","_currentAnim","_config","_onLadder","_isTerminal","_currentModel","_modelChk","_muzzles","_temp","_currentState","_array","_key","_pos","_forceGear"];
|
||||
//[player,array]
|
||||
//diag_log ("UPDATE: " + str(_this) );
|
||||
|
||||
//waituntil {(typeName(_this) == "ARRAY");sleep 0.01;}; //seems to cause often infinite waits (but not for first n players)
|
||||
|
||||
//this only happens when we don't follow the correct parameter format...
|
||||
//(like supplying just the player object instead of the array in player_eat.sqf)
|
||||
//i've fixed this in player_eat so i can comment this part out
|
||||
/*if ( typeName(_this) == "OBJECT" ) then {
|
||||
_this = [_this,[],true];
|
||||
//diag_log ("DW_DEBUG: #manual fix _this: " + str(_this));
|
||||
};*/
|
||||
|
||||
//correct
|
||||
//"UPDATE: [B 1-1-B:1 (THE BEAST) REMOTE,[],true]"
|
||||
//error
|
||||
//"UPDATE: B 1-1-B:1 (THE BEAST) REMOTE"
|
||||
|
||||
_character = _this select 0;
|
||||
_magazines = _this select 1;
|
||||
@@ -29,30 +12,35 @@ _isInVehicle = vehicle _character != _character;
|
||||
_timeSince = 0;
|
||||
_humanity = 0;
|
||||
|
||||
//diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
|
||||
/*
|
||||
if !(isnil "_characterID") then {
|
||||
diag_log ("DW_DEBUG: _characterID: " + str(_characterID));
|
||||
};
|
||||
*/
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
|
||||
#endif
|
||||
|
||||
if (_character isKindOf "Animal") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " is an Animal class");
|
||||
#endif
|
||||
};
|
||||
|
||||
if (isnil "_characterID") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " has nil characterID");
|
||||
#endif
|
||||
};
|
||||
|
||||
if (_characterID == "0") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " as no characterID");
|
||||
#endif
|
||||
};
|
||||
|
||||
private["_debug","_distance"];
|
||||
_debug = getMarkerpos "respawn_west";
|
||||
_distance = _debug distance _charPos;
|
||||
if (_distance < 2000) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log format["ERROR: server_playerSync: Cannot Sync Player %1 [%2]. Position in debug! %3",name _character,_characterID,_charPos];
|
||||
#endif
|
||||
};
|
||||
|
||||
//Check for server initiated updates
|
||||
@@ -60,8 +48,6 @@ _isNewMed = _character getVariable["medForceUpdate",false]; //Med Update is fo
|
||||
_isNewPos = _character getVariable["posForceUpdate",false]; //Med Update is forced when a player receives some kind of med incident
|
||||
_isNewGear = (count _magazines) > 0;
|
||||
|
||||
//diag_log ("Starting Save... MED: " + str(_isNewMed) + " / POS: " + str(_isNewPos)); sleep 0.05;
|
||||
|
||||
//Check for player initiated updates
|
||||
if (_characterID != "0") then {
|
||||
_playerPos = [];
|
||||
|
||||
@@ -10,15 +10,24 @@ diag_log("EPOCH EVENTS INIT");
|
||||
EventSchedulerLastTime = "";
|
||||
|
||||
epoch_eventIsAny = {
|
||||
private ["_boolReturn","_event","_real"];
|
||||
private ["_boolReturn","_event","_date"];
|
||||
_event = _this select 0;
|
||||
_real = _this select 1;
|
||||
_date = _this select 1;
|
||||
|
||||
_boolReturn = false;
|
||||
if (typeName _event == "STRING") then {
|
||||
_boolReturn = (_event == "any");
|
||||
} else {
|
||||
_boolReturn = (_real == _event);
|
||||
};
|
||||
|
||||
_index = 0;
|
||||
{
|
||||
_bool = false;
|
||||
if (typeName _x == "STRING") then {
|
||||
_boolReturn = true;
|
||||
} else {
|
||||
_boolReturn = ((_date select _index) == _x);
|
||||
};
|
||||
if (!_boolReturn) exitWith {};
|
||||
_index = _index + 1;
|
||||
} forEach _event;
|
||||
|
||||
_boolReturn
|
||||
};
|
||||
|
||||
@@ -36,41 +45,28 @@ while {true} do {
|
||||
_datestr = str(_date);
|
||||
if (EventSchedulerLastTime != _datestr) then {
|
||||
|
||||
// This is only ran every minute.
|
||||
// Once a minute.
|
||||
EventSchedulerLastTime = _datestr;
|
||||
|
||||
// diag_log ("EVENTS: Local Time is: " + str(_date));
|
||||
diag_log ("EVENTS: Local Time is: " + _datestr);
|
||||
{
|
||||
if([(_x select 0),(date select 0)] call epoch_eventIsAny) then {
|
||||
if([(_x select 1),(date select 1)] call epoch_eventIsAny) then {
|
||||
if([(_x select 2),(date select 2)] call epoch_eventIsAny) then {
|
||||
if([(_x select 3),(date select 3)] call epoch_eventIsAny) then {
|
||||
if([(_x select 4),(date select 4)] call epoch_eventIsAny) then {
|
||||
// EXECUTE SCRIPT
|
||||
diag_log ("RUNNING EVENT: " + (_x select 5) + " on " + EventSchedulerLastTime);
|
||||
_handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if([[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4)],_date] call epoch_eventIsAny) then {
|
||||
diag_log ("RUNNING EVENT: " + (_x select 5) + " on " + _datestr);
|
||||
_handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf";
|
||||
};
|
||||
} forEach EpochEvents;
|
||||
|
||||
_time = diag_tickTime;
|
||||
|
||||
// perform cleanup here
|
||||
if ((_time - zero_cleanDead) > 600) then
|
||||
{
|
||||
if ((_time - zero_cleanDead) > 600) then {
|
||||
call server_cleanDead;
|
||||
zero_cleanDead = _time;
|
||||
};
|
||||
|
||||
if ((_time - zero_cleanLoot) > 1800) then
|
||||
{
|
||||
if ((_time - zero_cleanLoot) > 1800) then {
|
||||
call server_cleanLoot;
|
||||
zero_cleanLoot = _time;
|
||||
};
|
||||
};
|
||||
};
|
||||
sleep 5;
|
||||
sleep 10;
|
||||
};
|
||||
@@ -1,5 +1,8 @@
|
||||
private["_unit"];
|
||||
_unit = _this select 0;
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("CLEANUP: DELETE UNCONTROLLED ZOMBIE: " + (typeOf _unit) + " OF: " + str(_unit) );
|
||||
#endif
|
||||
|
||||
deleteVehicle _unit;
|
||||
Reference in New Issue
Block a user