mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
maybe fix for #741, Speedlimiter locking vehicle controls
This commit is contained in:
parent
4a76b0e5c9
commit
370e6bd9a7
@ -35,7 +35,7 @@ _maxSpeed = speed _vehicle max 10;
|
|||||||
_speed = speed _vehicle;
|
_speed = speed _vehicle;
|
||||||
|
|
||||||
if (_speed > _maxSpeed) then {
|
if (_speed > _maxSpeed) then {
|
||||||
_vehicle setVelocity ((velocity _vehicle) vectorMultiply (_maxSpeed / _speed));
|
_vehicle setVelocity ((velocity _vehicle) vectorMultiply ((_maxSpeed / _speed) - 0.00001)); // fix 1.42-hotfix PhysX libraries applying force in previous direction when turning
|
||||||
};
|
};
|
||||||
|
|
||||||
} , 0, [_driver, _vehicle, _maxSpeed]] call CBA_fnc_addPerFrameHandler;
|
} , 0, [_driver, _vehicle, _maxSpeed]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
Loading…
Reference in New Issue
Block a user