init drag/carry options on persons

This commit is contained in:
commy2 2015-03-24 16:12:46 +01:00
parent bdc60c074a
commit 43846970fa
3 changed files with 25 additions and 0 deletions

View File

@ -13,6 +13,11 @@ class Extended_PostInit_EventHandlers {
};
class Extended_Init_EventHandlers {
class CAManBase {
class ADDON {
init = QUOTE(_this call DFUNC(initPerson));
};
};
class StaticWeapon {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));

View File

@ -19,6 +19,7 @@ PREP(handlePlayerChanged);
PREP(handlePlayerWeaponChanged);
PREP(handleScrollWheel);
PREP(initObject);
PREP(initPerson);
PREP(isObjectOnObject);
PREP(setCarryable);
PREP(setDraggable);

View File

@ -0,0 +1,19 @@
/*
* Author: commy2
*
* Initialize variables for drag or carryable persons. Called from init EH.
*
* Argument:
* 0: Any Unit (Object)
*
* Return value:
* NONE.
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
[_unit, true/*, _position, _direction*/] call FUNC(setDraggable);
[_unit, true/*, _position, _direction*/] call FUNC(setCarryable);