ACE3/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf

34 lines
982 B
Plaintext
Raw Normal View History

2015-07-10 22:09:20 +00:00
/*
* Author: joko // Jonas
*
* Handle fire of local launchers
*
* Argument:
* 0: Magazine (String)
* 1:
*
* Return value:
* Array:
* 0:
* 1:
* 2:
*
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_weapon,_magazine);
if !(isNil (QGVAR(Damage) + _magazine)) exitWith {};
2015-07-10 22:09:20 +00:00
private ["_damage","_angle","_range"];
_damage = getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(damage));
if (_damage == 0) then {
_angle = getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(angle)) / 2;
_range = getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(range));
_damage = getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(damage));
} else {
_angle = getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(angle)) / 2;
_range = getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(range));
};
missionNameSpace setVariable [(QGVAR(values) + _magazine),[_angle, _range,_damage]];
2015-07-10 22:09:20 +00:00
[_angle,_range,_damage]