ACE3/addons/repair/functions/fnc_getPatchWheelTime.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

26 lines
630 B
Plaintext

#include "..\script_component.hpp"
/*
* 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)