2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-02-28 05:12:54 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Handles the climb animation finishing. Called from "AnimDone" event handler.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit (usually the player) <OBJECT>
|
|
|
|
* 1: The finisehd animation <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-02-28 05:12:54 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player, "ACE_climb"] call ace_movement_fnc_handleClimb
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2016-01-06 21:42:02 +00:00
|
|
|
params ["_unit", "_anim"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2016-01-06 21:42:02 +00:00
|
|
|
private _pos = _unit modelToWorldVisual (_unit selectionPosition "camera");
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-18 05:45:28 +00:00
|
|
|
[_unit, "AmovPknlMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
_pos = _pos vectorDiff (_unit selectionPosition "camera");
|
|
|
|
|
2017-11-21 01:00:21 +00:00
|
|
|
_unit setPosASL (AGLtoASL _pos);
|
|
|
|
TRACE_2("",AGLtoASL _pos,getPosASL _unit);
|