2015-05-09 20:32:36 +00:00
|
|
|
//#define DEBUG_MODE_FULL
|
|
|
|
#include "script_component.hpp"
|
2015-05-11 18:01:53 +00:00
|
|
|
// params not used here to prevent debug spam
|
|
|
|
_args = _this select 0;
|
|
|
|
_handle = _this select 1;
|
2015-05-09 20:32:36 +00:00
|
|
|
private["_result"];
|
|
|
|
|
2015-05-10 18:00:31 +00:00
|
|
|
if(GVAR(ready)) then {
|
2015-05-10 17:11:30 +00:00
|
|
|
_result = "fetch_result:1" call FUNC(callExtension);;
|
2015-05-10 18:00:31 +00:00
|
|
|
while { _result != "" && {_result != "-1"} } do {
|
|
|
|
TRACE_1("", _result);
|
|
|
|
|
|
|
|
_resultArgs = [_result] call FUNC(parseResult);
|
|
|
|
if(!isNil "_resultArgs") then {
|
|
|
|
if((_resultArgs select 0) == "exec") then {
|
2015-05-11 18:01:53 +00:00
|
|
|
TRACE_1("", "Dispatching exec");
|
2015-05-10 18:00:31 +00:00
|
|
|
[] call (_resultArgs select 1);
|
|
|
|
} else {
|
2015-05-11 18:01:53 +00:00
|
|
|
_event = format["ace_vehicledamage_%1", (_resultArgs select 0)];
|
|
|
|
TRACE_3("Dispatch command", _event, (_resultArgs select 0), (_resultArgs select 1));
|
|
|
|
[_event, (_resultArgs select 1)] call EFUNC(common,localEvent);
|
2015-05-10 18:00:31 +00:00
|
|
|
};
|
2015-05-10 16:51:16 +00:00
|
|
|
};
|
2015-05-11 18:01:53 +00:00
|
|
|
// Pull next result
|
|
|
|
_result = "fetch_result:1" call FUNC(callExtension);
|
2015-05-10 16:51:16 +00:00
|
|
|
};
|
2015-05-09 20:32:36 +00:00
|
|
|
};
|