From 65c2a7e6b44cb0da35a3cf9afc70b83e5db4e9a8 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 18 Feb 2016 19:38:23 -0500 Subject: [PATCH] Fix opening supply crate over water See #1558 --- CHANGE LOG 1.0.6.txt | 2 ++ SQF/dayz_code/actions/player_craftItem.sqf | 5 ++++- SQF/dayz_code/actions/player_loadCrate.sqf | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index 33ffdd222..fead8e821 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -36,6 +36,8 @@ [FIXED] Loading screen issue where you can walk around and see a black screen #1610 @deanreid [FIXED] Crafting a sledgehammer with one already in your toolbelt no longer eats your parts. #1567 #1667 @Namindu [FIXED] DarkUI hunger and thirst inconsistency with vanilla UI and health system @SplenectomY @icomrade #1622 +[FIXED] Fire barrels not being detected over water @pj999 @icomrade #1559 +[FIXED] Opening supply crates over water no longer drops the items on the sea floor @pj999 @icomrade #1558 [UPDATED] .hpp files updated in dayz_epoch_b CfgLootPos > CfgBuildingPos. @Uro1 [UPDATED] .bat files updated in Config-Examples @Raziel23x diff --git a/SQF/dayz_code/actions/player_craftItem.sqf b/SQF/dayz_code/actions/player_craftItem.sqf index 3ce42871a..989d82dfb 100644 --- a/SQF/dayz_code/actions/player_craftItem.sqf +++ b/SQF/dayz_code/actions/player_craftItem.sqf @@ -229,7 +229,10 @@ if (_canDo) then { _bag addWeaponCargoGlobal [_x,1]; } else { systemChat format[(localize "str_epoch_player_314"),_x]; - _object = createVehicle ["WeaponHolder",position player,[],0,"CAN_COLLIDE"]; + _location = player modeltoworld [0,0.3,0]; + if ((_location select 2) < 0) then {_location set [2,0];}; + _object = createVehicle ["WeaponHolder",_location,[],0,"CAN_COLLIDE"]; + if (surfaceIsWater _location) then {_object setPosASL (getPosASL player);} else {_object setPosATL _location;}; _object setVariable ["permaLoot",true]; _object addWeaponCargoGlobal [_x,1]; }; diff --git a/SQF/dayz_code/actions/player_loadCrate.sqf b/SQF/dayz_code/actions/player_loadCrate.sqf index 3a1e80252..df3c6e8c8 100644 --- a/SQF/dayz_code/actions/player_loadCrate.sqf +++ b/SQF/dayz_code/actions/player_loadCrate.sqf @@ -54,7 +54,7 @@ if(_type == "backpack") then { _b0x1337 addBackpackCargoGlobal [_create,_qty]; }; if (surfaceIsWater _location) then { - _b0x1337 setPosASL _location; + _b0x1337 setPosASL (getPosASL player); } else { _b0x1337 setPosATL _location; };