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"];
|
2015-08-16 00:18:53 +00:00
|
|
|
params ["_vehicle"];
|
|
|
|
|
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 {
|
|
|
|
[[_vehicle, _x], QFUNC(rearmEntireVehicleSuccessLocal), _target] call EFUNC(common,execRemoteFnc);
|
|
|
|
} else {
|
|
|
|
EGVAR(common,remoteFnc) = [[_vehicle, _x], QFUNC(rearmEntireVehicleSuccessLocal), 0];
|
|
|
|
_turretOwnerID publicVariableClient QEGVAR(common,remoteFnc);
|
|
|
|
};
|
2015-08-18 16:09:37 +00:00
|
|
|
} count REARM_TURRET_PATHS;
|
|
|
|
} else {
|
2015-08-19 15:33:32 +00:00
|
|
|
[_this, QFUNC(rearmEntireVehicleSuccess), 1] call EFUNC(common,execRemoteFnc);
|
2015-08-18 16:09:37 +00:00
|
|
|
};
|