Skip to content

Commit 32dd70d

Browse files
authored
Vehicles - Handle vanilla auto-throttle (#11275)
1 parent 53e6d09 commit 32dd70d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

addons/vehicles/functions/fnc_autoThrottle.sqf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ private _airData = [_thrustLogFactor, _maxSpeed, _acceleration, _thrustCoefs, _t
8585

8686
private _currentThrottle = (airplaneThrottle _vehicle) ^ _throttleLogValue;
8787
if (_lastThrottleValue != -1 && { EPSILON < abs (_currentThrottle - _lastThrottleValue) }) then {
88+
if (dialog) exitWith { // setAirplaneThrottle changes won't be respected when in a dialog and would force an exit
89+
_args set [3, -1]; // reset so it can restart when dialog closed
90+
};
8891
// player/script has moved throttle, stop limiting speed
8992
// ARMA will allow an increment of one throttle unit per frame, so if there is a difference between our known throttle value and actual throttle value, the player must of changed it
9093
[localize LSTRING(Off)] call EFUNC(common,displayTextStructured);

0 commit comments

Comments
 (0)