ACE3/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf

44 lines
1.1 KiB
Plaintext
Raw Normal View History

2015-08-16 00:18:53 +00:00
/*
* Author: GitHawk
* Rearm an entire vehicle.
2015-08-16 00:18:53 +00:00
*
* Arguments:
* 0: Vehicle <OBJECT>
2015-08-16 00:18:53 +00:00
*
* Return Value:
* None
*
* Example:
* [tank] call ace_rearm_fnc_rearmEntireVehicleSuccess
*
* Public: No
*/
#include "script_component.hpp"
private ["_turretPath", "_magazines", "_magazine", "_currentMagazines", "_maxMagazines", "_maxRounds", "_currentRounds"];
2016-02-01 19:05:53 +00:00
params [["_vehicle", objNull, [objNull]]];
2016-06-27 04:37:23 +00:00
TRACE_1("params",_vehicle);
2015-08-16 00:18:53 +00:00
2016-06-27 04:37:23 +00:00
//ToDo: Cleanup with CBA_fnc_ownerEvent in CBA 2.4.2
{
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_vehicle, _x]] call CBA_fnc_globalEvent;
} forEach REARM_TURRET_PATHS;
/*
2015-08-18 16:09:37 +00:00
if (isServer) then {
2015-08-16 00:18:53 +00:00
{
_turretOwnerID = _vehicle turretOwner _x;
if (_turretOwnerID == 0) then {
2016-06-27 04:37:23 +00:00
//wtf is _truck from???
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _truck] call CBA_fnc_targetEvent;
} else {
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_targetEvent;
};
2015-08-18 16:09:37 +00:00
} count REARM_TURRET_PATHS;
} else {
[QGVAR(rearmEntireVehicleSuccessLocalEH), _this] call CBA_fnc_serverEvent;
2015-08-18 16:09:37 +00:00
};
2016-06-27 04:37:23 +00:00
*/