Update dayz_server

Vanilla commits:

95bf775fd2

6e638aeb8c
This commit is contained in:
ebaydayz
2016-11-18 15:28:00 -05:00
parent 5072ea4e8b
commit bec4ccce38
8 changed files with 247 additions and 418 deletions

View File

@@ -43,7 +43,7 @@ if (_playerUID in dayz_ghostPlayers) exitwith {
};
//Make sure we know the ID of the object before we try and sync any info to the DB
if (_characterID != "?") exitwith {
if (_characterID != "?") then {
//If the player has sepsis before logging off lets give them infected status.
if (_Sepsis) then {
_playerObj setVariable["USEC_infected",true,true];
@@ -81,16 +81,11 @@ if (_characterID != "?") exitwith {
{[_x,"gear"] call server_updateObject} count (nearestObjects [_playerPos,DayZ_GearedObjects,10]);
};
[_playerUID,_characterID,2,_playerName] call dayz_recordLogin;
[_playerUID,_characterID,3,_playerName,((getPosATL _playerObj) call fa_coor2str)] call dayz_recordLogin;
};
if (isNull _playerObj) then {
diag_log "Player Object does not exist";
} else {
//Lets remove the object.
if (alive _playerObj) then {
_myGroup = group _playerObj;
deleteVehicle _playerObj;
deleteGroup _myGroup;
};
if (alive _playerObj) then {
_myGroup = group _playerObj;
deleteVehicle _playerObj;
deleteGroup _myGroup;
};

View File

@@ -154,7 +154,7 @@ if (count dayz_activeInvites > 0) then {
};
//Record Player Login/LogOut
[_playerID,_charID,1,_playerName] call dayz_recordLogin;
[_playerID,_charID,2,(_playerObj call fa_plr2str),((getPosATL _playerObj) call fa_coor2str)] call dayz_recordLogin;
PVCDZ_plr_PlayerAccepted = [_playerName,diag_ticktime];
(owner _playerObj) publicVariableClient "PVCDZ_plr_PlayerAccepted";

View File

@@ -238,7 +238,8 @@ if ((count _inventory) > 1) then {
};
//diag_log format["LOGIN PUBLISHING: UID#%1 CID#%2 %3 as %4 should spawn at %5",getPlayerUID _playerObj,_characterID,_playerObj call fa_plr2str,typeOf _playerObj,(_worldspace select 1) call fa_coor2str];
//Record Player Login/LogOut
[_playerID,_characterID,1,(_playerObj call fa_plr2str),((_worldspace select 1) call fa_coor2str)] call dayz_recordLogin;
PVDZ_plr_Login1 = null;
PVDZ_plr_Login2 = null;

View File

@@ -227,8 +227,9 @@ _key = if (Z_SingleCurrency) then {
} else {
format["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,_kills,_headShots,_distanceFoot,_timeSince,_currentState,_killsH,_killsB,_currentModel,_humanity]
};
//diag_log ("HIVE: WRITE: "+ str(_key) + " / " + _characterID);
//diag_log format["HIVE: SYNC: [%1,%2,%3,%4]",_characterID,_playerPos,_playerGear,_playerBackp];
//diag_log str formatText["INFO - %2(UID:%3) PlayerSync, %1",_key,_name,_playerUID];
_key call server_hiveWrite;
if (Z_SingleCurrency) then { //update global coins

View File

@@ -26,7 +26,7 @@ zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\comp
server_Wildgenerate = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_Wildgenerate.sqf";
server_plantSpawner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_plantSpawner.sqf";
base_fireMonitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\fire_monitor.sqf";
server_systemCleanup = compile preprocessFileLineNumbers "\z\addons\dayz_server\system\server_cleanup.sqf";
//server_systemCleanup = compile preprocessFileLineNumbers "\z\addons\dayz_server\system\server_cleanup.sqf";
spawnComposition = compile preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"; //"\z\addons\dayz_code\compile\object_mapper.sqf";
server_sendToClient = compile preprocessFileLineNumbers "\z\addons\dayz_server\eventHandlers\server_sendToClient.sqf";
@@ -188,8 +188,9 @@ dayz_recordLogin = {
_status = switch (1==1) do {
case ((_this select 2) == 0): { "CLIENT LOADED & PLAYING" };
case ((_this select 2) == 1): { "LOGGED IN" };
case ((_this select 2) == 2): { "LOGGED OUT" };
case ((_this select 2) == 1): { "LOGIN PUBLISHING, Location " +(_this select 4) };
case ((_this select 2) == 2): { "LOGGING IN" };
case ((_this select 2) == 3): { "LOGGED OUT, Location " +(_this select 4) };
};
_name = if (typeName (_this select 3) == "ARRAY") then { toString (_this select 3) } else { _this select 3 };

View File

@@ -1,399 +0,0 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Server Cleanup">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-75.000000,-425.000000,25.000000,-375.000000,0.000000,"init"};
item1[] = {"true",8,218,-75.000000,-200.000000,25.000000,-150.000000,0.000000,"true"};
item2[] = {"waiting",2,250,-75.000000,-125.000000,25.000000,-75.000000,0.000000,"waiting"};
item3[] = {"too_many_dead",4,218,-125.000000,0.000000,-25.000000,50.000000,2.000000,"too many" \n "dead"};
item4[] = {"cleanup_dead",2,250,-125.000000,75.000000,-25.000000,125.000000,0.000000,"cleanup" \n "dead"};
item5[] = {"too_many_objects",4,218,175.000000,0.000000,275.000000,50.000000,2.000000,"too many" \n "objects"};
item6[] = {"cleanup_objects",2,4346,175.000000,75.000000,275.000000,125.000000,0.000000,"cleanup" \n "objects"};
item7[] = {"time_sync",4,218,-225.000000,0.000000,-125.000000,50.000000,1.000000,"time" \n "sync"};
item8[] = {"sync_the_time",2,250,-225.000000,175.000000,-125.000000,225.000000,0.000000,"sync" \n "the time"};
item9[] = {"true",8,218,-75.000000,250.000000,25.000000,300.000000,0.000000,"true"};
item10[] = {"general_cleanup",2,250,-75.000000,350.000000,25.000000,400.000000,0.000000,"general" \n "cleanup"};
item11[] = {"",7,210,-254.000015,371.000000,-246.000000,379.000031,0.000000,""};
item12[] = {"",7,210,-254.000015,-179.000000,-246.000000,-171.000000,0.000000,""};
item13[] = {"initialized",4,218,-75.000000,-350.000000,25.000000,-300.000000,0.000000,"initialized"};
item14[] = {"prepare",2,250,-75.000000,-275.000000,25.000000,-225.000000,0.000000,"prepare"};
item15[] = {"update_objects",2,250,-25.000000,75.000000,75.000000,125.000000,0.000000,"update objects"};
item16[] = {"Objects_need_upd",4,218,-25.000000,0.000000,75.000000,50.000000,1.000000,"Objects" \n "need update"};
item17[] = {"",7,210,-29.000000,-41.500000,-21.000000,-33.499996,0.000000,""};
item18[] = {"",7,210,20.999998,-41.500000,29.000000,-33.500000,0.000000,""};
item19[] = {"",7,210,121.000000,-41.500000,129.000000,-33.500000,0.000000,""};
item20[] = {"",7,210,-79.000000,-41.500000,-71.000000,-33.500000,0.000000,""};
item21[] = {"",7,210,-179.000000,-41.499996,-171.000000,-33.500000,0.000000,""};
item22[] = {"",7,210,-79.000000,146.000000,-71.000000,154.000000,0.000000,""};
item23[] = {"",7,210,21.000000,146.000000,28.999998,154.000000,0.000000,""};
item24[] = {"",7,210,-29.000000,146.000000,-20.999998,154.000000,0.000000,""};
item25[] = {"",7,210,308.500000,-104.000000,316.500000,-96.000000,0.000000,""};
item26[] = {"",7,210,308.500031,271.000000,316.499969,279.000000,0.000000,""};
item27[] = {"",7,210,-179.000000,271.000000,-171.000000,279.000000,0.000000,""};
item28[] = {"",7,210,221.000000,-41.500000,229.000000,-33.500000,0.000000,""};
item29[] = {"New_Cleanup_Obje",2,250,375.000000,75.000000,475.000000,125.000000,0.000000,"New Cleanup" \n "Objects"};
item30[] = {"",7,210,221.000031,271.000000,228.999969,279.000000,0.000000,""};
link0[] = {0,13};
link1[] = {1,2};
link2[] = {2,17};
link3[] = {2,25};
link4[] = {3,4};
link5[] = {4,22};
link6[] = {5,6};
link7[] = {6,30};
link8[] = {7,8};
link9[] = {8,27};
link10[] = {9,10};
link11[] = {10,11};
link12[] = {11,12};
link13[] = {12,1};
link14[] = {13,14};
link15[] = {14,1};
link16[] = {15,23};
link17[] = {16,15};
link18[] = {17,18};
link19[] = {17,20};
link20[] = {18,16};
link21[] = {18,19};
link22[] = {19,28};
link23[] = {20,3};
link24[] = {20,21};
link25[] = {21,7};
link26[] = {22,24};
link27[] = {23,24};
link28[] = {24,9};
link29[] = {25,26};
link30[] = {26,30};
link31[] = {27,9};
link32[] = {28,5};
link33[] = {30,9};
globals[] = {25.000000,1,0,0,0,640,480,1,13,6316128,1,-520.235962,640.978394,444.212921,-448.684845,779,599,1};
window[] = {2,-1,-1,-32000,-32000,878,150,1479,150,3,797};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "DayZ Server Cleanup";
class States
{
/*%FSM<STATE "init">*/
class init
{
name = "init";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "initialized">*/
class initialized
{
priority = 0.000000;
to="prepare";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!isnil ""bis_fnc_init"""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "waiting">*/
class waiting
{
name = "waiting";
init = /*%FSM<STATEINIT""">*/"//diag_log ""CLEANUP: Waiting for next task"";" \n
"" \n
"_numDead = {local _x} count allDead;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "too_many_dead">*/
class too_many_dead
{
priority = 2.000000;
to="cleanup_dead";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(_numDead > 100)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "too_many_objects">*/
class too_many_objects
{
priority = 2.000000;
to="cleanup_objects";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _timeNem) > 150)" \n
"//(((count dayz_deseedloot) > 0) && (!isNil ""sm_done""))"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_timeNem = diag_tickTime;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "time_sync">*/
class time_sync
{
priority = 1.000000;
to="sync_the_time";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _lastUpdate) > 300)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastUpdate = diag_tickTime;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Objects_need_upd">*/
class Objects_need_upd
{
priority = 1.000000;
to="update_objects";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(( (count needUpdate_objects) > 0) && (diag_tickTime -_lastNeedUpdate> 5) && (!isNil ""sm_done""))"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastNeedUpdate = diag_tickTime;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="general_cleanup";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "cleanup_dead">*/
class cleanup_dead
{
name = "cleanup_dead";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="general_cleanup";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "cleanup_objects">*/
class cleanup_objects
{
name = "cleanup_objects";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="general_cleanup";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "sync_the_time">*/
class sync_the_time
{
name = "sync_the_time";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="general_cleanup";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "general_cleanup">*/
class general_cleanup
{
name = "general_cleanup";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="waiting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "prepare">*/
class prepare
{
name = "prepare";
init = /*%FSM<STATEINIT""">*/"diag_log (""CLEANUP: INITIALIZING CLEANUP SCRIPT"");" \n
"" \n
"_safety = dayz_serverObjectMonitor;" \n
"_dateNow = (DateToNumber date);" \n
"" \n
"_lastUpdate = diag_tickTime;" \n
"_timeNem =diag_tickTime;" \n
"_deadBodies = [];" \n
"_lastNeedUpdate = diag_tickTime;" \n
"_timeout = diag_tickTime;" \n
"_maxBodies = 15;" \n
"" \n
"_lootspawnerfdbykr = diag_tickTime; " \n
"_reseedloot = false;" \n
"" \n
"_amount = 0;" \n
"_hour = 0;" \n
"_minute = 0;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="waiting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "update_objects">*/
class update_objects
{
name = "update_objects";
init = /*%FSM<STATEINIT""">*/"diag_log format[""DEBUG: needUpdate_objects=%1"",needUpdate_objects];" \n
"" \n
"{" \n
"// _x setVariable [""needUpdate"",false,true];" \n
" needUpdate_objects = needUpdate_objects - [_x];" \n
" [_x,""damage"",true] call server_updateObject;" \n
"} forEach needUpdate_objects;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="general_cleanup";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "New_Cleanup_Obje">*/
class New_Cleanup_Obje
{
name = "New_Cleanup_Obje";
init = /*%FSM<STATEINIT""">*/"diag_log ""DEBUG: New_Cleanup_Obje ""; " \n
"_lootingrids = [];" \n
"" \n
"{" \n
" _loc = _x select 0;" \n
" _ref = _x select 1;" \n
"" \n
" _nearBy = nearestObjects [_loc, [""ReammoBox""], 1500];" \n
" {" \n
" _lootingrids set [count _lootingrids,[_x,_ref]];" \n
" } foreach _nearBy;" \n
"" \n
" dayz_deseedloot set [0,-1];" \n
" dayz_deseedloot = dayz_deseedloot - [-1];" \n
"" \n
"}foreach dayz_deseedloot;" \n
"" \n
"_qty = count _lootingrids;" \n
"diag_log (""CLEANUP:TOTAL "" + str(_qty) + "" LOOT BAGS"");" \n
"" \n
"_delQty = 0;" \n
"_delQtyDroped = 0;" \n
"_delQtySpawned = 0;" \n
"_delQtyPerma = 0;" \n
"" \n
"{" \n
" " \n
" _obj = _x select 0;" \n
" _ref = _x select 1;" \n
"" \n
" diag_log format [""%1,%2"", _obj, _ref];" \n
"" \n
" _Dropped = (_obj getVariable [""Dropped"",false]);" \n
" _Spawned = (_obj getVariable [""spawnedLoot"",false]);" \n
" _Perma = (_obj getVariable [""permaLoot"",false]);" \n
"" \n
" if (!_Spawned and !_Perma) then {" \n
" _obj setVariable [""Dropped"",true];" \n
" };" \n
"" \n
" //Dropped loot" \n
" if (_Dropped) then {" \n
" " \n
" [""Dropped_Loot"",_obj,_ref] call server_systemCleanup;" \n
" _delQtyDroped = _delQtyDroped + 1;" \n
"" \n
" };" \n
"" \n
" //Spawned Loot" \n
" if (_Spawned) then {" \n
"" \n
" [""Spawned_Loot"",_obj,_ref] call server_systemCleanup;" \n
" _delQtySpawned = _delQtySpawned + 1; " \n
" " \n
" };" \n
"" \n
" //Permaloot" \n
" if (_Perma) then {" \n
"" \n
" _delQtyPerma = _delQtyPerma + 1;" \n
"" \n
" };" \n
"" \n
"} foreach _lootingrids;" \n
"" \n
"if ((_delQtySpawned > 0) or (_delQtyDroped > 0) or (_delQtyPerma > 0)) then {" \n
" //diag_log (""CLEANUP: DELETED "" + str(_delQty) + "" LOOT BAGS"");" \n
" diag_log format [""CLEANUP: (DELETED, DroppedLoot: %1, SpawnedLoot: %2), (KEPT, PermaLoot: %3)"", _delQtyDroped, _delQtySpawned, _delQtyPerma];" \n
"};" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
};
initState="init";
finalStates[] =
{
};
};
/*%FSM</COMPILE>*/

View File

@@ -332,7 +332,7 @@ diag_log format["HIVE: BENCHMARK - Server_monitor.sqf finished streaming %1 obje
// # END OF STREAMING #
call server_plantSpawner; // Draw the pseudo random seeds
[] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm"; // launch the legacy task scheduler
[] execFSM "\z\addons\dayz_server\system\server_vehicleSync.fsm";
[] execVM "\z\addons\dayz_server\system\scheduler\sched_init.sqf"; // launch the new task scheduler
createCenter civilian;

View File

@@ -0,0 +1,230 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Server Vehicle Sync">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-75.000000,-425.000000,25.000000,-375.000000,0.000000,"init"};
item1[] = {"true",8,218,-75.000000,-200.000000,25.000000,-150.000000,0.000000,"true"};
item2[] = {"waiting",2,250,-75.000000,-125.000000,25.000000,-75.000000,0.000000,"waiting"};
item3[] = {"true",8,218,-75.000000,250.000000,25.000000,300.000000,0.000000,"true"};
item4[] = {"",7,210,-129.000015,271.000000,-120.999977,279.000031,0.000000,""};
item5[] = {"",7,210,-129.000000,-104.000000,-120.999992,-96.000000,0.000000,""};
item6[] = {"initialized",4,218,-75.000000,-350.000000,25.000000,-300.000000,0.000000,"initialized"};
item7[] = {"prepare",2,250,-75.000000,-275.000000,25.000000,-225.000000,0.000000,"prepare"};
item8[] = {"update_objects",2,4346,-75.000000,75.000000,25.000000,125.000000,0.000000,"update objects"};
item9[] = {"Objects_need_upd",4,218,-75.000000,0.000000,25.000000,50.000000,1.000000,"Objects" \n "need update"};
item10[] = {"",7,210,58.500000,-104.000000,66.500000,-96.000000,0.000000,""};
item11[] = {"",7,210,58.500031,271.000000,66.499969,279.000000,0.000000,""};
item12[] = {"New_Cleanup_Obje",2,250,375.000000,75.000000,475.000000,125.000000,0.000000,"New Cleanup" \n "Objects"};
link0[] = {0,6};
link1[] = {1,2};
link2[] = {2,9};
link3[] = {2,10};
link4[] = {3,4};
link5[] = {4,5};
link6[] = {5,2};
link7[] = {6,7};
link8[] = {7,1};
link9[] = {8,3};
link10[] = {9,8};
link11[] = {10,11};
link12[] = {11,3};
globals[] = {25.000000,1,0,0,0,640,480,1,13,6316128,1,-520.235962,640.978394,444.212921,-448.684845,779,598,1};
window[] = {2,-1,-1,-1,-1,858,130,1459,130,3,797};
*//*%FSM</HEAD>*/
class FSM
{
fsmName = "DayZ Server Vehicle Sync";
class States
{
/*%FSM<STATE "init">*/
class init
{
name = "init";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "initialized">*/
class initialized
{
priority = 0.000000;
to="prepare";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!isnil ""bis_fnc_init"""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "waiting">*/
class waiting
{
name = "waiting";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Objects_need_upd">*/
class Objects_need_upd
{
priority = 1.000000;
to="update_objects";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(( (count needUpdate_objects) > 0) && (diag_tickTime -_lastNeedUpdate> 5) && (!isNil ""sm_done""))"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastNeedUpdate = diag_tickTime;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="waiting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "prepare">*/
class prepare
{
name = "prepare";
init = /*%FSM<STATEINIT""">*/"diag_log (""CLEANUP: INITIALIZING Vehicle SCRIPT"");" \n
"" \n
"" \n
"_lastNeedUpdate = diag_tickTime;" \n
"" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="waiting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "update_objects">*/
class update_objects
{
name = "update_objects";
init = /*%FSM<STATEINIT""">*/"diag_log format[""INFO: needUpdate_objects=%1"",needUpdate_objects];" \n
"" \n
"{" \n
" needUpdate_objects = needUpdate_objects - [_x];" \n
" [_x,""damage"",true] call server_updateObject;" \n
"} forEach needUpdate_objects;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="waiting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "New_Cleanup_Obje">*/
class New_Cleanup_Obje
{
name = "New_Cleanup_Obje";
init = /*%FSM<STATEINIT""">*/"diag_log ""DEBUG: New_Cleanup_Obje ""; " \n
"_lootingrids = [];" \n
"" \n
"{" \n
" _loc = _x select 0;" \n
" _ref = _x select 1;" \n
"" \n
" _nearBy = nearestObjects [_loc, [""ReammoBox""], 1500];" \n
" {" \n
" _lootingrids set [count _lootingrids,[_x,_ref]];" \n
" } foreach _nearBy;" \n
"" \n
" dayz_deseedloot set [0,-1];" \n
" dayz_deseedloot = dayz_deseedloot - [-1];" \n
"" \n
"}foreach dayz_deseedloot;" \n
"" \n
"_qty = count _lootingrids;" \n
"diag_log (""CLEANUP:TOTAL "" + str(_qty) + "" LOOT BAGS"");" \n
"" \n
"_delQty = 0;" \n
"_delQtyDroped = 0;" \n
"_delQtySpawned = 0;" \n
"_delQtyPerma = 0;" \n
"" \n
"{" \n
" " \n
" _obj = _x select 0;" \n
" _ref = _x select 1;" \n
"" \n
" diag_log format [""%1,%2"", _obj, _ref];" \n
"" \n
" _Dropped = (_obj getVariable [""Dropped"",false]);" \n
" _Spawned = (_obj getVariable [""spawnedLoot"",false]);" \n
" _Perma = (_obj getVariable [""permaLoot"",false]);" \n
"" \n
" if (!_Spawned and !_Perma) then {" \n
" _obj setVariable [""Dropped"",true];" \n
" };" \n
"" \n
" //Dropped loot" \n
" if (_Dropped) then {" \n
" " \n
" [""Dropped_Loot"",_obj,_ref] call server_systemCleanup;" \n
" _delQtyDroped = _delQtyDroped + 1;" \n
"" \n
" };" \n
"" \n
" //Spawned Loot" \n
" if (_Spawned) then {" \n
"" \n
" [""Spawned_Loot"",_obj,_ref] call server_systemCleanup;" \n
" _delQtySpawned = _delQtySpawned + 1; " \n
" " \n
" };" \n
"" \n
" //Permaloot" \n
" if (_Perma) then {" \n
"" \n
" _delQtyPerma = _delQtyPerma + 1;" \n
"" \n
" };" \n
"" \n
"} foreach _lootingrids;" \n
"" \n
"if ((_delQtySpawned > 0) or (_delQtyDroped > 0) or (_delQtyPerma > 0)) then {" \n
" //diag_log (""CLEANUP: DELETED "" + str(_delQty) + "" LOOT BAGS"");" \n
" diag_log format [""CLEANUP: (DELETED, DroppedLoot: %1, SpawnedLoot: %2), (KEPT, PermaLoot: %3)"", _delQtyDroped, _delQtySpawned, _delQtyPerma];" \n
"};" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
};
initState="init";
finalStates[] =
{
};
};
/*%FSM</COMPILE>*/