Files
ACE3/addons/scuba/functions/fnc_calculateSafePressure.sqf
2016-07-13 11:16:07 +02:00

24 lines
528 B
Plaintext

/*
* Author: BaerMitUmlaut
* Calculates a safe pressure the player can ascend to.
*
* Arguments:
* None
*
* Return Value:
* Maximum ambient pressure tolerated <NUMBER>
*/
#include "script_component.hpp"
private _maxPAmbtol = 0;
{
private _a = GVAR(interGasAValues) select (_forEachIndex * 2);
private _b = GVAR(interGasBValues) select (_forEachIndex * 2);
private _pAmbtol = (_x - _a) * _b;
_maxPAmbtol = _maxPAmbTol max _pAmbtol;
} forEach (ACE_player getVariable QGVAR(compartments));
_maxPAmbtol