ACE3/addons/medical_status/functions/fnc_addHeartRateAdjustment.sqf
Dedmen Miller 7a0a00ea09 Cleanup using SQFLint (#6485)
* Use private
* Fix wrong spacing
* Fix wrong variable being used
* Cleanup empty line after header
* ace_common_fnc_getCountOfItem
* Remove useless _return variable
* Naming
2018-08-02 15:02:10 +01:00

22 lines
783 B
Plaintext

#include "script_component.hpp"
/*
* Author: BaerMitUmlaut
* Adds a heart rate adjustment that will take effect over time.
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Heart rate change <NUMBER>
* 2: Time in system for the adjustment to reach its peak <NUMBER>
* 3: Duration the adjustment will have an effect <NUMVER>
*
* Return Value:
* None
*/
params ["_unit", "_change", "_timeToMaxEffect", "_maxTimeInSystem"];
private _adjustments = _unit getVariable [VAR_HEART_RATE_ADJ,[]];
// The last number indicates the time the adjustment is already in the system
_adjustments pushBack [_change, _timeToMaxEffect, _maxTimeInSystem, 0];
_unit setVariable [VAR_HEART_RATE_ADJ, _adjustments];