Make sure object actions are set.

This commit is contained in:
Nou 2015-01-28 10:18:19 -08:00
parent ef94011cdc
commit 8e9883a111

View File

@ -29,6 +29,9 @@ _distance = _this select 6;
_actions = []; _actions = [];
if(IS_OBJECT(_object)) then { if(IS_OBJECT(_object)) then {
_actions = _object getVariable [QUOTE(GVAR(actionData)), []]; _actions = _object getVariable [QUOTE(GVAR(actionData)), []];
if((count _actions) == 0) then {
_object setVariable [QUOTE(GVAR(actionData)), _actions]
};
} else { } else {
if(IS_ARRAY(_object)) then { if(IS_ARRAY(_object)) then {
_actions = _object select 6; _actions = _object select 6;
@ -47,5 +50,4 @@ _entry = [
]; ];
GVAR(uidCounter) = GVAR(uidCounter) + 1; GVAR(uidCounter) = GVAR(uidCounter) + 1;
_actions pushBack _entry; _actions pushBack _entry;
_entry; _entry;