diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/MetalFenceItems.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/MetalFenceItems.hpp index 4eafc455f..61a225367 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/MetalFenceItems.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/MetalFenceItems.hpp @@ -1,40 +1,70 @@ -class ItemMetalSheet: CA_Magazine +class ItemMetalSheet: CA_Magazine //Construection,farm,indestrial,castle { - scope = public; + scope = 2; count = 1; type = 256; displayName = $STR_BLD_name_ItemMetalSheet;//"Corrugated Sheet" picture = "\z\addons\dayz_buildings\equip\item_sheetmetal.paa"; model = "z\addons\dayz_buildings\models\sheet_metal.p3d"; descriptionShort = $STR_BLD_desc_ItemMetalSheet;//"Metal Sheeting" -}; -class ItemConcreteBlock: CA_Magazine +}; + +class ItemConcreteBlock: CA_Magazine //Construection,indestrial { - scope = public; + scope = 2; count = 1; type = 256; displayName = $STR_BLD_name_ItemConcreteBlock;//"Concrete Block" picture = "\z\addons\dayz_buildings\equip\concreteblock.paa"; model = "z\addons\dayz_buildings\models\concreteblock.p3d"; descriptionShort = $STR_BLD_desc_ItemConcreteBlock;//"Concrete Block" -}; -class ItemRSJ: CA_Magazine +}; + +class ItemRSJ: CA_Magazine //Construection,farm,indestrial,castle { - scope = public; + scope = 2; count = 1; type = 256; displayName = $STR_BLD_name_ItemRSJ;//"Steel Beam" picture = "\z\addons\dayz_buildings\equip\item_rsj.paa"; model = "z\addons\dayz_buildings\models\rsj.p3d"; descriptionShort = $STR_BLD_desc_ItemRSJ;//"Steel RSJ Support Beam" -}; -class ItemScrews: CA_Magazine +}; + +class ItemScrews: CA_Magazine //Construection,farm,indestrial,castle,residential { - scope = public; + scope = 2; + count = 1; + type = 256; + displayName = "Loose Screws";//"Box of screws for metal" + picture = "\z\addons\dayz_buildings\equip\item_screws.paa"; + model = "z\addons\dayz_buildings\models\screws.p3d"; + descriptionShort = $STR_BLD_desc_ItemScrews;//"Box of screws" +}; + +class ItemBagScrews: CA_Magazine//Construection,indestrial,supermarket +{ + scope = 2; count = 1; type = 256; displayName = $STR_BLD_name_ItemScrews;//"Box of screws for metal" picture = "\z\addons\dayz_buildings\equip\item_screws.paa"; model = "z\addons\dayz_buildings\models\screws.p3d"; descriptionShort = $STR_BLD_desc_ItemScrews;//"Box of screws" -}; \ No newline at end of file + + class ItemActions { + class Spilt { + text = "Spilt Box"; + script = "; [_this] call fn_spiltBag;"; + }; + }; + +}; + +/* +ItemScrews //Construection,farm,indestrial,castle,residential +ItemBagScrews //(LowChance)Construection,(LowChance)indestrial,supermarket +ItemRSJ //Construection,farm,indestrial,castle +ItemConcreteBlock //Construection,indestrial +ItemMetalSheet //Construection,farm,indestrial,castle +*/ \ No newline at end of file diff --git a/SQF/dayz_code/actions/object_maintenance.sqf b/SQF/dayz_code/actions/object_maintenance.sqf index 6d2d48208..c08acf0c6 100644 --- a/SQF/dayz_code/actions/object_maintenance.sqf +++ b/SQF/dayz_code/actions/object_maintenance.sqf @@ -108,7 +108,7 @@ if (_startMaintenance) then { //publicVariableServer "PVDZ_object_replace"; }; - _cursorTarget setVariable["Maintenance",true,true]; + _cursorTarget setVariable["Maintenance",false,true]; localize "str_maintenanceDone" call dayz_rollingMessages; }; diff --git a/SQF/dayz_code/actions/player_breakin.sqf b/SQF/dayz_code/actions/player_breakin.sqf index e5fc6bb8b..82edf092a 100644 --- a/SQF/dayz_code/actions/player_breakin.sqf +++ b/SQF/dayz_code/actions/player_breakin.sqf @@ -1,5 +1,5 @@ private ["_brokein","_isOk","_hasSledgeHammer","_gps","_vars","_hasToolbox","_hasCrowbar","_limit","_proceed","_counter", -"_dis","_sfx","_roll","_animState","_started","_finished","_isMedic","_isGate"]; +"_dis","_sfx","_roll","_animState","_started","_finished","_isMedic","_isGate","_values"]; _target = _this select 3; _pos = getPos _target; @@ -25,6 +25,15 @@ _proceed = false; _counter = 0; _brokein = false; +//[ChanceToBreakin,SledgeChance,CowbarChance] +_values = switch (1==1) do { + case (_isWoodenGate): { [0.04,0.30,0.20] }; + case (_isMetalGate): { [0.02,0.60,0.40] }; + default { [] }; +}; + +if ( (count _values) == 0 ) exitwith {}; + while {_isOk} do { //Check if we have the tools to start _hasSledgeHammer = "ItemSledge" in items player; @@ -85,32 +94,21 @@ while {_isOk} do { //Everything happened as it should if(_finished) then { - //Add to Counter + //Add to Counter _counter = _counter + 1; - if (_isMetalGate) then { - //start chance to gain access. - if ([0.02] call fn_chance) then { - _isOk = false; - _proceed = true; - _brokein = true; - _target setVariable ["isOpen", "1", true]; - }; - }; - - if (_isWoodenGate) then { - if ([0.04] call fn_chance) then { - _isOk = false; - _proceed = true; - _brokein = true; - _target setVariable ["isOpen", "1", true]; - }; + //start chance to gain access. + if ([(_values select 0)] call fn_chance) then { + _isOk = false; + _proceed = true; + _brokein = true; + _target setVariable ["isOpen", "1", true]; }; }; if (dayz_toolBreaking) then { //Chances to damage tools - if ([0.30] call fn_chance) then { + if ([(_values select 1)] call fn_chance) then { player removeWeapon "ItemSledge"; player addMagazine "ItemSledgeHandle"; player addMagazine "ItemSledgeHead"; @@ -118,7 +116,7 @@ while {_isOk} do { localize "STR_BLD_BREAKIN_BROKEN_SLEDGE" call dayz_rollingMessages; }; - if ([0.20] call fn_chance) then { + if ([(_values select 2)] call fn_chance) then { player removeWeapon "ItemCrowbar"; player addWeapon "ItemCrowbarBent"; diff --git a/SQF/dayz_code/compile/fence_handleDam.sqf b/SQF/dayz_code/compile/fence_handleDam.sqf index 5dc4f38c7..979ed52b0 100644 --- a/SQF/dayz_code/compile/fence_handleDam.sqf +++ b/SQF/dayz_code/compile/fence_handleDam.sqf @@ -10,39 +10,43 @@ private["_obj","_total","_damage"]; //Object the EH is assigned too _obj = _this select 0; -//Total damage of the object -_total = (damage _obj); -//Modify damage done based on level of fence +if !((_this select 4) in ["PipeBomb","explosive_bolt","Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo"]) exitwith { false }; + _damage = switch (1==1) do { - case ((typeof _obj) in ["WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7","WoodenGate_2","WoodenGate_3","WoodenGate_4"]): { 0.5 }; - //case ((typeof _obj) in ["WoodenFence_6","WoodenFence_7","WoodenGate_4"]): { 0.35 }; - default { 1 }; + case ((_this select 4) in ["PipeBomb"]): { 0.5 }; //High explosive + case ((_this select 4) in ["explosive_bolt"]): { 0.25 }; //Medium explosive, maybe grenades and other such items. + case ((_this select 4) in ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo"]): { 0.00001 }; //Melee damage + default { 0 }; }; -//Is the object local -if (local _obj) then { - //is damage being done aboue 0 (should always be) not needed. - if (_damage > 0) then { - //Server running or client - if (!isServer) then { - //If its a client send to server get the ownering player and send damage to that player - PVDZ_veh_Save = [_obj,"objWallDamage",(_total + _damage)]; - publicVariableServer "PVDZ_veh_Save"; - } else { - //Server running the EH, update object to db - [_obj,"objWallDamage",(_total + _damage)] call server_updateObject; - }; +//Server running or client +if (isServer) then { + if !(_obj in needUpdate_FenceObjects) then { + needUpdate_FenceObjects set [count needUpdate_FenceObjects, _obj]; }; + + //TotalDamage Set by the server + _obj setDamage (damage _obj) + _damage; + + //diag_log format["Server Reporting - %1",needUpdate_FenceObjects]; } else { - //send to server then back to owning client/server - PVDZ_send = [_obj,"objWallDamage",_this]; - publicVariableServer "PVDZ_send"; + //If its a client send to server for saving and damage setting. + PVDZ_fence_Update = [_obj,(damage _obj) + _damage]; + publicVariableServer "PVDZ_fence_Update"; + + //diag_log ("Client Reporting"); }; -//Logging. -diag_log format["INFO - %1(%3) - %2(%4)",_obj,_damage,(typeof _obj),_total]; +//} else { +// //We really coulde just send to server and have the server setDamage +// //send to server then back to owning client/server +// PVDZ_send = [_obj,"objWallDamage",_this]; +// publicVariableServer "PVDZ_send"; +//}; +diag_log format["Object: %1, Damage:%2(%4), Projectile:%3",typeof (_this select 0),((damage _obj) + _damage),(_this select 4),(damage _obj)]; + // all "HandleDamage event" functions should return the effective damage that the engine will record for that part -0 +false \ No newline at end of file diff --git a/SQF/dayz_code/compile/fn_upgradeActions.sqf b/SQF/dayz_code/compile/fn_upgradeActions.sqf index 4f3308511..5b9cac2f7 100644 --- a/SQF/dayz_code/compile/fn_upgradeActions.sqf +++ b/SQF/dayz_code/compile/fn_upgradeActions.sqf @@ -35,7 +35,8 @@ if (!isNull _cursorTarget and !_inVehicle and (player distance _cursorTarget < 4 //building System _text = getText (configFile >> "CfgVehicles" >> typeOf _cursorTarget >> "displayName"); - if ((_cursorTarget iskindof "DZ_buildables") and isText(configFile >> "CfgVehicles" >> (typeOf _cursorTarget) >> "Upgrade" >> "create") and !_ownerBuildLock) then { + /* + if ((_cursorTarget iskindof "DZ_buildables") and !_ownerBuildLock) then { if (s_player_building < 0) then { if (isText (configFile >> "CfgVehicles" >> (typeof _cursorTarget) >> "Upgrade" >> "create")) then { s_player_building = player addAction [format[localize "str_upgrade",_text], "\z\addons\dayz_code\actions\object_upgradebuilding.sqf",_cursorTarget, 0, false, true, "",""]; @@ -54,6 +55,7 @@ if (!isNull _cursorTarget and !_inVehicle and (player distance _cursorTarget < 4 player removeAction s_player_maintenance; s_player_maintenance = -1; }; + */ if ((((getPlayerUID player) in _ownerArray) or (count _ownerArray == 0) or ((typeof _cursorTarget) in ["WoodenFence_1_foundation","WoodenGate_foundation"])) and !_ownerBuildLock) then { diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index 9bac8c744..1bd8846a5 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -81,12 +81,13 @@ if (isServer) then { "PVDZ_plr_SwitchMove" addPublicVariableEventHandler {((_this select 1) select 0) switchMove ((_this select 1) select 1);}; //Needed to execute switchMove on server machine. rSwitchMove only executes on other clients "PVDZ_obj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishObj}; //Used by built items (Epoch and Vanilla) "PVDZ_veh_Save" addPublicVariableEventHandler {(_this select 1) call server_updateObject}; + "PVDZ_fence_Update" addPublicVariableEventHandler {(_this select 1) call server_addtoFenceUpdateArray}; "PVDZ_plr_Login1" addPublicVariableEventHandler {_id = (_this select 1) call server_playerLogin}; "PVDZ_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup}; "PVDZ_plr_LoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin}; "PVDZ_obj_Destroy" addPublicVariableEventHandler {(_this select 1) call server_deleteObj}; "PVDZ_send" addPublicVariableEventHandler {(_this select 1) call server_sendToClient}; - "PVDZ_dayzCarBomb" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\actions\detonate_bomb.sqf";}; + //"PVDZ_dayzCarBomb" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\actions\detonate_bomb.sqf";}; //[player,[medical Array]]; "PVDZ_playerMedicalSync" addPublicVariableEventHandler { (_this select 1) call server_medicalSync; ((_this select 1) select 0) setVariable["Medical",((_this select 1) select 1),false]; }; //diag_log format["%1 - %2",((_this select 1) select 0),((_this select 1) select 1)]; }; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 1a9c96a2d..86cc87137 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -569,6 +569,7 @@ TimeOutDisplayed = false; if (isServer) then { dead_bodyCleanup = []; needUpdate_objects = []; + needUpdate_FenceObjects = []; //dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass //dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass //Objects to remove when killed. diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 36206f3b1..e4f236dfe 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -1716,11 +1716,11 @@ Bauansicht deaktiviert. - %1 Maintenance - %1 Обслуживание - Entretien de la %1 - Údržba %1 - %1 - Wartung + Maintenance + Обслуживание + Entretien de la + Údržba + Wartung %1 Disassembly diff --git a/SQF/dayz_server/compile/server_updateObject.sqf b/SQF/dayz_server/compile/server_updateObject.sqf index 561ac7238..8aec65891 100644 --- a/SQF/dayz_server/compile/server_updateObject.sqf +++ b/SQF/dayz_server/compile/server_updateObject.sqf @@ -158,15 +158,17 @@ _object_damage = { //Walls _objWallDamage = { - private "_key"; - _damage = _this select 2; - _object setDamage _damage; + private ["_key","_damage"]; + _damage = (damage _object); if (_objectID == "0") then { _key = format["CHILD:306:%1:%2:%3:",_objectUID,[],_damage]; } else { _key = format["CHILD:306:%1:%2:%3:",_objectID,[],_damage]; }; + + diag_log ("HIVE: WRITE: "+ str(_key)); + _key call server_hiveWrite; }; diff --git a/SQF/dayz_server/eventHandlers/server_sendToClient.sqf b/SQF/dayz_server/eventHandlers/server_sendToClient.sqf index 54e3f7098..da7f81f19 100644 --- a/SQF/dayz_server/eventHandlers/server_sendToClient.sqf +++ b/SQF/dayz_server/eventHandlers/server_sendToClient.sqf @@ -7,17 +7,7 @@ _owner = owner _unit; //diag_log format ["%1, %2, %3, %4", _unit, _variable, _arraytosend, _owner]; -switch (_variable) do { - case "objWallDamage": { - _object = _arraytosend select 0; - if (local _object) then { - _arraytosend call fnc_Obj_FenceHandleDam; - } else { - PVCDZ_obj_Damage = _arraytosend; - _owner publicVariableClient "PVCDZ_obj_Damage"; - }; - }; - +switch (_variable) do { case "VehHandleDam": { _vehicle = _arraytosend select 0; if (local _vehicle) then { diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index 0c89f889a..0c48ed44a 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -79,6 +79,20 @@ dayz_Achievements = { _player setVariable ["Achievements",_achievements]; }; */ + +//Send fences to this array to be synced to db, should prove to be better performaince wise rather then updaing each time they take damage. +server_addtoFenceUpdateArray = { + //Potential problem no current way to say what is setting the damage. + if ((_this select 0) isKindOf "DZ_buildables") then { + (_this select 0) setDamage (_this select 1); + + if !((_this select 0) in needUpdate_FenceObjects) then { + needUpdate_FenceObjects set [count needUpdate_FenceObjects, (_this select 0)]; + }; + }; +}; + + vehicle_handleServerKilled = { private ["_unit","_killer"]; _unit = _this select 0; diff --git a/SQF/dayz_server/system/server_vehicleSync.fsm b/SQF/dayz_server/system/server_vehicleSync.fsm index a5e5ff0ca..5d2b580e2 100644 --- a/SQF/dayz_server/system/server_vehicleSync.fsm +++ b/SQF/dayz_server/system/server_vehicleSync.fsm @@ -5,15 +5,14 @@ item0[] = {"init",0,250,-75.000000,-425.000000,25.000000,-375.000000,0.000000,"i 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,""}; +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,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"}; +item8[] = {"update_objects",2,250,-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"}; link0[] = {0,6}; link1[] = {1,2}; link2[] = {2,9}; @@ -27,8 +26,8 @@ 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}; +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}; *//*%FSM*/ class FSM { @@ -64,26 +63,26 @@ class FSM precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ + class FenceObjects_need + { + priority = 1.000000; + to="update_objects_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(( (count needUpdate_FenceObjects) > 0) && (diag_tickTime -_lastfenceUpdate> 5) && (!isNil ""sm_done""))"/*%FSM*/; + action=/*%FSM*/"_lastfenceUpdate = diag_tickTime;"/*%FSM*/; + }; + /*%FSM*/ /*%FSM*/ class Objects_need_upd { priority = 1.000000; to="update_objects"; precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"(( (count needUpdate_objects) > 0) && (diag_tickTime -_lastNeedUpdate> 5) && (!isNil ""sm_done""))"/*%FSM*/; + condition=/*%FSM*/"(( (count needUpdate_objects) > 0) && (diag_tickTime -_lastVehicleUpdate> 5) && (!isNil ""sm_done""))"/*%FSM*/; action=/*%FSM*/"_lastNeedUpdate = diag_tickTime;"/*%FSM*/; }; /*%FSM*/ - /*%FSM*/ - class true - { - priority = 0.000000; - to="waiting"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"true"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ }; }; /*%FSM*/ @@ -94,7 +93,8 @@ class FSM init = /*%FSM*/"diag_log (""CLEANUP: INITIALIZING Vehicle SCRIPT"");" \n "" \n "" \n - "_lastNeedUpdate = diag_tickTime;" \n + "_lastVehicleUpdate = diag_tickTime;" \n + "_lastfenceUpdate = diag_tickTime;" \n "" \n "" \n ""/*%FSM*/; @@ -141,83 +141,30 @@ class FSM }; }; /*%FSM*/ - /*%FSM*/ - class New_Cleanup_Obje + /*%FSM*/ + class update_objects_1 { - name = "New_Cleanup_Obje"; - init = /*%FSM*/"diag_log ""DEBUG: New_Cleanup_Obje ""; " \n - "_lootingrids = [];" \n + name = "update_objects_1"; + init = /*%FSM*/"diag_log format[""INFO: needUpdate_FenceObjects=%1"",needUpdate_FenceObjects];" \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 + " needUpdate_FenceObjects = needUpdate_FenceObjects - [_x];" \n + " [_x,""objWallDamage""] call server_updateObject;" \n + "} forEach needUpdate_FenceObjects;" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { + /*%FSM*/ + class true + { + priority = 0.000000; + to="waiting"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ }; }; /*%FSM*/ diff --git a/Server Files/Battleye/scripts.txt b/Server Files/Battleye/scripts.txt index 17cae19e6..7294f8894 100644 --- a/Server Files/Battleye/scripts.txt +++ b/Server Files/Battleye/scripts.txt @@ -30,7 +30,7 @@ 5 "playableUnits" !"for [{_y=0},{_y < count(playableUnits)},{_y=_y+1}] do {" !"typeName player == \"OBJECT\")}) AND {((player in playableUnits) AND {(alive player)" !"(1 max count playableUnits)) min (dayz_maxAnimals - _count))) to 1 step -1 do {" !"AND {((alive _x) AND {((vehicle _x) distance _obj < 150)})}} count playableUnits)}) then {" !="_local = { _unit distance _x < _dis; } count playableUnits <= 1;" !"if (!_isOk) exitWith {false};\nuiSleep 0.001;\n} forEach playableUnits;" !"ManagementMustBeClose) then { player nearEntities [\"CAManBase\", 10] } else { playableUnits };" 5 "selectPlayer" !"dayz_originalPlayer enableSimulation true;\naddSwitchableUnit dayz_originalPlayer;\nsetPlayable dayz_originalPlayer;\nselectPlayer dayz_originalPlayer;" !"addSwitchableUnit _newUnit;\nsetPlayable _newUnit;\nselectPlayer _newUnit;" 5 "serverCommand" !="_character = if (serverCommandAvailable \"#kick\") then { call sched_tg_follow } else { player };" !"serverCommand (\"#kick \" + _selectedName);" -5 "setDamage" !"([4654,9595,0] nearestObject 145259) setDamage 1;\n([4654,9595,0] nearestObject 145260) setDamage 1;" !"if (_entity isKindOf \"Animal\") then {\n_entity setDamage 1;" !"_tree setDamage 1;\ndayz_choppedTrees set [count dayz_choppedTrees,_tree];" !="if ((alive player) && (r_fracture_legs or {player isKindOf 'PZombie_VB'})) then { player SetDamage 1;};" !"_id = [player,20,true,getPosATL player] call player_alertZombies;\nuiSleep 0.5;\nplayer setDamage 1;" !"if(\"\" == typeOf _tree) then {\n_tree setDamage 1;\n};" !"if (_ent isKindOf \"Animal\" || _ent isKindOf \"zZombie_base\") then {\n_ent setDamage 1;" +5 "setDamage" !"([4654,9595,0] nearestObject 145259) setDamage 1;\n([4654,9595,0] nearestObject 145260) setDamage 1;" !"if (_entity isKindOf \"Animal\") then {\n_entity setDamage 1;" !"_tree setDamage 1;\ndayz_choppedTrees set [count dayz_choppedTrees,_tree];" !="if ((alive player) && (r_fracture_legs or {player isKindOf 'PZombie_VB'})) then { player SetDamage 1;};" !"_id = [player,20,true,getPosATL player] call player_alertZombies;\nuiSleep 0.5;\nplayer setDamage 1;" !"\n_obj setDamage (damage _obj) + _damage;\n" !"if(\"\" == typeOf _tree) then {\n_tree setDamage 1;\n};" !"if (_ent isKindOf \"Animal\" || _ent isKindOf \"zZombie_base\") then {\n_ent setDamage 1;" 5 "setDammage" 5 "SetEventHandler" !="_menu ctrlSetEventHandler [\"ButtonClick\",_compile];" !="inGameUISetEventHandler [\"PrevAction\",\"false\"];" !="inGameUISetEventHandler [\"NextAction\",\"false\"];" !="inGameUISetEventHandler [\"Action\",\"false\"];" 5 "setMarkerAlpha"