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:
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
params [
|
params [
|
||||||
"_object",
|
["_object", objNull, [objNull]],
|
||||||
["_color", "blue", ["blue"]],
|
["_color", "blue", ["blue"]],
|
||||||
["_isProj", false, [false]]
|
["_isProj", false, [false]]
|
||||||
];
|
];
|
||||||
@ -47,7 +47,7 @@ GVAR(dev_trackLines) set [getObjectID _object, [[getPosATL _object], _colorArray
|
|||||||
if (!alive _object) exitWith {
|
if (!alive _object) exitWith {
|
||||||
[_handle] call CBA_fnc_removePerFrameHandler;
|
[_handle] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
private objectArray = GVAR(dev_trackLines) get (getObjectID _object);
|
private objectArray = GVAR(dev_trackLines) get (getObjectID _object);
|
||||||
|
|
||||||
if (isNil "_objectArray") exitWith {
|
if (isNil "_objectArray") exitWith {
|
||||||
|
@ -21,6 +21,9 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* 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 [
|
params [
|
||||||
"_posASL",
|
"_posASL",
|
||||||
@ -77,20 +80,25 @@ private _totalFragCount = 0;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Estimate volume and height of target
|
// Estimate volume and height of target
|
||||||
private _height = 0.5;
|
private _height = ACE_FRAG_DEFAULT_HEIGHT;
|
||||||
private _crossSectionArea = 1;
|
private _crossSectionArea = ACE_FRAG_DEFAULT_CROSS_AREA;
|
||||||
private _isPerson = _target isKindOf "CAManBase";
|
private _isPerson = _target isKindOf "CAManBase";
|
||||||
if (_isPerson) then {
|
if (_isPerson) then {
|
||||||
switch (stance _target) do {
|
switch (stance _target) do {
|
||||||
case "STAND": {_height = 1.9; _crossSectionArea = 1.5;};
|
case "STAND": {
|
||||||
case "CROUCH": {_height = 1.2; _crossSectionArea = 1;};
|
_height = 1.9;
|
||||||
default {_crossSectionArea = 0.75;};
|
_crossSectionArea = 1.5;
|
||||||
|
};
|
||||||
|
case "CROUCH": {
|
||||||
|
_height = 1.2;
|
||||||
|
_crossSectionArea = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
private _boxParams = boundingBoxReal [_target, "FireGeometry"];
|
private _boxParams = boundingBoxReal [_target, "FireGeometry"];
|
||||||
_boxParams params ["_pointA", "_pointB"];
|
_boxParams params ["_pointA", "_pointB"];
|
||||||
private _dims = _pointB vectorDiff _pointA;
|
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;
|
continue;
|
||||||
};
|
};
|
||||||
_crossSectionArea = _dims#1 * _dims#2;
|
_crossSectionArea = _dims#1 * _dims#2;
|
||||||
|
Reference in New Issue
Block a user