2024-01-15 05:10:15 +00:00
|
|
|
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
|
|
* Author: Lambda.Tiger
|
2024-02-16 03:03:12 +00:00
|
|
|
* This function returns spalling parameters for a specific ammo type.
|
2024-01-15 05:10:15 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2024-02-16 03:03:12 +00:00
|
|
|
* 0: Ammo classname <STRING>
|
2024-01-15 05:10:15 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* _ammoInfo <ARRAY>
|
2024-02-16 03:03:12 +00:00
|
|
|
* 0: Caliber <NUMBER>
|
|
|
|
* 1: What part of the hit damage is from ballistic vs explosive energy (1 for all explosive) <NUMBER>
|
|
|
|
* 2: Indirect hit damage <NUMBER>
|
2024-01-15 05:10:15 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2024-03-29 00:33:56 +00:00
|
|
|
* "B_556x45_Ball" call ace_frag_fnc_getSpallInfo
|
2024-01-15 05:10:15 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_ammo"];
|
|
|
|
|
2024-04-01 13:31:18 +00:00
|
|
|
GVAR(spallInfoCache) getOrDefaultCall [_ammo, {
|
|
|
|
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
|
|
|
private _caliber = getNumber (_ammoConfig >> "caliber");
|
|
|
|
private _explosive = 1 min getNumber (_ammoConfig >> "explosive");
|
|
|
|
private _indirectHit = getNumber (_ammoConfig >> "indirectHitRange");
|
2024-01-15 05:10:15 +00:00
|
|
|
|
2024-04-01 13:31:18 +00:00
|
|
|
[_caliber, _explosive, _indirectHit]
|
|
|
|
}, true]
|