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.
This commit is contained in:
Rebel 2016-10-30 14:33:28 +02:00 committed by commy2
parent 6a7998d47d
commit e84cdef817

View File

@ -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;