diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index d80a20db8..210a5599c 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -81,7 +81,5 @@ if (_hasrequireditem and DZE_ActionInProgress) then { _dir = _controls select 3; //int //Publish item to a database - if (!DZE_cancelBuilding) then { //double check that building was not cancelled externally - [_cancel, _position, _classnametmp,_isAllowedUnderGround, _text, _isPole, _lockable,_dir, _reason] call player_build_publish; - }; + [_cancel, _position, _classnametmp,_isAllowedUnderGround, _text, _isPole, _lockable,_dir, _reason] call player_build_publish; }; diff --git a/SQF/dayz_code/actions/snap_build.sqf b/SQF/dayz_code/actions/snap_build.sqf index 88a2f32ba..ba3d8850a 100644 --- a/SQF/dayz_code/actions/snap_build.sqf +++ b/SQF/dayz_code/actions/snap_build.sqf @@ -59,7 +59,7 @@ fnc_initSnapPoints = { fnc_initSnapPointsNearby = { _pos = getPosATL _object; _findWhitelisted = []; _pointsNearby = []; - _findWhitelisted = nearestObjects [_pos,_whitelist,_radius]-[_object]; + _findWhitelisted = nearestObjects [_pos,_whitelist,(_radius + DZE_snapExtraRange)]-[_object]; snapGizmosNearby = []; { _nearbyObject = _x; @@ -242,7 +242,7 @@ switch (snapActionState) do { [1,0,0] call fnc_snapActionCleanup; [] spawn { while {true} do { - if(!DZE_ActionInProgress) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";}; + if(!DZE_ActionInProgress || DZE_cancelBuilding) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";}; sleep 2; }; }; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 85a982f8d..c345e790b 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -548,6 +548,9 @@ if (isNil "helperDetach") then { if (isNil "DZE_modularBuild") then { DZE_modularBuild = false; }; +if (isNil "DZE_snapExtraRange") then { + DZE_snapExtraRange = 0; +}; // needed on server if(isNil "DZE_PlotPole") then {