legability formatting

This commit is contained in:
lambdatiger 2024-07-30 13:22:52 -05:00
parent 7b282ec96c
commit 22ca38fc2c
2 changed files with 19 additions and 11 deletions

View File

@ -20,11 +20,15 @@
params ["_ammo"];
GVAR(spallInfoCache) getOrDefaultCall [_ammo, {
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
private _caliber = getNumber (_ammoConfig >> "caliber");
private _explosive = getNumber (_ammoConfig >> "explosive");
private _indirectHit = getNumber (_ammoConfig >> "indirectHitRange");
GVAR(spallInfoCache) getOrDefaultCall [
_ammo,
{
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
private _caliber = getNumber (_ammoConfig >> "caliber");
private _explosive = getNumber (_ammoConfig >> "explosive");
private _indirectHit = getNumber (_ammoConfig >> "indirectHitRange");
[_caliber, _explosive, _indirectHit]
}, true]
[_caliber, _explosive, _indirectHit]
},
true
]

View File

@ -17,8 +17,12 @@
params ["_ammo"];
GVAR(shouldSpallCache) getOrDefaultCall [_ammo, {
(_ammo call FUNC(getSpallInfo)) params ["_caliber", "_explosive", "_indirectHit"];
GVAR(shouldSpallCache) getOrDefaultCall [
_ammo,
{
(_ammo call FUNC(getSpallInfo)) params ["_caliber", "_explosive", "_indirectHit"];
_caliber >= 2.5 || (_explosive > 0 && _indirectHit >= 1)
}, true]
_caliber >= 2.5 || (_explosive > 0 && _indirectHit >= 1)
},
true
]