2015-08-16 00:18:53 +00:00
|
|
|
/*
|
|
|
|
* Author: GitHawk
|
2015-08-18 00:32:10 +00:00
|
|
|
* Rearm an entire vehicle.
|
2015-08-16 00:18:53 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-08-18 00:32:10 +00:00
|
|
|
* 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"
|
|
|
|
|
2015-08-18 00:32:10 +00:00
|
|
|
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
|
|
|
{
|
2015-08-19 15:33:32 +00:00
|
|
|
_turretOwnerID = _vehicle turretOwner _x;
|
|
|
|
if (_turretOwnerID == 0) then {
|
2016-06-27 04:37:23 +00:00
|
|
|
//wtf is _truck from???
|
2016-03-06 10:14:34 +00:00
|
|
|
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _truck] call CBA_fnc_targetEvent;
|
2015-08-19 15:33:32 +00:00
|
|
|
} else {
|
2016-03-06 10:14:34 +00:00
|
|
|
[QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_targetEvent;
|
2015-08-19 15:33:32 +00:00
|
|
|
};
|
2015-08-18 16:09:37 +00:00
|
|
|
} count REARM_TURRET_PATHS;
|
|
|
|
} else {
|
2016-03-06 10:14:34 +00:00
|
|
|
[QGVAR(rearmEntireVehicleSuccessLocalEH), _this] call CBA_fnc_serverEvent;
|
2015-08-18 16:09:37 +00:00
|
|
|
};
|
2016-06-27 04:37:23 +00:00
|
|
|
*/
|