mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
bug fix & adjustable snap range
This commit is contained in:
@@ -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;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user