Merge pull request #2047 from MikeMatrix/codeCleanupTacticalladder

Code cleanup in Tacticalladder module
This commit is contained in:
Glowbal 2015-08-08 10:57:13 +02:00
commit 02bffce4c4
6 changed files with 24 additions and 24 deletions

View File

@ -9,7 +9,7 @@
* None * None
* *
* Example: * Example:
* [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy; * [_ladder] call ace_tacticalladder_fnc_cancelTLdeploy
* *
* Public: No * 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"] #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; detach _ladder;
_ladder animate ["rotate", 0]; _ladder animate ["rotate", 0];
{ {
_ladder animate [_x, 0]; _ladder animate [_x, 0];
} forEach __ANIMS; } count __ANIMS;
call EFUNC(interaction,hideMouseHint); call EFUNC(interaction,hideMouseHint);
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); [ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);

View File

@ -6,16 +6,16 @@
* 0: ladder <OBJECT> * 0: ladder <OBJECT>
* *
* Return Value: * Return Value:
* Success? * Success <BOOL>
* *
* Example: * Example:
* [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy; * [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy
* *
* Public: No * Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_ladder); params ["_ladder"];
private ["_pos1", "_pos2"]; private ["_pos1", "_pos2"];
_pos1 = getPosASL GVAR(ladder); _pos1 = getPosASL GVAR(ladder);

View File

@ -3,13 +3,13 @@
* Deploy tactical ladder * Deploy tactical ladder
* *
* Arguments: * Arguments:
* Nothing * None
* *
* Return Value: * Return Value:
* Nothing * None
* *
* Example: * Example:
* call ace_tacticalladder_fnc_deployTL; * [] call ace_tacticalladder_fnc_deployTL
* *
* Public: No * Public: No
*/ */

View File

@ -9,13 +9,13 @@
* Handled <BOOL> * Handled <BOOL>
* *
* Example: * Example:
* 1 call ace_tacticalladder_fnc_handleScrollWheel; * [1] call ace_tacticalladder_fnc_handleScrollWheel;
* *
* Public: No * Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_scroll); params ["_scroll"];
if (isNull GVAR(ladder)) exitWith { false }; if (isNull GVAR(ladder)) exitWith { false };

View File

@ -7,10 +7,10 @@
* 1: unit <OBJECT> * 1: unit <OBJECT>
* *
* Return Value: * Return Value:
* Success? * Success <BOOL>
* *
* Example: * Example:
* [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL; * [_ladder, _unit] call ace_tacticalladder_fnc_pickupTL
* *
* Public: No * Public: No
*/ */
@ -18,7 +18,7 @@
if ((backpack ACE_player) != "") exitWith { false }; if ((backpack ACE_player) != "") exitWith { false };
PARAMS_2(_ladder,_unit); params ["_ladder", "_unit"];
deleteVehicle _ladder; deleteVehicle _ladder;
_unit addBackpack "ACE_TacticalLadder_Pack"; _unit addBackpack "ACE_TacticalLadder_Pack";

View File

@ -10,7 +10,7 @@
* None * None
* *
* Example: * Example:
* [_ladder, _unit] call ace_tacticalladder_fnc_positionTL; * [_ladder, _unit] call ace_tacticalladder_fnc_positionTL
* *
* Public: No * 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"] #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]; _ladder animate [_x, 0];
} forEach __ANIMS; } count __ANIMS;
_unit switchMove "amovpercmstpslowwrfldnon_player_idlesteady03"; _unit switchMove "amovpercmstpslowwrfldnon_player_idlesteady03";
_ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of player _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 ["rotate", 0];
{ {
_ladder animate [_x, 1]; _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(ladder) = _ladder;
GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling