posible fix for overlapping Speedlimiters

This commit is contained in:
jokoho48 2015-11-27 15:48:03 +01:00
parent 5f2840bf39
commit 76435ec228
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
#include "script_component.hpp" #include "script_component.hpp"
if (!hasInterface) exitWith {}; if (!hasInterface) exitWith {};
GVAR(isSpeedLimiter) = false;
// Add keybinds // Add keybinds
["ACE3 Vehicles", QGVAR(speedLimiter), localize LSTRING(SpeedLimiter), ["ACE3 Vehicles", QGVAR(speedLimiter), localize LSTRING(SpeedLimiter),
{ {

View File

@ -20,7 +20,7 @@ private "_maxSpeed";
params ["_driver", "_vehicle"]; params ["_driver", "_vehicle"];
if (GETGVAR(isSpeedLimiter,false)) exitWith { if (GVAR(isSpeedLimiter)) exitWith {
[localize LSTRING(Off)] call EFUNC(common,displayTextStructured); [localize LSTRING(Off)] call EFUNC(common,displayTextStructured);
playSound "ACE_Sound_Click"; playSound "ACE_Sound_Click";
GVAR(isSpeedLimiter) = false; GVAR(isSpeedLimiter) = false;
@ -38,7 +38,7 @@ _maxSpeed = speed _vehicle max 10;
if (GVAR(isUAV)) then { if (GVAR(isUAV)) then {
private _uavControll = UAVControl _vehicle; private _uavControll = UAVControl _vehicle;
if ((_uavControll select 0) != _driver) then { if ((_uavControll select 0) != _driver || _uavControll select 1 != "DRIVER") then {
GVAR(isSpeedLimiter) = false; GVAR(isSpeedLimiter) = false;
}; };
} else { } else {