mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed script errors in limit speed functions (missing [)
This commit is contained in:
parent
38947ba669
commit
d42b83947d
addons/common/functions
@ -17,25 +17,25 @@ if (count _this > 1) then {
|
|||||||
_fallDown = _this select 1;
|
_fallDown = _this select 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((_vehicle getvariable [QGVAR(limitMovementSpeed),false])) exitwith {
|
if ((_unit getvariable [QGVAR(limitMovementSpeed),false])) exitwith {
|
||||||
_vehicle setvariable [QGVAR(limitMovementSpeed),nil,true];
|
_unit setvariable [QGVAR(limitMovementSpeed),nil,true];
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
[{
|
||||||
private["_unit","_fallDown","_carriedObj"];
|
private["_unit","_fallDown","_carriedObj"];
|
||||||
_unit = (_this select 0) select 0;
|
_unit = (_this select 0) select 0;
|
||||||
_fallDown = (_this select 0) select 1;
|
_fallDown = (_this select 0) select 1;
|
||||||
|
|
||||||
_carriedObj = [_unit] call FUNC(getCarriedObj)
|
_carriedObj = [_unit] call FUNC(getCarriedObj);
|
||||||
|
|
||||||
if !(_vehicle getvariable [QGVAR(limitMovementSpeed),false]) exitwith {
|
if !(_unit getvariable [QGVAR(limitMovementSpeed),false]) exitwith {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
if !((!isNull _carriedObj) && (alive _unit)) exitwith {
|
if !((!isNull _carriedObj) && (alive _unit)) exitwith {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (speed _unit > 12 && vehicle _unit == _unit && isTouchingGround) then {
|
if (speed _unit > 12 && vehicle _unit == _unit && isTouchingGround _unit) then {
|
||||||
|
|
||||||
_unit setVelocity [0,0,0];
|
_unit setVelocity [0,0,0];
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ if ((_vehicle getvariable [QGVAR(limitSpeed_f),false])) then {
|
|||||||
if (_maxSpeed < 0) exitwith {};
|
if (_maxSpeed < 0) exitwith {};
|
||||||
_vehicle setvariable [QGVAR(limitSpeed_f),true,true];
|
_vehicle setvariable [QGVAR(limitSpeed_f),true,true];
|
||||||
|
|
||||||
{
|
[{
|
||||||
private["_vehicle","_maxSpeed","_speed","_x","_y","_z", "_diff","_percentage","_newVelocity","_velocity"];
|
private["_vehicle","_maxSpeed","_speed","_x","_y","_z", "_diff","_percentage","_newVelocity","_velocity"];
|
||||||
_vehicle = (_this select 0) select 0;
|
_vehicle = (_this select 0) select 0;
|
||||||
_maxSpeed = (_this select 0) select 1;
|
_maxSpeed = (_this select 0) select 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user