From 9bf7cd32195a2b11e90aad01dd33b566304dba41 Mon Sep 17 00:00:00 2001 From: AirwavesMan Date: Thu, 18 Jun 2020 20:26:33 +0200 Subject: [PATCH] Remove no longer used code from dayz fences --- SQF/dayz_code/compile/fn_selfActions.sqf | 127 +------- SQF/dayz_code/init/compiles.sqf | 3 +- SQF/dayz_code/init/publicEH.sqf | 82 +---- SQF/dayz_code/init/variables.sqf | 12 - SQF/dayz_code/old/Readme.txt | 3 +- SQF/dayz_code/{compile => old}/fn_Padlock.sqf | 0 .../object_upgradeStorage.sqf | 0 .../object_upgradebuilding.sqf | 0 .../{actions => old}/player_operate.sqf | 0 SQF/dayz_server/init/server_functions.sqf | 6 - SQF/dayz_server/system/server_vehicleSync.fsm | 283 +++++++----------- 11 files changed, 121 insertions(+), 395 deletions(-) rename SQF/dayz_code/{compile => old}/fn_Padlock.sqf (100%) rename SQF/dayz_code/{actions => old}/object_upgradeStorage.sqf (100%) rename SQF/dayz_code/{actions => old}/object_upgradebuilding.sqf (100%) rename SQF/dayz_code/{actions => old}/player_operate.sqf (100%) diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 2e59dd19f..b50bcf47a 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -9,7 +9,7 @@ private ["_canPickLight","_text","_unlock","_lock","_totalKeys","_temp_keys","_t "_player_lockUnlock_crtl","_displayName","_hasIgnitors","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached", "_combi","_findNearestGen","_humanity_logic","_low_high","_cancel","_buy","_buyV","_humanity","_traderMenu","_warn","_typeOfCursorTarget", "_isVehicle","_isBicycle","_isDestructable","_isGenerator","_ownerID","_hasBarrel","_hasFuel20","_hasFuel5","_hasEmptyFuelCan", -"_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_upgradeItems","_isDisallowRefuel","_isDog", +"_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_isDisallowRefuel","_isDog", "_isModular","_isModularDoor","_isHouse","_isGateOperational","_isGateLockable","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock", "_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo", "_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance","_id","_upgrade","_weaponsPlayer","_hasCrowbar", @@ -66,16 +66,6 @@ if (s_player_equip_carry < 0) then { }; }; -/*if (dayz_onBack != "" /*&& !dayz_onBackActive && !_inVehicle && !_onLadder && !r_player_unconscious) then { - if (s_player_equip_carry < 0) then { - _text = getText (configFile >> "CfgWeapons" >> dayz_onBack >> "displayName"); - s_player_equip_carry = player addAction [format[localize "STR_ACTIONS_WEAPON", _text], "\z\addons\dayz_code\actions\player_switchWeapon_action.sqf", nil, 0.5, false, true]; - }; -} else { - player removeAction s_player_equip_carry; - s_player_equip_carry = -1; -};*/ - //fishing if ((_currentWeapon in Dayz_fishingItems) && {!dayz_fishingInprogress} && {!_inVehicle} && {!dayz_isSwimming}) then { if (s_player_fishing < 0) then { @@ -238,7 +228,6 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance _text = getText (configFile >> "CfgVehicles" >> _typeOfCursorTarget >> "displayName"); _isPlant = _typeOfCursorTarget in Dayz_plants; _istypeTent = (_cursorTarget isKindOf "TentStorage_base") or (_cursorTarget isKindOf "IC_Tent"); - _upgradeItems = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3"]; _characterID = _cursorTarget getVariable ["CharacterID","0"]; if (DZE_permanentPlot) then { @@ -252,7 +241,7 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance _isDisallowRefuel = _typeOfCursorTarget in ["M240Nest_DZ","MMT_Civ","MMT_USMC","Old_bike_TK_CIV_EP1","Old_bike_TK_INS_EP1"]; _isDog = (_cursorTarget isKindOf "Pastor" || _cursorTarget isKindOf "Fin"); _isModular = _cursorTarget isKindOf "ModularItems"; - _isModularDoor = _typeOfCursorTarget in ["Land_DZE_WoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_GarageWoodDoor","CinderWallDoor_DZ","CinderWallDoorSmall_DZ"]; + _isModularDoor = _typeOfCursorTarget in ["Land_DZE_WoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_GarageWoodDoor","CinderWallDoor_DZ","CinderWallDoorSmall_DZ","WoodenGate_foundation_DZ","WoodenGate_1_DZ","WoodenGate_2_DZ","WoodenGate_3_DZ","WoodenGate_4_DZ"]; _player_deleteBuild = false; _player_lockUnlock_crtl = false; @@ -496,100 +485,7 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance s_player_repair_crtl = -1; }; }; - /* //Vanilla base building currently not used in Epoch - // House locking and unlocking - _isHouse = _typeOfCursorTarget in ["SurvivorWorkshopAStage5", "SurvivorWorkshopBStage5", "SurvivorWorkshopCStage5"]; - _isGateOperational = _typeOfCursorTarget in ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","MetalGate_1","MetalGate_2","MetalGate_3","MetalGate_4"]; - _isGateLockable = _typeOfCursorTarget in ["WoodenGate_1","WoodenGate_2","WoodenGate_3","MetalGate_1","MetalGate_2","MetalGate_3"]; - _isFence = _typeOfCursorTarget in ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","MetalFence_1","MetalFence_2","MetalFence_3","MetalFence_4","MetalFence_5","MetalFence_6","MetalFence_7"]; - //Only the owners can lock the gates - _isLockableGate = _typeOfCursorTarget in ["WoodenGate_2","WoodenGate_3","WoodenGate_4","MetalGate_2","MetalGate_3","MetalGate_4"]; - _isUnlocked = _cursorTarget getVariable ["isOpen","0"] == "1"; - - _isActionInProgress = _cursorTarget getVariable ["actionInProgress",false]; - - //Allow the gates to be opened when not locked by anyone - _isOpen = ((_cursorTarget animationPhase "DoorL") == 1) || ((_cursorTarget animationPhase "DoorR") == 1); - _isClosed = ((_cursorTarget animationPhase "DoorL") == 0) || ((_cursorTarget animationPhase "DoorR") == 0); - - //[["ownerArray",["PID"]]] - _ownerArray = _cursorTarget getVariable ["ownerArray",["0"]]; - _ownerBuildLock = _cursorTarget getVariable ["BuildLock",false]; - _ownerPID = (_ownerArray select 0); - - // open Gate - if (_isGateOperational && _isClosed && _isUnlocked) then { - if (s_player_openGate < 0) then { - s_player_openGate = player addAction [localize "STR_DN_OUT_O_GATE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Open"], 1, true, true]; - }; - } else { - player removeAction s_player_openGate; - s_player_openGate = -1; - }; - // Close Gate - if (_isGateOperational && _isOpen && _isUnlocked) then { - if (s_player_CloseGate < 0) then { - s_player_CloseGate = player addAction [localize "STR_DN_OUT_C_GATE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Close"], 1, true, true]; - }; - } else { - player removeAction s_player_CloseGate; - s_player_CloseGate = -1; - }; - // Set - if ((_isHouse or _isLockableGate) && (_ownerPID == _uid) && !_isUnlocked && _isClosed) then { - if (s_player_setCode < 0) then { - s_player_setCode = player addAction [localize "STR_BLD_ACTIONS_SETLOCKCODE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Set"], 1, true, true]; - }; - } else { - player removeAction s_player_setCode; - s_player_setCode = -1; - }; - //Lock Build point - if ((_isFence or _isGateLockable) && (_ownerPID == _uid) && !_ownerBuildLock) then { - if (s_player_BuildLock < 0) then { - s_player_BuildLock = player addAction [localize "STR_BLD_ACTIONS_LOCKBUILD", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"BuildLock"], 1, true, true]; - }; - } else { - player removeAction s_player_BuildLock; - s_player_BuildLock = -1; - }; - //UnLock Build point - if ((_isFence or _isGateLockable) && (_ownerPID == _uid) && _ownerBuildLock) then { - if (s_player_BuildUnLock < 0) then { - s_player_BuildUnLock = player addAction [localize "STR_BLD_ACTIONS_UNLOCKBUILD", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"BuildUnLock"], 1, true, true]; - }; - } else { - player removeAction s_player_BuildUnLock; - s_player_BuildUnLock = -1; - }; - // Unlock Gate/House - if ((_isHouse or _isLockableGate) && !_isUnlocked && _isClosed) then { - if (s_player_unlockhouse < 0) then { - s_player_unlockhouse = player addAction [localize "STR_BLD_ACTIONS_UNLOCKGATE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Unlock"], 1, true, true]; - }; - } else { - player removeAction s_player_unlockhouse; - s_player_unlockhouse = -1; - }; - // Lock Gate/House - if ((_isHouse or _isLockableGate) && _isUnlocked && _isClosed) then { - if (s_player_lockhouse < 0) then { - s_player_lockhouse = player addAction [localize "STR_BLD_ACTIONS_LOCKGATE", "\z\addons\dayz_code\actions\player_operate.sqf",[_cursorTarget,"Lock"], 1, true, true]; - }; - } else { - player removeAction s_player_lockhouse; - s_player_lockhouse = -1; - }; - //Break In - if ((_isHouse or _isLockableGate) && (_ownerPID != _uid) && !_isUnlocked && !_isActionInProgress) then { - if (s_player_breakinhouse < 0) then { - s_player_breakinhouse = player addAction [localize "STR_BLD_ACTIONS_BREAKIN", "\z\addons\dayz_code\actions\player_breakin.sqf",_cursorTarget, 1, true, true]; - }; - } else { - player removeAction s_player_breakinhouse; - s_player_breakinhouse = -1; - };*/ if ((_typeOfCursorTarget == "Plastic_Pole_EP1_DZ") && {speed player <= 1}) then { _hasAccess = [player, _cursorTarget] call FNC_check_access; _allowed = ((_hasAccess select 0) || {_hasAccess select 2} || {_hasAccess select 3} || {_hasAccess select 4}); @@ -806,7 +702,7 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance }; // inplace upgrade tool - if (((_cursorTarget isKindOf "ModularItems") || (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base") || (_cursorTarget isKindOf "CinderWallDoor_DZ_Base") || (_cursorTarget isKindOf "DZ_storage_base") || (_typeOfCursorTarget in DZE_isNewStorage)) && !(_typeOfCursorTarget in DZE_DisableUpgrade)) then { + if (((_cursorTarget isKindOf "ModularItems") || (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base") || (_cursorTarget isKindOf "CinderWallDoor_DZ_Base") || (_cursorTarget isKindOf "DZE_Housebase") || (_cursorTarget isKindOf "DZ_storage_base") || (_typeOfCursorTarget in DZE_isNewStorage)) && !(_typeOfCursorTarget in DZE_DisableUpgrade)) then { if ((s_player_lastTarget select 0) != _cursorTarget) then { if (s_player_upgrade_build > 0) then { player removeAction s_player_upgrade_build; @@ -1044,23 +940,6 @@ if (!isNull _cursorTarget && {!_inVehicle} && {!_isPZombie} && {player distance s_player_destroytent = -1; // player removeAction s_player_attach_bomb; // s_player_attach_bomb = -1; - /* //Unlock,Lock // Vanilla base building currently not used in Epoch - player removeAction s_player_setCode; - s_player_setCode = -1; - player removeAction s_player_lockhouse; - s_player_lockhouse = -1; - player removeAction s_player_unlockhouse; - s_player_unlockhouse = -1; - player removeAction s_player_openGate; - s_player_openGate = -1; - player removeAction s_player_CloseGate; - s_player_CloseGate = -1; - player removeAction s_player_breakinhouse; - s_player_breakinhouse = -1; - player removeAction s_player_BuildUnLock; - s_player_BuildUnLock = -1; - player removeAction s_player_BuildLock; - s_player_BuildLock = -1;*/ {player removeAction _x} count s_player_combi;s_player_combi = []; s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull]; {player removeAction _x} count s_player_parts;s_player_parts = []; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index cf5f9ef66..1abcb5070 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -9,8 +9,7 @@ if (!isDedicated) then { //"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; //"filmic" setToneMappingParams [0.07, 0.31, 0.23, 0.37, 0.011, 3.750, 6, 4]; setToneMapping "filmic"; //DayZ Vanilla "filmic" setToneMappingParams [0.4, 0.35, 0.18, 0.1, 0.1, 5, 6, 3.8]; setToneMapping "filmic"; - - call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_padlock.sqf"; + call compile preprocessFileLineNumbers "\z\addons\dayz_code\util\compile.sqf"; call compile preprocessFileLineNumbers "\z\addons\dayz_code\loot\init.sqf"; diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index afc8eaa29..4f09d570d 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -1,7 +1,6 @@ // Both client and server "PVDZ_hlt_Bleed" addPublicVariableEventHandler {(_this select 1) spawn fnc_usec_damageBleed}; "PVCDZ_veh_SH" addPublicVariableEventHandler {(_this select 1) call fnc_veh_handleDam}; // set damage to vehicle part -//"PVCDZ_obj_Damage" addPublicVariableEventHandler {(_this select 1) call fnc_Obj_FenceHandleDam}; // set damage to object. //Vanilla fences not used in Epoch "PVDZ_veh_SF" addPublicVariableEventHandler {(_this select 1) call fnc_veh_handleRepair}; // repair a part from a vehicle "PVCDZ_obj_HideBody" addPublicVariableEventHandler {hideBody (_this select 1)}; "PVCDZ_obj_GutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject}; @@ -78,7 +77,6 @@ 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}; @@ -101,20 +99,6 @@ if (isServer) then { }; "PVDZE_PingSend" addPublicVariableEventHandler {PVDZE_PingReceived = 1; (owner (_this select 1)) publicVariableClient "PVDZE_PingReceived";}; - //Added as part of the maintenance system to allow the server to replace the damaged model with a normal model. - /*"PVDZ_object_replace" addPublicVariableEventHandler { - _object = _this select 1; - _vars = _object getVariable "MaintenanceVars"; - _ownerArray = _object getVariable ["ownerArray",[]]; - - if (!isNil "_vars" && _object isKindOf "DZ_buildables") then { - deleteVehicle _object; - _object = createVehicle [(_vars select 0), (_vars select 1), [], 0, if ((_vars select 0) in DayZ_nonCollide) then {"NONE"} else {"CAN_COLLIDE"}]; - _object setVariable["Maintenance",false,true]; - _object setVariable["ownerArray", _ownerArray, true]; - }; - };*/ - "PVDZ_Server_Simulation" addPublicVariableEventHandler { _agent = (_this select 1) select 0; _control = (_this select 1) select 1; @@ -180,49 +164,6 @@ if (isServer) then { }; */ }; - - //"PVDZ_Server_processSetAccessCode" addPublicVariableEventHandler {(_this select 1) call pvs_processSetAccessCode}; - - //"PVDZ_Server_processCode" addPublicVariableEventHandler {(_this select 1) call pvs_processAccessCode}; - - /* - "PVDZ_Server_processSetAccessCode" addPublicVariableEventHandler { - private ["_unitSending","_object","_object","_code"]; - _unitSending = (_this select 1) select 0; - _object = (_this select 1) select 1; - _code = (_this select 1) select 2; - - //diag_log format["%1, %2-%3",_unitSending,_object,_code]; - - _ownerID = owner _unitSending; - _ownerArray = _object getVariable ["ownerArray",["0"]]; - - if ((_ownerArray select 0) == (getPlayerUID _unitSending)) then { - if (_unitSending distance _object < 5) then { - _object setVariable ["dayz_padlockCombination",_code,false]; - - PVCDZ_Client_processAccessCode = [_code]; - _ownerID publicVariableClient "PVCDZ_Client_processAccessCode"; - - [_object,"accessCode",_code] call server_updateObject; - - _object setVariable ["dayz_padlockHistory", [], true]; - _object setVariable ["dayz_padlockLockStatus", true,true]; - - diag_log format["INFO: %1, %5 has changed the access code for %2 with %3 at time %4",(name _unitSending),(typeof _object),_code,time,(getPlayerUID _unitSending)]; - } else { - diag_log format["WARNING: %1, %5 is asking to change access code of %2 from a distance of %3 at time %4",(name _unitSending),(typeof _object),(_unit distance _object),time,(getPlayerUID _unitSending)]; - }; - } else { - diag_log format["WARNING: %1, %2 is trying to set a code for a gate he does not own.",(name _unitSending),(getPlayerUID _unitSending)]; - }; - }; - */ - - /*"PVDZ_Server_buildLock" addPublicVariableEventHandler { - _object = (_this select 1) select 0; - [_object,"buildLock"] call server_updateObject; - };*/ }; //Client only @@ -246,7 +187,7 @@ if (!isDedicated) then { "PVDZ_drg_RaUW" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\load\unload_wounded.sqf"}; "PVDZ_obj_Fire" addPublicVariableEventHandler {(_this select 1) spawn BIS_Effects_Burn}; "PVCDZ_plr_Humanity" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange}; - "PVDZE_plr_FriendRQ" addPublicVariableEventHandler {if (player == ((_this select 1) select 0)) then {localize "str_epoch_player_2" call dayz_rollingMessages;};}; + "PVDZE_plr_FriendRQ" addPublicVariableEventHandler {if (player == ((_this select 1) select 0)) then {localize "str_epoch_player_2" call dayz_rollingMessages;};}; //Medical "PVCDZ_hlt_Morphine" addPublicVariableEventHandler {(_this select 1) call player_medMorphine}; @@ -275,27 +216,6 @@ if (!isDedicated) then { _unit setVariable ["NORRN_unconscious", true, true]; }; - /*"PVCDZ_Client_processCode" addPublicVariableEventHandler { - _object = (_this select 1) select 0; - _result = (_this select 1) select 1; - _codeGuess = (_this select 1) select 2; - - if (_result) then { - _object setVariable ["dayz_padlockLockStatus", false,true]; - _object setVariable ["isOpen", "1", true]; - _object setVariable ["dayz_padlockHistory", [], true]; - format[localize "STR_BLD_UNLOCKED",typeOf _object] call dayz_rollingMessages; - } else { - format[localize "STR_BLD_WRONG_COMBO",typeOf _object] call dayz_rollingMessages; - _object setVariable ["dayz_padlockHistory", _codeGuess, true]; - }; - };*/ - - /*"PVCDZ_Client_processAccessCode" addPublicVariableEventHandler { - _codeGuess = (_this select 1) select 0; - format[localize "STR_BLD_COMBO_SET",_codeGuess] call dayz_rollingMessages; - };*/ - if (toLower DZE_DeathMsgChat != "none" or DZE_DeathMsgRolling or DZE_DeathMsgDynamicText) then { "PVDZE_deathMessage" addPublicVariableEventHandler {(_this select 1) call dze_deathMessage}; }; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 826b7e030..9171d83d9 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -107,7 +107,6 @@ if (isServer) then { dayz_traps = []; dead_bodyCleanup = []; needUpdate_objects = []; - needUpdate_FenceObjects = []; dayz_choppedTrees = []; dayz_ghostPlayers = []; dayz_activePlayers = []; @@ -117,9 +116,6 @@ if (isServer) then { PlayerDeaths = []; //Objects to remove when killed. - DayZ_nonCollide = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3", "StashMedium4", "DomeTentStorage", "DomeTentStorage0", "DomeTentStorage1", "DomeTentStorage2", "DomeTentStorage3", "DomeTentStorage4", "CamoNet_DZ", "DesertTentStorage", "DesertTentStorage0", "DesertTentStorage1", "DesertTentStorage2", "DomeTentStorage3", "DesertTentStorage4"]; - DayZ_WoodenFence = ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7"]; - DayZ_WoodenGates = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"]; DayZ_removableObjects = ["Wire_cat1","Sandbag1_DZ","Hedgehog_DZ","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"]; // Epoch Additions @@ -229,14 +225,6 @@ if (!isDedicated) then { s_player_destroytent = -1; //s_player_attach_bomb = -1; //s_player_Drinkfromhands = -1; - /*s_player_lockhouse = -1; //Vanilla base building currently not used in Epoch - s_player_unlockhouse = -1; - s_player_openGate = -1; - s_player_CloseGate = -1; - s_player_breakinhouse = -1; - s_player_setCode = -1; - s_player_BuildUnLock = -1; - s_player_BuildLock = -1;*/ // Epoch Additions s_player_packvault = -1; diff --git a/SQF/dayz_code/old/Readme.txt b/SQF/dayz_code/old/Readme.txt index 1b8b82870..efaaa8b1b 100644 --- a/SQF/dayz_code/old/Readme.txt +++ b/SQF/dayz_code/old/Readme.txt @@ -23,4 +23,5 @@ Folder for old scripts that are no longer used by epoch. All scripts can still b //curTimeStr = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_curTimeStr.sqf"; //fn_niceSpot = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_niceSpot.sqf"; //call compile preprocessFileLineNumbers "\z\addons\dayz_code\old\achievements_init.sqf"; -//fnc_Obj_FenceHandleDam = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fence_handleDam.sqf"; \ No newline at end of file +//fnc_Obj_FenceHandleDam = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fence_handleDam.sqf"; +//call compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_padlock.sqf"; \ No newline at end of file diff --git a/SQF/dayz_code/compile/fn_Padlock.sqf b/SQF/dayz_code/old/fn_Padlock.sqf similarity index 100% rename from SQF/dayz_code/compile/fn_Padlock.sqf rename to SQF/dayz_code/old/fn_Padlock.sqf diff --git a/SQF/dayz_code/actions/object_upgradeStorage.sqf b/SQF/dayz_code/old/object_upgradeStorage.sqf similarity index 100% rename from SQF/dayz_code/actions/object_upgradeStorage.sqf rename to SQF/dayz_code/old/object_upgradeStorage.sqf diff --git a/SQF/dayz_code/actions/object_upgradebuilding.sqf b/SQF/dayz_code/old/object_upgradebuilding.sqf similarity index 100% rename from SQF/dayz_code/actions/object_upgradebuilding.sqf rename to SQF/dayz_code/old/object_upgradebuilding.sqf diff --git a/SQF/dayz_code/actions/player_operate.sqf b/SQF/dayz_code/old/player_operate.sqf similarity index 100% rename from SQF/dayz_code/actions/player_operate.sqf rename to SQF/dayz_code/old/player_operate.sqf diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index 8c5369388..b357257f5 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -112,12 +112,6 @@ check_publishobject = { _allowed = true; }; - //Buildings - if (_object isKindOf "DZ_buildables") then { - _saveObject = "DZ_buildables"; - _allowed = true; - }; - #ifdef OBJECT_DEBUG diag_log format["DEBUG: Object: %1 published by %2 is allowed by %3",_object,_playername,_saveObject]; #endif diff --git a/SQF/dayz_server/system/server_vehicleSync.fsm b/SQF/dayz_server/system/server_vehicleSync.fsm index 564b837a0..ab7d6aa9c 100644 --- a/SQF/dayz_server/system/server_vehicleSync.fsm +++ b/SQF/dayz_server/system/server_vehicleSync.fsm @@ -8,183 +8,128 @@ item3[] = {"true",8,218,-75.000000,250.000000,25.000000,300.000000,0.000000,"tru 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,-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"}; +item7[] = {"prepare",2,4346,-75.000000,-275.000000,25.000000,-225.000000,0.000000,"prepare"}; +item8[] = {"update_objects",2,250,-75.220673,77.428261,24.779324,127.428261,0.000000,"update objects"}; +item9[] = {"Objects_need_upd",4,218,-75.220726,-1.214130,24.779320,48.785873,1.000000,"Objects" \n "need update"}; 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[] = {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}; +link3[] = {3,4}; +link4[] = {4,5}; +link5[] = {5,2}; +link6[] = {6,7}; +link7[] = {7,1}; +link8[] = {8,3}; +link9[] = {9,8}; +globals[] = {0.000000,0,0,0,0,640,480,1,15,6316128,1,-285.818726,406.559204,464.760406,-344.050812,779,910,1}; +window[] = {2,-1,-1,-1,-1,858,130,1459,130,3,797}; *//*%FSM*/ class FSM { - fsmName = "DayZ Server Vehicle Sync"; - class States + fsmName = "DayZ Server Vehicle Sync"; + class States + { + /*%FSM*/ + class init + { + name = "init"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class initialized { - /*%FSM*/ - class init - { - name = "init"; - itemno = 0; - init = /*%FSM*/""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class initialized - { - itemno = 6; - priority = 0.000000; - to="prepare"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"!isnil ""bis_fnc_init"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class waiting - { - name = "waiting"; - itemno = 2; - init = /*%FSM*/""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class FenceObjects_need - { - itemno = 10; - 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 - { - itemno = 9; - priority = 1.000000; - to="update_objects"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"(( (count needUpdate_objects) > 0) && (diag_tickTime -_lastVehicleUpdate> 5) && (!isNil ""sm_done""))"/*%FSM*/; - action=/*%FSM*/"_lastNeedUpdate = diag_tickTime;"/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class prepare - { - name = "prepare"; - itemno = 7; - init = /*%FSM*/"diag_log (""CLEANUP: INITIALIZING Vehicle SCRIPT"");" \n - "" \n - "" \n - "_lastVehicleUpdate = diag_tickTime;" \n - "_lastfenceUpdate = diag_tickTime;" \n - "" \n - "" \n - ""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class true - { - itemno = 1; - priority = 0.000000; - to="waiting"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"true"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class update_objects - { - name = "update_objects"; - itemno = 8; - init = /*%FSM*/"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*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class true - { - itemno = 3; - priority = 0.000000; - to="waiting"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"true"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class update_objects_1 - { - name = "update_objects_1"; - itemno = 11; - init = /*%FSM*/"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*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class true - { - itemno = 3; - priority = 0.000000; - to="waiting"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"true"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ + priority = 0.000000; + to="prepare"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!isnil ""bis_fnc_init"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; }; - initState="init"; - finalStates[] = + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class waiting + { + name = "waiting"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Objects_need_upd { + priority = 1.000000; + to="update_objects"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(( (count needUpdate_objects) > 0) && (diag_tickTime -_lastVehicleUpdate> 5) && (!isNil ""sm_done""))"/*%FSM*/; + action=/*%FSM*/"_lastNeedUpdate = diag_tickTime;"/*%FSM*/; }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class prepare + { + name = "prepare"; + init = /*%FSM*/"diag_log (""CLEANUP: INITIALIZING Vehicle SCRIPT"");" \n + "" \n + "_lastVehicleUpdate = diag_tickTime;" \n + "" \n + "" \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*/ + /*%FSM*/ + class update_objects + { + name = "update_objects"; + init = /*%FSM*/"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*/; + 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*/ + }; + initState="init"; + finalStates[] = + { + }; }; -/*%FSM*/ +/*%FSM*/ \ No newline at end of file