Skip to content

Commit

Permalink
Remove maximum distance of attachi to vehicle action
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpas committed Jun 8, 2017
1 parent 847832c commit a03db00
Show file tree
Hide file tree
Showing 2 changed files with 2 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
5 changes: 2 additions & 3 deletions addons/attach/functions/fnc_canAttach.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ _attachLimit = [6, 1] select (_player == _attachToVehicle);
_attachedObjects = _attachToVehicle getVariable [QGVAR(attached), []];

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

1 comment on commit a03db00

@PabstMirror
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

canAttach is called from multiple places,
It was used to detect when the player moved away from the vehicle and to end the placement system (fnc_attach.sqf:87)

Please sign in to comment.