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);
|
2015-07-10 22:50:12 +00:00
|
|
|
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));
|
|
|
|
};
|
|
|
|
|
2015-07-17 19:26:18 +00:00
|
|
|
missionNameSpace setVariable [(QGVAR(values) + _magazine),[_angle, _range,_damage]];
|
2015-07-10 22:09:20 +00:00
|
|
|
[_angle,_range,_damage]
|