mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Removed unneeded ground offset
This commit is contained in:
parent
4583a0dc9c
commit
deecaf9249
@ -44,11 +44,6 @@ if (_modFragCount < ACE_FRAG_LOW_FRAG_MOD_COUNT) then {
|
|||||||
} else {
|
} else {
|
||||||
GVAR(lastFragTime) = CBA_missionTime;
|
GVAR(lastFragTime) = CBA_missionTime;
|
||||||
};
|
};
|
||||||
// Offset for ground clearance
|
|
||||||
private _heightATL = (ASLToATL _posASL)#2;
|
|
||||||
if (_heightATL < ACE_FRAG_MIN_GROUND_OFFSET) then {
|
|
||||||
_posASL = _posASL vectorAdd [0, 0, ACE_FRAG_MIN_GROUND_OFFSET - (0 min _heightATL)];
|
|
||||||
};
|
|
||||||
|
|
||||||
TRACE_3("doFrag choices",_maxFragCount,_fragRange,GVAR(fragSimComplexity));
|
TRACE_3("doFrag choices",_maxFragCount,_fragRange,GVAR(fragSimComplexity));
|
||||||
if (GVAR(fragSimComplexity) != 1 && _fragRange > 3) then {
|
if (GVAR(fragSimComplexity) != 1 && _fragRange > 3) then {
|
||||||
@ -56,5 +51,5 @@ if (GVAR(fragSimComplexity) != 1 && _fragRange > 3) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (GVAR(fragSimComplexity) > 0 && _maxFragCount >= ACE_FRAG_MIN_FRAG_BUDGET_FOR_RANDOM) then {
|
if (GVAR(fragSimComplexity) > 0 && _maxFragCount >= ACE_FRAG_MIN_FRAG_BUDGET_FOR_RANDOM) then {
|
||||||
[_posASL, _velocity, _heightATL, _fragTypes, _maxFragCount, _shotParents] call FUNC(doFragRandom);
|
[_posASL, _velocity, _fragTypes, _maxFragCount, _shotParents] call FUNC(doFragRandom);
|
||||||
};
|
};
|
||||||
|
@ -7,10 +7,9 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Position (posASL) of fragmenting projectile <ARRAY>
|
* 0: Position (posASL) of fragmenting projectile <ARRAY>
|
||||||
* 1: Velocity of the fragmenting projectile <ARRAY>
|
* 1: Velocity of the fragmenting projectile <ARRAY>
|
||||||
* 2: Height (AGL) of the fragmenting projectile <NUMBER>
|
* 2: Type of fragments to generate <ARRAY>
|
||||||
* 3: Type of fragments to generate <ARRAY>
|
* 3: Remaining fragment budget <NUMBER>
|
||||||
* 4: Remaining fragment budget <NUMBER>
|
* 4: Shot parents <ARRAY>
|
||||||
* 5: Shot parents <ARRAY>
|
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
@ -21,10 +20,11 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_posASL", "_fragVelocity", "_heightATL", "_fragType", "_maxFragCount", "_shotParents"];
|
params ["_posASL", "_fragVelocity", "_fragType", "_maxFragCount", "_shotParents"];
|
||||||
TRACE_6("doFragRandom",_posASL,_fragVelocity,_heightATL,_fragType,_maxFragCount,_shotParents);
|
TRACE_5("doFragRandom",_posASL,_fragVelocity,_fragType,_maxFragCount,_shotParents);
|
||||||
|
|
||||||
// See CfgAmmoFragSpawner for different frag types
|
// See CfgAmmoFragSpawner for different frag types
|
||||||
|
private _heightATL = (ASLToATL _posASL)#2;
|
||||||
private _hMode = switch (true) do {
|
private _hMode = switch (true) do {
|
||||||
case (_heightATL > 10): {"_top"};
|
case (_heightATL > 10): {"_top"};
|
||||||
case (_heightATL > 5): {"_hi"};
|
case (_heightATL > 5): {"_hi"};
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#define ACE_FRAG_HALF_GRAVITY_APPROX 4.905
|
#define ACE_FRAG_HALF_GRAVITY_APPROX 4.905
|
||||||
// Lowest chance to hit of 0.5%
|
// Lowest chance to hit of 0.5%
|
||||||
#define ACE_FRAG_MIN_FRAG_HIT_CHANCE 0.005
|
#define ACE_FRAG_MIN_FRAG_HIT_CHANCE 0.005
|
||||||
#define ACE_FRAG_MIN_GROUND_OFFSET 0.25
|
|
||||||
// Make frag hold-off time shortger for low frag
|
// Make frag hold-off time shortger for low frag
|
||||||
// value of 150/4/pi ~= 11.93662
|
// value of 150/4/pi ~= 11.93662
|
||||||
#define ACE_FRAG_LOW_FRAG_MOD_COUNT 11.93662
|
#define ACE_FRAG_LOW_FRAG_MOD_COUNT 11.93662
|
||||||
|
Loading…
Reference in New Issue
Block a user