mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
magic number clean up and white space
This commit is contained in:
parent
ae116e2577
commit
a976b28c69
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
params [
|
||||
"_object",
|
||||
["_object", objNull, [objNull]],
|
||||
["_color", "blue", ["blue"]],
|
||||
["_isProj", false, [false]]
|
||||
];
|
||||
@ -47,7 +47,7 @@ GVAR(dev_trackLines) set [getObjectID _object, [[getPosATL _object], _colorArray
|
||||
if (!alive _object) exitWith {
|
||||
[_handle] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
|
||||
private objectArray = GVAR(dev_trackLines) get (getObjectID _object);
|
||||
|
||||
if (isNil "_objectArray") exitWith {
|
||||
|
@ -21,6 +21,9 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#define ACE_FRAG_DEFAULT_HEIGHT 0.5
|
||||
#define ACE_FRAG_DEFAULT_CROSS_AREA 0.75
|
||||
#define ACE_FRAG_MIN_TARGET_AREA 0.5
|
||||
|
||||
params [
|
||||
"_posASL",
|
||||
@ -77,20 +80,25 @@ private _totalFragCount = 0;
|
||||
#endif
|
||||
|
||||
// Estimate volume and height of target
|
||||
private _height = 0.5;
|
||||
private _crossSectionArea = 1;
|
||||
private _height = ACE_FRAG_DEFAULT_HEIGHT;
|
||||
private _crossSectionArea = ACE_FRAG_DEFAULT_CROSS_AREA;
|
||||
private _isPerson = _target isKindOf "CAManBase";
|
||||
if (_isPerson) then {
|
||||
switch (stance _target) do {
|
||||
case "STAND": {_height = 1.9; _crossSectionArea = 1.5;};
|
||||
case "CROUCH": {_height = 1.2; _crossSectionArea = 1;};
|
||||
default {_crossSectionArea = 0.75;};
|
||||
case "STAND": {
|
||||
_height = 1.9;
|
||||
_crossSectionArea = 1.5;
|
||||
};
|
||||
case "CROUCH": {
|
||||
_height = 1.2;
|
||||
_crossSectionArea = 1;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
private _boxParams = boundingBoxReal [_target, "FireGeometry"];
|
||||
_boxParams params ["_pointA", "_pointB"];
|
||||
private _dims = _pointB vectorDiff _pointA;
|
||||
if (_dims#0 * _dims#1 * _dims#2 <= 0.5) then {
|
||||
if (_dims#0 * _dims#1 * _dims#2 <= ACE_FRAG_MIN_TARGET_AREA) then {
|
||||
continue;
|
||||
};
|
||||
_crossSectionArea = _dims#1 * _dims#2;
|
||||
|
Loading…
Reference in New Issue
Block a user