2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2023-06-28 10:39:08 +00:00
|
|
|
/*
|
|
|
|
* Author: Brett Mayson
|
|
|
|
* Calculate the time to patch the wheel
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit that does the patching <OBJECT>
|
|
|
|
* 1: Vehicle to patch <OBJECT>
|
|
|
|
* 2: Selected wheel hitpoint <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Patching time <NUMBER>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [unit, vehicle, "hitpoint"] call ace_repair_fnc_getPatchWheelTime
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_unit", "_vehicle", "_hitPoint"];
|
|
|
|
|
|
|
|
// get current hitpoint damage
|
|
|
|
private _hitPointDamage = (_vehicle getHitPointDamage _hitPoint) - GVAR(patchWheelMaximumRepair);
|
|
|
|
|
|
|
|
ceil (_hitPointDamage / PATCH_WHEEL_STEP_TIME) * GVAR(patchWheelTime)
|