bug fix & adjustable snap range

This commit is contained in:
raymix
2014-08-08 13:30:25 +01:00
parent 73470f1e90
commit 176c0372b4
3 changed files with 6 additions and 5 deletions

View File

@@ -81,7 +81,5 @@ if (_hasrequireditem and DZE_ActionInProgress) then {
_dir = _controls select 3; //int _dir = _controls select 3; //int
//Publish item to a database //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;
};
}; };

View File

@@ -59,7 +59,7 @@ fnc_initSnapPoints = {
fnc_initSnapPointsNearby = { fnc_initSnapPointsNearby = {
_pos = getPosATL _object; _pos = getPosATL _object;
_findWhitelisted = []; _pointsNearby = []; _findWhitelisted = []; _pointsNearby = [];
_findWhitelisted = nearestObjects [_pos,_whitelist,_radius]-[_object]; _findWhitelisted = nearestObjects [_pos,_whitelist,(_radius + DZE_snapExtraRange)]-[_object];
snapGizmosNearby = []; snapGizmosNearby = [];
{ {
_nearbyObject = _x; _nearbyObject = _x;
@@ -242,7 +242,7 @@ switch (snapActionState) do {
[1,0,0] call fnc_snapActionCleanup; [1,0,0] call fnc_snapActionCleanup;
[] spawn { [] spawn {
while {true} do { 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; sleep 2;
}; };
}; };

View File

@@ -548,6 +548,9 @@ if (isNil "helperDetach") then {
if (isNil "DZE_modularBuild") then { if (isNil "DZE_modularBuild") then {
DZE_modularBuild = false; DZE_modularBuild = false;
}; };
if (isNil "DZE_snapExtraRange") then {
DZE_snapExtraRange = 0;
};
// needed on server // needed on server
if(isNil "DZE_PlotPole") then { if(isNil "DZE_PlotPole") then {