mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
26 lines
630 B
Plaintext
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)
|