mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
clarified variable names and removed submunition function call paths
This commit is contained in:
parent
1e93453963
commit
8f70fa971a
@ -5,11 +5,11 @@
|
||||
* as handling some of the performance optimizations.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Array of argumentse
|
||||
* 0.0: projectile that's fragmenting <OBJECT>
|
||||
* 0.1: ASL position of projectile <ARRAY>
|
||||
* 0.2: velocity of projectile <ARRAY>
|
||||
* 1: Whether the projectile is a submunition <BOOL>
|
||||
* 0: projectile that's fragmenting <OBJECT>
|
||||
* 1: ASL position of projectile <ARRAY>
|
||||
* 2: velocity of projectile <ARRAY>
|
||||
* 3: projectile cfgAmmo classname <STRING>
|
||||
* 4: getShotParents of projectile at EH <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -20,8 +20,8 @@
|
||||
* Public: No
|
||||
*/
|
||||
TRACE_1("",_this);
|
||||
params ["_args", ["_isSubMunit", false, [false]]];
|
||||
_args params [
|
||||
/*params ["_args", ["_isSubMunit", false, [false]]];
|
||||
_args*/ params [
|
||||
["_proj", objNull, [objNull]],
|
||||
["_posASL", [0,0,0], [[]], [3]],
|
||||
["_vel", [0,0,0] , [[]], [3]],
|
||||
@ -52,14 +52,13 @@ if (_heightAGL < 0.25) then {
|
||||
_posASL = _posASL vectorAdd [0, 0, 0.25];
|
||||
};
|
||||
|
||||
// make timesince a gvar?
|
||||
TRACE_4("fnc_doFragTargeted IF", _fragRange, _timeSince, _isSubMunit, GVAR(enSubMunit));
|
||||
if (_fragRange > 3 && _timeSince > 0.3 && {!_isSubMunit || {GVAR(enSubMunit) == 2}}) then {
|
||||
// !*! make timesince a gvar?
|
||||
TRACE_4("fnc_doFragTargeted IF", _fragRange, _timeSince, GVAR(fragSimComplexity));
|
||||
if (_fragRange > 3 && _timeSince > 0.3 && {GVAR(fragSimComplexity) == 2}) then {
|
||||
_maxFrags = _maxFrags - ([_posASL, _fragVel, _fragRange, _maxFrags, _fragTypes, _modFragCount, _shotParents] call FUNC(doFragTargeted));
|
||||
};
|
||||
|
||||
// make a gvar?
|
||||
if (_timeSince > 0.2 && {GVAR(enSubMunit) != 0}) then {
|
||||
if (_timeSince > 0.2 && {GVAR(fragSimComplexity) != 0}) then {
|
||||
[_posASL, _vel, _heightAGL, _fragTypes, _maxFrags, _shotParents] call FUNC(doFragRandom);
|
||||
};
|
||||
|
||||
|
@ -43,7 +43,7 @@ if (_doFrag) then {
|
||||
];
|
||||
};
|
||||
|
||||
if (_doSubmunit && {GVAR(enSubMunit)> 0}) then {
|
||||
if (_doSubmunit && {GVAR(fragSimComplexity)> 0}) then {
|
||||
_projectile addEventHandler ["SubmunitionCreated", {_this call FUNC(submunition)}];
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ if (_skip == 1 || (_force == 0 && {_explosive < 0.5 || {_indirectHit < 3
|
||||
_shouldFrag set [0, false];
|
||||
};
|
||||
|
||||
if (GVAR(enSubMunit) > 0) then {
|
||||
/*if (GVAR(fragSimComplexity) > 1) then {
|
||||
private _hasSubmunit = if (isText (configFile >> "cfgAmmo" >> _ammo >> "submunitionAmmo")) then {
|
||||
"" isNotEqualTo getText (configFile >> "cfgAmmo" >> _ammo >> "submunitionAmmo");
|
||||
} else
|
||||
@ -48,7 +48,7 @@ if (GVAR(enSubMunit) > 0) then {
|
||||
|
||||
_shouldFrag set [1, _hasSubmunit];
|
||||
TRACE_2("Submunition" ,_ammo, _hasSubmunit);
|
||||
};
|
||||
};*/
|
||||
|
||||
GVAR(shouldFragCache) set [_ammo, _shouldFrag];
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
if (!GVAR(enabled) || {GVAR(enSubMunit) == 0}) exitWith {};
|
||||
if (!GVAR(enabled) || {GVAR(fragSimComplexity) == 0}) exitWith {};
|
||||
// params ["_projectile", "_submunitionProjectile", "_pos", "_velocity"];
|
||||
params ["", "_submunitionProjectile"];
|
||||
|
||||
|
@ -28,7 +28,7 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
|
||||
|
||||
/// !*! TODO: add stringtable entries
|
||||
[
|
||||
QGVAR(enSubMunit), "LIST",
|
||||
QGVAR(fragSimComplexity), "LIST",
|
||||
["Enable submunition fragmentation", "Enables submunition fragmentation when fragmentation is enabled"],
|
||||
[_category, LSTRING(Frag)],
|
||||
[[2, 1, 0], ["complex fragementation","simple fragmentation","no fragmentation"], 2]
|
||||
|
Loading…
Reference in New Issue
Block a user