mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2047 from MikeMatrix/codeCleanupTacticalladder
Code cleanup in Tacticalladder module
This commit is contained in:
commit
02bffce4c4
@ -9,7 +9,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy;
|
||||
* [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -17,13 +17,13 @@
|
||||
|
||||
#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"]
|
||||
|
||||
PARAMS_1(_ladder);
|
||||
params ["_ladder"];
|
||||
|
||||
detach _ladder;
|
||||
_ladder animate ["rotate", 0];
|
||||
{
|
||||
_ladder animate [_x, 0];
|
||||
} forEach __ANIMS;
|
||||
} count __ANIMS;
|
||||
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
|
@ -6,16 +6,16 @@
|
||||
* 0: ladder <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Success?
|
||||
* Success <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy;
|
||||
* [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_ladder);
|
||||
params ["_ladder"];
|
||||
|
||||
private ["_pos1", "_pos2"];
|
||||
_pos1 = getPosASL GVAR(ladder);
|
||||
|
@ -3,13 +3,13 @@
|
||||
* Deploy tactical ladder
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_tacticalladder_fnc_deployTL;
|
||||
* [] call ace_tacticalladder_fnc_deployTL
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
@ -9,13 +9,13 @@
|
||||
* Handled <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* 1 call ace_tacticalladder_fnc_handleScrollWheel;
|
||||
* [1] call ace_tacticalladder_fnc_handleScrollWheel;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_scroll);
|
||||
params ["_scroll"];
|
||||
|
||||
if (isNull GVAR(ladder)) exitWith { false };
|
||||
|
||||
|
@ -7,10 +7,10 @@
|
||||
* 1: unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Success?
|
||||
* Success <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL;
|
||||
* [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
if ((backpack ACE_player) != "") exitWith { false };
|
||||
|
||||
PARAMS_2(_ladder,_unit);
|
||||
params ["_ladder", "_unit"];
|
||||
|
||||
deleteVehicle _ladder;
|
||||
_unit addBackpack "ACE_TacticalLadder_Pack";
|
||||
|
@ -10,7 +10,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [_ladder, _unit] call ace_tacticalladder_fnc_positionTL;
|
||||
* [_ladder, _unit] call ace_tacticalladder_fnc_positionTL
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -18,11 +18,11 @@
|
||||
|
||||
#define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"]
|
||||
|
||||
PARAMS_2(_ladder,_unit);
|
||||
params ["_ladder", "_unit"];
|
||||
|
||||
{
|
||||
_ladder animate [_x, 0];
|
||||
} forEach __ANIMS;
|
||||
} count __ANIMS;
|
||||
|
||||
_unit switchMove "amovpercmstpslowwrfldnon_player_idlesteady03";
|
||||
_ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of player
|
||||
@ -30,7 +30,7 @@ _ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of playe
|
||||
_ladder animate ["rotate", 0];
|
||||
{
|
||||
_ladder animate [_x, 1];
|
||||
} forEach ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3)
|
||||
} count ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3)
|
||||
|
||||
GVAR(ladder) = _ladder;
|
||||
GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling
|
||||
|
Loading…
Reference in New Issue
Block a user