Skip to content

Commit

Permalink
Fix vehicles being loadable with crew inside
Browse files Browse the repository at this point in the history
  • Loading branch information
kymckay committed Dec 21, 2016
1 parent c1fe0cb commit 6169af9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/cargo/functions/fnc_initObject.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ if (_canLoadConfig) then {
private _condition = {
GVAR(enable) &&
{(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad)) == 1])} &&
{(crew _target) isEqualTo []} && // Can't load a vehicle with people inside
{locked _target < 2} &&
{alive _target} &&
{[_player, _target, []] call EFUNC(common,canInteractWith)}
Expand Down

1 comment on commit 6169af9

@PabstMirror
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will block loading AI static weapons.
Might want to use something like
{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0

Please sign in to comment.