Fix opening supply crate over water

See #1558
This commit is contained in:
ebaydayz
2016-02-18 19:38:23 -05:00
parent 7a1058cb6d
commit 65c2a7e6b4
3 changed files with 7 additions and 2 deletions

View File

@@ -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

View File

@@ -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];
};

View File

@@ -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;
};