Remove maximum distance of attach to vehicle action (#5262)

* 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
This commit is contained in:
jonpas 2017-06-09 14:54:58 +02:00 committed by GitHub
parent 847832c118
commit 33e4e6cd11
2 changed files with 3 additions and 5 deletions

View File

@ -10,7 +10,6 @@
showDisabled = 0; \
priority = 0; \
icon = QPATHTOF(UI\attach_ca.paa); \
distance = 4.5; \
}; \
class GVAR(DetachVehicle) { \
displayName = CSTRING(Detach); \
@ -20,7 +19,6 @@
showDisabled = 0; \
priority = 0.1; \
icon = QPATHTOF(UI\detach_ca.paa); \
distance = 4.5; \
}; \
}; \
};

View File

@ -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) + [""])};