2024-01-11 20:01:50 +00:00
|
|
|
#include "..\script_component.hpp"
|
2024-01-08 21:22:52 +00:00
|
|
|
/*
|
|
|
|
* Author: Lambda.Tiger
|
2024-01-18 00:20:47 +00:00
|
|
|
* This function checks whether an ammunition type should cause spalling.
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2024-02-16 03:03:12 +00:00
|
|
|
* 0: Ammo classname <STRING>
|
2024-01-13 06:35:22 +00:00
|
|
|
*
|
2024-01-08 21:22:52 +00:00
|
|
|
* Return Value:
|
2024-07-30 21:08:59 +00:00
|
|
|
* Whether the round type could spall when hitting an object <BOOL>
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2024-03-29 00:33:56 +00:00
|
|
|
* "B_556x45_Ball" call ace_frag_fnc_shouldSpall
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_ammo"];
|
|
|
|
|
2024-07-30 18:22:52 +00:00
|
|
|
GVAR(shouldSpallCache) getOrDefaultCall [
|
|
|
|
_ammo,
|
|
|
|
{
|
|
|
|
(_ammo call FUNC(getSpallInfo)) params ["_caliber", "_explosive", "_indirectHit"];
|
2024-01-08 21:22:52 +00:00
|
|
|
|
2024-07-30 18:22:52 +00:00
|
|
|
_caliber >= 2.5 || (_explosive > 0 && _indirectHit >= 1)
|
|
|
|
},
|
|
|
|
true
|
|
|
|
]
|