From 2ee06afea7bd9fc7dbd23041ad66f477e3fab566 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Wed, 5 Oct 2016 17:24:10 -0400 Subject: [PATCH] Sync chopped down trees for JIP players Vanilla commit: https://github.com/DayZMod/DayZ/commit/a57478fb1aac015926b25a6b108fabe5935efce9 --- CHANGE LOG 1.0.6.txt | 1 + SQF/dayz_code/init/publicEH.sqf | 6 +++--- SQF/dayz_code/init/variables.sqf | 1 + SQF/dayz_server/compile/server_playerLogin.sqf | 3 +++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index dad9f2692..29b948d8c 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -116,6 +116,7 @@ [FIXED] It is no longer possible to drag players through base walls when they are unconscious. @icomrade [FIXED] Purchased vehicles should no longer spawn inside each other on trader helipads. @icomrade [FIXED] Humanity hit is now applied correctly to players shooting from vehicles. @ebaydayz +[FIXED] Chopped down trees are now synced for JIP players, so they no longer respawn on relog. @ebaydayz [UPDATED] .hpp files updated in dayz_code\Configs\CfgLoot\CfgBuildingPos. @Uro1 [UPDATED] .bat files updated in Config-Examples @Raziel23x diff --git a/SQF/dayz_code/init/publicEH.sqf b/SQF/dayz_code/init/publicEH.sqf index e0184525b..970e135f6 100644 --- a/SQF/dayz_code/init/publicEH.sqf +++ b/SQF/dayz_code/init/publicEH.sqf @@ -157,15 +157,15 @@ if (isServer) then { _tree = (_this select 1) select 0; _player = (_this select 1) select 1; _dis = _player distance _tree; - _name = if (alive _player) then {name _player} else {"unknown"}; + _name = if (alive _player) then {name _player} else {"DeadPlayer"}; _uid = getPlayerUID _player; _treeModel = _tree call fn_getModelName; if ((_dis < 30) && (_treeModel in dayz_trees) && (_uid != "")) then { _tree setDamage 1; - deleteVehicle _tree; + dayz_choppedTrees set [count dayz_choppedTrees,_tree]; diag_log format["Server setDamage on tree %1 chopped down by %2(%3)",_treeModel,_name,_uid]; - }; + }; }; "PVDZ_serverStoreVar" addPublicVariableEventHandler { diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 80bc42dfa..26ea14318 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -580,6 +580,7 @@ if (isServer) then { DayZ_removableObjects = ["Wire_cat1","Sandbag1_DZ","Hedgehog_DZ","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"]; //[10416.695, 4198.4634],[7982.2563, 1419.8256],[10795.93, 1419.8263],[7966.083, 4088.7463],[9259.7266, 2746.1985],[5200.5234, 3915.3274],[6494.1665, 2572.7798],[5216.6968, 1246.407],[2564.7244, 3915.3296],[3858.3674, 2572.782],[2580.8977, 1246.4092],[13398.995, 4400.5874],[12242.025, 2948.3196],[13551.842, 1832.2257],[14870.512, 3009.5117],[-178.19415, 1062.4478],[1099.2754, 2388.8206],[-194.36755, 3731.3679],[10394.215, 8322.1719],[7959.7759, 5543.5342],[10773.449, 5543.5342], dayz_grid =[[7943.6025, 8212.4551],[9237.2461, 6869.9063],[5178.043, 8039.0361],[6471.686, 6696.4883],[5194.2163, 5370.1152],[2542.2439, 8039.0381],[3835.887, 6696.4902],[2558.4172, 5370.1172],[13376.514, 8524.2969],[12219.544, 7072.0273],[13529.361, 5955.9336],[14848.032, 7133.2197],[-200.67474, 5186.1563],[1076.7949, 6512.5283],[-216.84814, 7855.0771],[10293.751, 12197.736],[7859.312, 9419.0996],[10672.988, 9419.0996],[7843.1387, 12088.021],[9136.7822, 10745.474],[5077.5791, 11914.601],[6371.2222, 10572.052],[5093.7524, 9245.6816],[2441.78, 11914.604],[3735.4231, 10572.055],[2457.9534, 9245.6816],[13276.053, 12399.861],[12119.08, 10947.596],[13428.897, 9831.501],[14747.566, 11008.786],[-301.13867, 9061.7207],[976.33112, 10388.096],[-317.31201, 11730.642],[10271.271, 16321.429],[7836.8315, 13542.813],[10650.506, 13542.813],[7820.6582, 16211.718],[9114.3018, 14869.175],[5055.0986, 16038.3],[6348.7417, 14695.758],[5071.272, 13369.392],[2419.2996, 16038.305],[3712.9426, 14695.76],[2435.4729, 13369.392],[13253.568, 16523.553],[12096.6, 15071.295],[13406.416, 13955.209],[14725.089, 15132.486],[-323.61914, 13185.43],[953.85059, 14511.8],[-339.79248, 15854.346]]; + dayz_choppedTrees = []; dayz_deseedloot = []; dayz_ghostPlayers = []; dayz_activePlayers = []; diff --git a/SQF/dayz_server/compile/server_playerLogin.sqf b/SQF/dayz_server/compile/server_playerLogin.sqf index 4bf3dc907..24eee97ef 100644 --- a/SQF/dayz_server/compile/server_playerLogin.sqf +++ b/SQF/dayz_server/compile/server_playerLogin.sqf @@ -145,6 +145,9 @@ if (_endMission) exitwith { (owner _playerObj) publicVariableClient "PVCDZ_plr_Ghost"; }; +//Sync chopped trees for JIP player +{_x setDamage 1} count dayz_choppedTrees; + //Record Player Login/LogOut [_playerID,_charID,1,_playerName] call dayz_recordLogin;