Skip to content

Commit

Permalink
Remove maximum distance of attach to vehicle action (#5262)
Browse files Browse the repository at this point in the history
* Remove maximum distance of attachi to vehicle action

* Readd max distance, 10 meters to allow usage with big vehicles but also end placement system if too far
  • Loading branch information
jonpas authored Jun 9, 2017
1 parent 847832c commit 33e4e6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions addons/attach/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
showDisabled = 0; \
priority = 0; \
icon = QPATHTOF(UI\attach_ca.paa); \
distance = 4.5; \
}; \
class GVAR(DetachVehicle) { \
displayName = CSTRING(Detach); \
Expand All @@ -20,7 +19,6 @@
showDisabled = 0; \
priority = 0.1; \
icon = QPATHTOF(UI\detach_ca.paa); \
distance = 4.5; \
}; \
}; \
};
Expand Down
6 changes: 3 additions & 3 deletions addons/attach/functions/fnc_canAttach.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ _attachLimit = [6, 1] select (_player == _attachToVehicle);
_attachedObjects = _attachToVehicle getVariable [QGVAR(attached), []];

((_player == _attachToVehicle) || {canStand _player}) &&
{(_attachToVehicle distance _player) < 7} &&
{alive _attachToVehicle} &&
{(count _attachedObjects) < _attachLimit} &&
{(_attachToVehicle distance _player) < 10} &&
{alive _attachToVehicle} &&
{(count _attachedObjects) < _attachLimit} &&
{_itemClassname in ((itemsWithMagazines _player) + [""])};

0 comments on commit 33e4e6c

Please sign in to comment.