VehicleSetFuel event

setFuel says it needs to be local, so switching to event.
Put event in common
This commit is contained in:
PabstMirror 2015-01-28 14:38:04 -06:00
parent 4b1e40570e
commit 9a616a85fc
2 changed files with 6 additions and 1 deletions

View File

@ -134,3 +134,8 @@ GVAR(OldPlayerTurret) = [ACE_player] call FUNC(getTurretIndex);
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable); [QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(carriedBy),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable); [QGVAR(carriedBy),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(carriedObj),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable); [QGVAR(carriedObj),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);
["VehicleSetFuel", {
PARAMS_2(_vehicle,_fuelLevel);
_vehicle setFuel _fuelLevel;
}] call FUNC(addEventhandler);

View File

@ -20,8 +20,8 @@ if (!(_this call FUNC(canRefuelUAV))) exitWith {};
_onFinish = { _onFinish = {
EXPLODE_2_PVT((_this select 0),_caller,_target); EXPLODE_2_PVT((_this select 0),_caller,_target);
_target setFuel 1;
_caller removeItem "ACE_UAVBattery"; _caller removeItem "ACE_UAVBattery";
["VehicleSetFuel", [_target], [_target, 1]] call EFUNC(common,targetEvent); //setFuel is local
}; };
_onFailure = { _onFailure = {