mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
white space, function headers and variable names
This commit is contained in:
parent
a976b28c69
commit
4ef23df3b3
@ -66,8 +66,8 @@ if (_spallPower < 2) exitWith {
|
||||
TRACE_1("lowImpulse",_ammo);
|
||||
};
|
||||
|
||||
private _lastVelocityUnit = vectorNormalized _lastVelocity;
|
||||
private _deltaStep = _lastVelocityUnit vectorMultiply 0.05;
|
||||
private _lastVelocityNorm = vectorNormalized _lastVelocity;
|
||||
private _deltaStep = _lastVelocityNorm vectorMultiply 0.05;
|
||||
|
||||
if (terrainIntersectASL [_lastPosASL vectorAdd _deltaStep, _lastPosASL]) exitWith {
|
||||
TRACE_2("terrainIntersect",_lastPosASL,_deltaStep);
|
||||
@ -75,17 +75,17 @@ if (terrainIntersectASL [_lastPosASL vectorAdd _deltaStep, _lastPosASL]) exitWit
|
||||
|
||||
#ifdef DEBUG_MODE_DRAW
|
||||
if GVAR(dbgSphere) then {
|
||||
[_lastPosASL vectorAdd _lastVelocityUnit, "orange"] call FUNC(dev_sphereDraw);
|
||||
[_lastPosASL vectorAdd _lastVelocityNorm, "orange"] call FUNC(dev_sphereDraw);
|
||||
[_lastPosASL, "yellow"] call FUNC(dev_sphereDraw);
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Improve performance of finding otherside of object on shallow angle
|
||||
* impacts. 120 degrees due to 90 degree offset with _lastVelocityUnit into object.
|
||||
* impacts. 120 degrees due to 90 degree offset with _lastVelocityNorm into object.
|
||||
*/
|
||||
private _spallPosASL = _lastPosASL vectorAdd _deltaStep;
|
||||
if (120 > acos (_lastVelocityUnit vectorDotProduct _surfaceNorm)) then {
|
||||
if (120 > acos (_lastVelocityNorm vectorDotProduct _surfaceNorm)) then {
|
||||
_spallPosASL = _spallPosASL vectorAdd (_deltaStep vectorMultiply 5);
|
||||
};
|
||||
private _insideObject = true;
|
||||
@ -128,8 +128,8 @@ private _spallSpawner = createVehicle [
|
||||
0,
|
||||
"CAN_COLLIDE"
|
||||
];
|
||||
_spallSpawner setVectorDirandUp [_lastVelocityUnit, _vectorUp];
|
||||
_spallSpawner setVelocity (_lastVelocityUnit vectorMultiply (_velocityChange * ACE_FRAG_SPALL_VELOCITY_INHERIT_COEFF));
|
||||
_spallSpawner setVectorDirandUp [_lastVelocityNorm, _vectorUp];
|
||||
_spallSpawner setVelocity (_lastVelocityNorm vectorMultiply (_velocityChange * ACE_FRAG_SPALL_VELOCITY_INHERIT_COEFF));
|
||||
_spallSpawner setShotParents _shotParents;
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
|
@ -1,8 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
/*
|
||||
* Author: Lambda.Tiger
|
||||
* This function checks whether an ammunition type should cause fragmentation
|
||||
* and whether any submunitions exist.
|
||||
* This function checks whether an ammunition type should create fragments.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Type of ammo to check <STRING>
|
||||
@ -31,8 +30,12 @@ private _explosive = getNumber (_ammoConfig >> "explosive");
|
||||
private _indirectHit = getNumber (_ammoConfig >> "indirectHit");
|
||||
private _indirectRange = getNumber (_ammoConfig >> "indirectHitRange");
|
||||
|
||||
if (_skip == 1 || (_force == 0 && {_explosive < 0.5 || {_indirectHit < 3
|
||||
|| {_indirectRange < 5 && _indirectHit < _indirectRange}}})) then {
|
||||
if (_skip == 1 ||
|
||||
(_force == 0 &&
|
||||
{_explosive < 0.5 ||
|
||||
{_indirectHit < 3 ||
|
||||
{_indirectRange < 5 &&
|
||||
_indirectHit < _indirectRange}}})) then {
|
||||
TRACE_5("No frag",_ammo,_skip,_explosive,_indirectRange,_indirectHit);
|
||||
_shouldFrag = false;
|
||||
};
|
||||
|
@ -45,4 +45,4 @@
|
||||
#define ACE_FRAG_SPALL_HOLDOFF 0.25
|
||||
#define ACE_FRAG_SPALL_VELOCITY_INHERIT_COEFF 0.5
|
||||
// sqrt(2)/50
|
||||
#define ACE_FRAG_ROUND_COEF 0.02828427
|
||||
#define ACE_FRAG_ROUND_COEF 0.02828427
|
||||
|
Loading…
Reference in New Issue
Block a user