mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
doFragRandom was always being called and spawning at least 5 fragments even when the fragment budget of 50 was reached. Fixed variable name (AGL instead of ATL).
This commit is contained in:
parent
3cb07e8323
commit
3e52ce2981
@ -17,7 +17,7 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#define ACE_FRAG_MIN_FRAG_BUDGET_FOR_RANDOM 3
|
||||
TRACE_1("begin doFrag",_this);
|
||||
params ["_posASL", "_velocity", "_ammo", "_shotParents"];
|
||||
|
||||
@ -56,6 +56,6 @@ if (GVAR(fragSimComplexity) != 1 && _fragRange > 3) then {
|
||||
_maxFragCount = _maxFragCount - ([_posASL, _fragVel, _fragRange, _maxFragCount, _fragTypes, _modFragCount, _shotParents] call FUNC(doFragTargeted));
|
||||
};
|
||||
|
||||
if (GVAR(fragSimComplexity) > 0) then {
|
||||
if (GVAR(fragSimComplexity) > 0 && _maxFragCount >= ACE_FRAG_MIN_FRAG_BUDGET_FOR_RANDOM) then {
|
||||
[_posASL, _velocity, _heightATL, _fragTypes, _maxFragCount, _shotParents] call FUNC(doFragRandom);
|
||||
};
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
/*
|
||||
* Author: Jaynus, NouberNou, Lambda.Tiger
|
||||
* This function creates fragments randomly spreading out from an explosion to a maximum of 15.
|
||||
* This function creates fragments randomly spreading out from an explosion.
|
||||
* This function will spawn 5, 10, or 15 fragments depending on the
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Position (posASL) of fragmenting projectile <ARRAY>
|
||||
@ -20,13 +21,13 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_posASL", "_fragVelocity", "_heightAGL", "_fragType", "_maxFragCount", "_shotParents"];
|
||||
TRACE_6("doFragRandom",_posASL,_fragVelocity,_heightAGL,_fragType,_maxFragCount,_shotParents);
|
||||
params ["_posASL", "_fragVelocity", "_heightATL", "_fragType", "_maxFragCount", "_shotParents"];
|
||||
TRACE_6("doFragRandom",_posASL,_fragVelocity,_heightATL,_fragType,_maxFragCount,_shotParents);
|
||||
|
||||
// See CfgAmmoFragSpawner for different frag types
|
||||
private _hMode = switch (true) do {
|
||||
case (_heightAGL > 10): {"_top"};
|
||||
case (_heightAGL > 5): {"_hi"};
|
||||
case (_heightATL > 10): {"_top"};
|
||||
case (_heightATL > 5): {"_hi"};
|
||||
default {"_mid"};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user