From e84cdef8172c0d941b904b1ce23977c849723e12 Mon Sep 17 00:00:00 2001 From: Rebel Date: Sun, 30 Oct 2016 14:33:28 +0200 Subject: [PATCH] Blocks AI getting back into the vehicle on cookoff (#4587) * no message * Header. * Typo. * Less code. * New getPos syntax. * leaveVehicle seems to work. * Removed the second waypoint. * Clear previous waypoints. * Run away waypoint before others. * Use arr select code * Revert select. Use doMove. --- addons/cookoff/functions/fnc_cookOff.sqf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/cookoff/functions/fnc_cookOff.sqf b/addons/cookoff/functions/fnc_cookOff.sqf index 890bbff557..7ae36670ac 100644 --- a/addons/cookoff/functions/fnc_cookOff.sqf +++ b/addons/cookoff/functions/fnc_cookOff.sqf @@ -9,7 +9,7 @@ * None * * Example: - * (vehicle player) call ace_cookoff_fnc_cookOff + * [(vehicle player)] call ace_cookoff_fnc_cookOff * * Public: No */ @@ -113,9 +113,12 @@ if (local _vehicle) then { [_vehicle, _fnc_FlameEffect, 12] call _fnc_FlameEffect; // recursive function + private _randomPosition = _vehicle getPos [100, random 360]; + { if (local _x && {!(_x call EFUNC(common,isPlayer))}) then { - _x action ["Eject", _vehicle]; + _x leaveVehicle _vehicle; + _x doMove _randomPosition; }; } forEach crew _vehicle;