maybe fix for #741, Speedlimiter locking vehicle controls

This commit is contained in:
commy2 2015-04-18 17:42:13 +02:00
parent 4a76b0e5c9
commit 370e6bd9a7

View File

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