Merge pull request #1979 from oiad/patch-14

Move more diag_log to debug lines
This commit is contained in:
icomrade
2017-09-08 20:43:58 -04:00
committed by GitHub
2 changed files with 161 additions and 143 deletions

View File

@@ -357,6 +357,11 @@ diag_log format["HIVE: BENCHMARK - Server_monitor.sqf finished streaming %1 obje
if (dayz_townGenerator) then {
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_plantSpawner.sqf"; // Draw the pseudo random seeds
};
#ifndef OBJECT_DEBUG
object_debug = false;
#else
object_debug = true;
#endif
[] execFSM "\z\addons\dayz_server\system\server_vehicleSync.fsm";
[] execVM "\z\addons\dayz_server\system\scheduler\sched_init.sqf"; // launch the new task scheduler

View File

@@ -1,4 +1,4 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Server Vehicle Sync">*/
/*%FSM<COMPILE "scriptedFSM.cfg, DayZ Server Vehicle Sync">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-75.000000,-425.000000,25.000000,-375.000000,0.000000,"init"};
@@ -9,7 +9,7 @@ item4[] = {"",7,210,-204.000015,271.000000,-195.999985,279.000031,0.000000,""};
item5[] = {"",7,210,-204.000015,-104.000000,-196.000000,-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,250,-125.000000,75.000000,-25.000000,125.000000,0.000000,"update objects"};
item8[] = {"update_objects",2,4346,-125.000000,75.000000,-25.000000,125.000000,0.000000,"update objects"};
item9[] = {"Objects_need_upd",4,218,-125.000000,0.000000,-25.000000,50.000000,1.000000,"Objects" \n "need update"};
item10[] = {"FenceObjects_need",4,218,-25.000000,0.000000,75.000000,50.000000,1.000000,"FenceObjects" \n "need update"};
item11[] = {"update_objects_1",2,250,-25.000000,75.000000,75.000000,125.000000,0.000000,"update objects"};
@@ -26,152 +26,165 @@ link9[] = {8,3};
link10[] = {9,8};
link11[] = {10,11};
link12[] = {11,3};
globals[] = {25.000000,1,0,0,0,640,480,1,15,6316128,1,-520.235962,640.978394,444.212921,-448.684845,779,598,1};
window[] = {2,-1,-1,-32000,-32000,780,52,1381,52,3,797};
globals[] = {0.000000,0,0,0,0,640,480,1,15,6316128,1,-520.235962,640.978394,444.212921,-448.684845,779,895,1};
window[] = {2,-1,-1,-1,-1,803,75,1404,75,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
fsmName = "DayZ Server Vehicle Sync";
class States
{
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<STATE "init">*/
class init
{
name = "init";
itemno = 0;
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "initialized">*/
class initialized
{
itemno = 6;
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";
itemno = 2;
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "FenceObjects_need">*/
class FenceObjects_need
{
itemno = 10;
priority = 1.000000;
to="update_objects_1";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(( (count needUpdate_FenceObjects) > 0) && (diag_tickTime -_lastfenceUpdate> 5) && (!isNil ""sm_done""))"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastfenceUpdate = diag_tickTime;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Objects_need_upd">*/
class Objects_need_upd
{
itemno = 9;
priority = 1.000000;
to="update_objects";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(( (count needUpdate_objects) > 0) && (diag_tickTime -_lastVehicleUpdate> 5) && (!isNil ""sm_done""))"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastNeedUpdate = diag_tickTime;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "prepare">*/
class prepare
{
name = "prepare";
itemno = 7;
init = /*%FSM<STATEINIT""">*/"diag_log (""CLEANUP: INITIALIZING Vehicle SCRIPT"");" \n
"" \n
"" \n
"_lastVehicleUpdate = diag_tickTime;" \n
"_lastfenceUpdate = diag_tickTime;" \n
"" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
itemno = 1;
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";
itemno = 8;
init = /*%FSM<STATEINIT""">*/"if (object_debug) then {" \n
" diag_log format[""INFO: needUpdate_objects=%1"",needUpdate_objects];" \n
"};" \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
{
itemno = 3;
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_1">*/
class update_objects_1
{
name = "update_objects_1";
itemno = 11;
init = /*%FSM<STATEINIT""">*/"diag_log format[""INFO: needUpdate_FenceObjects=%1"",needUpdate_FenceObjects];" \n
"" \n
"{" \n
" needUpdate_FenceObjects = needUpdate_FenceObjects - [_x];" \n
" [_x,""objWallDamage""] call server_updateObject;" \n
"} forEach needUpdate_FenceObjects;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
itemno = 3;
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</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "waiting">*/
class waiting
{
name = "waiting";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "FenceObjects_need">*/
class FenceObjects_need
initState="init";
finalStates[] =
{
priority = 1.000000;
to="update_objects_1";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(( (count needUpdate_FenceObjects) > 0) && (diag_tickTime -_lastfenceUpdate> 5) && (!isNil ""sm_done""))"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastfenceUpdate = 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 -_lastVehicleUpdate> 5) && (!isNil ""sm_done""))"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastNeedUpdate = diag_tickTime;"/*%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
"_lastVehicleUpdate = diag_tickTime;" \n
"_lastfenceUpdate = 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 "update_objects_1">*/
class update_objects_1
{
name = "update_objects_1";
init = /*%FSM<STATEINIT""">*/"diag_log format[""INFO: needUpdate_FenceObjects=%1"",needUpdate_FenceObjects];" \n
"" \n
"{" \n
" needUpdate_FenceObjects = needUpdate_FenceObjects - [_x];" \n
" [_x,""objWallDamage""] call server_updateObject;" \n
"} forEach needUpdate_FenceObjects;" \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>*/
};
initState="init";
finalStates[] =
{
};
};
/*%FSM</COMPILE>*/
/*%FSM</COMPILE>*/