mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Quickmount - optimize subActions (#6883)
This commit is contained in:
parent
711e9073a8
commit
2ea029c219
@ -43,7 +43,7 @@ class CfgVehicles {
|
|||||||
condition = QUOTE(call DFUNC(canShowFreeSeats)); \
|
condition = QUOTE(call DFUNC(canShowFreeSeats)); \
|
||||||
statement = QUOTE(call DFUNC(getInNearest)); \
|
statement = QUOTE(call DFUNC(getInNearest)); \
|
||||||
exceptions[] = {"isNotSwimming"}; \
|
exceptions[] = {"isNotSwimming"}; \
|
||||||
insertChildren = QUOTE(call DFUNC(addFreeSeatsActions)); \
|
insertChildren = QUOTE((_this select 2) param [ARR_2(0, [])]); \
|
||||||
}; \
|
}; \
|
||||||
}; \
|
}; \
|
||||||
}; \
|
}; \
|
||||||
@ -52,7 +52,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(ChangeSeat); \
|
displayName = CSTRING(ChangeSeat); \
|
||||||
condition = QUOTE(call DFUNC(canShowFreeSeats)); \
|
condition = QUOTE(call DFUNC(canShowFreeSeats)); \
|
||||||
statement = ""; \
|
statement = ""; \
|
||||||
insertChildren = QUOTE(call DFUNC(addFreeSeatsActions)); \
|
insertChildren = QUOTE((_this select 2) param [ARR_2(0, [])]); \
|
||||||
}; \
|
}; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Vehicle <OBJECT>
|
* 0: Vehicle <OBJECT>
|
||||||
* 1: Unit <OBJECT>
|
* 1: Unit <OBJECT>
|
||||||
|
* 2: Args <ARRAY>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Can show menu <BOOL>
|
* Can show menu <BOOL>
|
||||||
@ -16,8 +17,9 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_vehicle", "_unit"];
|
params ["_vehicle", "_unit", "_args"];
|
||||||
|
|
||||||
|
_args set [0, []];
|
||||||
private _isInVehicle = _unit in _vehicle;
|
private _isInVehicle = _unit in _vehicle;
|
||||||
|
|
||||||
GVAR(enabled)
|
GVAR(enabled)
|
||||||
@ -36,4 +38,8 @@ GVAR(enabled)
|
|||||||
0.3 < vectorUp _vehicle select 2 // moveIn* and GetIn* don't work for flipped vehicles
|
0.3 < vectorUp _vehicle select 2 // moveIn* and GetIn* don't work for flipped vehicles
|
||||||
|| {_vehicle isKindOf "Air"} // except Air
|
|| {_vehicle isKindOf "Air"} // except Air
|
||||||
}
|
}
|
||||||
&& {!([] isEqualTo (_this call FUNC(addFreeSeatsActions)))} // this should be replaced with faster function
|
&& {
|
||||||
|
private _subActions = _this call FUNC(addFreeSeatsActions);
|
||||||
|
_args set [0, _subActions];
|
||||||
|
!([] isEqualTo _subActions)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user