diff --git a/SQF/dayz_code/actions/object_upgradeStorage.sqf b/SQF/dayz_code/actions/object_upgradeStorage.sqf index 5c68cdcb5..b26c0aa88 100644 --- a/SQF/dayz_code/actions/object_upgradeStorage.sqf +++ b/SQF/dayz_code/actions/object_upgradeStorage.sqf @@ -128,9 +128,9 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then { _backpacks = getBackpackCargo _cursorTarget; //remove old tent - PVDZ_obj_Destroy = [_objectID,_objectUID,player,_cursorTarget,dayz_authKey]; + PVDZ_obj_Destroy = [_objectID,_objectUID,player,_pos,dayz_authKey,false]; publicVariableServer "PVDZ_obj_Destroy"; - //deleteVehicle _cursorTarget; + deleteVehicle _cursorTarget; // remove parts from players inventory before creation of new tent. { diff --git a/SQF/dayz_code/actions/object_upgradebuilding.sqf b/SQF/dayz_code/actions/object_upgradebuilding.sqf index 5f706cf44..97517819d 100644 --- a/SQF/dayz_code/actions/object_upgradebuilding.sqf +++ b/SQF/dayz_code/actions/object_upgradebuilding.sqf @@ -8,7 +8,7 @@ */ private ["_nearByChoppers","_cursorTarget","_type","_class","_requiredTools","_requiredParts","_upgradeType","_producedParts","_randomCreate", - "_upgradeClass","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_objectID","_objectUID", + "_upgradeClass","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_objectID","_objectUID","_playerNear", "_ownerArray","_ownerPasscode","_dir","_vector","_object","_puid","_clanArray","_wh","_variables","_finished"]; _cursorTarget = _this; @@ -42,6 +42,9 @@ _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animatio _isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming; if(_isWater or _onLadder) exitWith { localize "str_water_ladder_cant_do" call dayz_rollingMessages; }; +_playerNear = {isPlayer _x} count (([_cursorTarget] call fnc_getPos) nearEntities ["CAManBase",10]) > 1; +if (_playerNear) exitWith { localize "str_pickup_limit_5" call dayz_rollingMessages; }; + // lets check player has requiredTools for upgrade _ok = true; _missing = ""; @@ -72,9 +75,6 @@ if (!_ok) exitWith { format [localize "str_upgradeMissingPart", _missing] call dayz_rollingMessages; }; -_PlayerNear = {isPlayer _x} count (([_cursorTarget] call FNC_GetPos) nearEntities ["CAManBase", 10]) > 1; -if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages;}; - if (dayz_actionInProgress) exitWith { { player addMagazine _x; } forEach _upgradeParts; localize "str_player_actionslimit" call dayz_rollingMessages; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index c68b129fd..a5b0de1e2 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -152,11 +152,12 @@ if (_proceed && _success) then { _ipos = getPosATL _obj; if(!_isWreck && !_isWreckBuilding) then { + //Server performs deleteVehicle PVDZ_obj_Destroy = [_objectID,_objectUID,player,_obj,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; + } else { + deleteVehicle _obj; }; - - //deleteVehicle _obj; if (_isWreckBuilding) then { PVDZ_send = [player,"RemoveObject",_ipos]; @@ -262,7 +263,6 @@ if (_proceed && _success) then { localize "str_epoch_player_91" call dayz_rollingMessages; }; }; -dayz_actionInProgress = false; -s_player_deleteBuild = -1; -_obj +dayz_actionInProgress = false; +s_player_deleteBuild = -1; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_packTent.sqf b/SQF/dayz_code/compile/player_packTent.sqf index 377211e1d..e701922ff 100644 --- a/SQF/dayz_code/compile/player_packTent.sqf +++ b/SQF/dayz_code/compile/player_packTent.sqf @@ -53,9 +53,9 @@ if (_ownerID in [dayz_characterID,dayz_playerUID] or typeOf _obj in _campItems) _magazines = getMagazineCargo _obj; _backpacks = getBackpackCargo _obj; - PVDZ_obj_Destroy = [_objectID,_objectUID,player,_obj,dayz_authKey]; + PVDZ_obj_Destroy = [_objectID,_objectUID,player,_pos,dayz_authKey,false]; publicVariableServer "PVDZ_obj_Destroy"; - //deleteVehicle _obj; + deleteVehicle _obj; //Add weapons _objWpnTypes = _weapons select 0;