mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Converetd all stray tabs to spaces
This commit is contained in:
parent
db195f4b26
commit
eef48da6bc
@ -2,19 +2,19 @@
|
|||||||
#define HD_MULT 5
|
#define HD_MULT 5
|
||||||
#define BASE_DRAG_HD (BASE_DRAG * HD_MULT)
|
#define BASE_DRAG_HD (BASE_DRAG * HD_MULT)
|
||||||
#define ACE_FRAG_RM_EH class EventHandlers {\
|
#define ACE_FRAG_RM_EH class EventHandlers {\
|
||||||
delete ADDON;\
|
delete ADDON;\
|
||||||
}
|
}
|
||||||
|
|
||||||
class CfgAmmo {
|
class CfgAmmo {
|
||||||
class B_65x39_Caseless;
|
class B_65x39_Caseless;
|
||||||
|
|
||||||
class GVAR(base): B_65x39_Caseless {
|
class GVAR(base): B_65x39_Caseless {
|
||||||
ACE_damageType = "grenade"; // compatibility with medical_damage, shrapnel should produce grenade wounds
|
ACE_damageType = "grenade"; // compatibility with medical_damage, shrapnel should produce grenade wounds
|
||||||
timeToLive = 4;
|
timeToLive = 4;
|
||||||
typicalSpeed = 800;
|
typicalSpeed = 800;
|
||||||
maxSpeed = 1500;
|
maxSpeed = 1500;
|
||||||
deflecting = 65;
|
deflecting = 65;
|
||||||
ACE_FRAG_RM_EH;
|
ACE_FRAG_RM_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GVAR(tiny): GVAR(base) {
|
class GVAR(tiny): GVAR(base) {
|
||||||
@ -85,8 +85,8 @@ class CfgAmmo {
|
|||||||
caliber = 2.8;
|
caliber = 2.8;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "cfgAmmoBaseEH.hpp"
|
#include "cfgAmmoBaseEH.hpp"
|
||||||
#include "cfgAmmoSpall.hpp"
|
#include "cfgAmmoSpall.hpp"
|
||||||
#include "cfgAmmoFragParameters.hpp"
|
#include "cfgAmmoFragParameters.hpp"
|
||||||
#include "cfgAmmoFragSpawner.hpp"
|
#include "cfgAmmoFragSpawner.hpp"
|
||||||
};
|
};
|
@ -5,7 +5,7 @@
|
|||||||
[QGVAR(frag_eh), LINKFUNC(doFrag)] call CBA_fnc_addEventHandler;
|
[QGVAR(frag_eh), LINKFUNC(doFrag)] call CBA_fnc_addEventHandler;
|
||||||
[QGVAR(spall_eh), LINKFUNC(doFragMomentum)] call CBA_fnc_addEventHandler;
|
[QGVAR(spall_eh), LINKFUNC(doFragMomentum)] call CBA_fnc_addEventHandler;
|
||||||
[] call FUNC(initBlackList);
|
[] call FUNC(initBlackList);
|
||||||
[] call FUNC(initMaterialCache);
|
[] call FUNC(initMaterialCache);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*if (hasInterface) then {
|
/*if (hasInterface) then {
|
||||||
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
#ifdef DEBUG_MODE_DRAW
|
#ifdef DEBUG_MODE_DRAW
|
||||||
if (hasInterface && GVAR(debugOptions)) then {
|
if (hasInterface && GVAR(debugOptions)) then {
|
||||||
private _h = [LINKFUNC(dev_drawTrace), 0] call CBA_fnc_addPerFrameHandler;
|
private _h = [LINKFUNC(dev_drawTrace), 0] call CBA_fnc_addPerFrameHandler;
|
||||||
missionNamespace setVariable [QGVAR(dev_drawPFEH), _h];
|
missionNamespace setVariable [QGVAR(dev_drawPFEH), _h];
|
||||||
["unit", LINKFUNC(dev_switchUnitHandle), true] call CBA_fnc_addPlayerEventHandler;
|
["unit", LINKFUNC(dev_switchUnitHandle), true] call CBA_fnc_addPlayerEventHandler;
|
||||||
[objNull, ace_player] call FUNC(dev_switchUnitHandle);
|
[objNull, ace_player] call FUNC(dev_switchUnitHandle);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -1,85 +1,85 @@
|
|||||||
#define ACE_FRAG_ADD_EH class EventHandlers {\
|
#define ACE_FRAG_ADD_EH class EventHandlers {\
|
||||||
class ADDON {\
|
class ADDON {\
|
||||||
init = QUOTE(_this call FUNC(initRound););\
|
init = QUOTE(_this call FUNC(initRound););\
|
||||||
};\
|
};\
|
||||||
}
|
}
|
||||||
|
|
||||||
class BombCore;
|
class BombCore;
|
||||||
class Bo_Mk82: BombCore {
|
class Bo_Mk82: BombCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
// We need this since autocannons generally inherit from BulletBase
|
// We need this since autocannons generally inherit from BulletBase
|
||||||
class BulletCore;
|
class BulletCore;
|
||||||
class BulletBase: BulletCore {
|
class BulletBase: BulletCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Grenade;
|
class Grenade;
|
||||||
class GrenadeHand: Grenade {
|
class GrenadeHand: Grenade {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GrenadeCore;
|
class GrenadeCore;
|
||||||
class GrenadeBase: GrenadeCore {
|
class GrenadeBase: GrenadeCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LaserBombCore;
|
class LaserBombCore;
|
||||||
class ammo_Bomb_LaserGuidedBase: LaserBombCore {
|
class ammo_Bomb_LaserGuidedBase: LaserBombCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MissileCore;
|
class MissileCore;
|
||||||
class MissileBase: MissileCore {
|
class MissileBase: MissileCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RocketCore;
|
class RocketCore;
|
||||||
class RocketBase: RocketCore {
|
class RocketBase: RocketCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ArtilleryRocketCore: RocketCore {
|
class ArtilleryRocketCore: RocketCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShellCore;
|
class ShellCore;
|
||||||
class ShellBase: ShellCore {
|
class ShellBase: ShellCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShotDeployCore;
|
class ShotDeployCore;
|
||||||
class ShotDeployBase: ShotDeployCore {
|
class ShotDeployBase: ShotDeployCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShotgunCore;
|
class ShotgunCore;
|
||||||
class ShotgunBase: ShotgunCore {
|
class ShotgunBase: ShotgunCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SubmunitionCore;
|
class SubmunitionCore;
|
||||||
class SubmunitionBase: SubmunitionCore {
|
class SubmunitionBase: SubmunitionCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BoundingMineCore;
|
class BoundingMineCore;
|
||||||
class BoundingMineBase: BoundingMineCore {
|
class BoundingMineBase: BoundingMineCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PipeBombCore;
|
class PipeBombCore;
|
||||||
class PipeBombBase: PipeBombCore {
|
class PipeBombBase: PipeBombCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DirectionalBombCore;
|
class DirectionalBombCore;
|
||||||
class DirectionalBombBase: DirectionalBombCore {
|
class DirectionalBombBase: DirectionalBombCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MineCore;
|
class MineCore;
|
||||||
class MineBase: MineCore {
|
class MineBase: MineCore {
|
||||||
ACE_FRAG_ADD_EH;
|
ACE_FRAG_ADD_EH;
|
||||||
};
|
};
|
@ -13,7 +13,7 @@ class GVAR(spawnbase) : B_65x39_Caseless {
|
|||||||
submunitionParentSpeedCoef = 1;
|
submunitionParentSpeedCoef = 1;
|
||||||
triggerSpeedCoef[] = {0.75, 1.5};
|
triggerSpeedCoef[] = {0.75, 1.5};
|
||||||
triggerTime = 0;
|
triggerTime = 0;
|
||||||
ACE_FRAG_RM_EH;
|
ACE_FRAG_RM_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
@ -23,7 +23,7 @@ class GVAR(def_10) : GVAR(spawnbase) {
|
|||||||
class GVAR(def_10_lo) : GVAR(def_10) {
|
class GVAR(def_10_lo) : GVAR(def_10) {
|
||||||
submunitionConeAngle = 85;
|
submunitionConeAngle = 85;
|
||||||
};
|
};
|
||||||
class GVAR(def_10_mid) : GVAR(def_10) {
|
class GVAR(def_10_mid) : GVAR(def_10) {
|
||||||
submunitionConeAngle = 85;
|
submunitionConeAngle = 85;
|
||||||
triggerSpeedCoef[] = {-1.5, 1.5};
|
triggerSpeedCoef[] = {-1.5, 1.5};
|
||||||
};
|
};
|
||||||
@ -31,13 +31,13 @@ class GVAR(def_10_hi) : GVAR(def_10) {
|
|||||||
submunitionConeAngle = 80;
|
submunitionConeAngle = 80;
|
||||||
triggerSpeedCoef[] = {-1.5, -0.75};
|
triggerSpeedCoef[] = {-1.5, -0.75};
|
||||||
};
|
};
|
||||||
class GVAR(def_10_top) : GVAR(def_10) {
|
class GVAR(def_10_top) : GVAR(def_10) {
|
||||||
submunitionConeAngle = 60;
|
submunitionConeAngle = 60;
|
||||||
triggerSpeedCoef[] = {-1.5, -0.75};
|
triggerSpeedCoef[] = {-1.5, -0.75};
|
||||||
};
|
};
|
||||||
|
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
class GVAR(def_15) : GVAR(spawnbase) {
|
class GVAR(def_15) : GVAR(spawnbase) {
|
||||||
submunitionConeType[] = {"random", 15};
|
submunitionConeType[] = {"random", 15};
|
||||||
};
|
};
|
||||||
class GVAR(def_15_lo) : GVAR(def_15) {
|
class GVAR(def_15_lo) : GVAR(def_15) {
|
||||||
@ -57,7 +57,7 @@ class GVAR(def_15_top) : GVAR(def_15) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
class GVAR(def_5) : GVAR(spawnbase) {
|
class GVAR(def_5) : GVAR(spawnbase) {
|
||||||
submunitionConeType[] = {"random", 5};
|
submunitionConeType[] = {"random", 5};
|
||||||
};
|
};
|
||||||
class GVAR(def_5_lo) : GVAR(def_5) {
|
class GVAR(def_5_lo) : GVAR(def_5) {
|
||||||
@ -77,7 +77,7 @@ class GVAR(def_5_top) : GVAR(def_5) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
class GVAR(def_tiny_15) : GVAR(spawnbase) {
|
class GVAR(def_tiny_15) : GVAR(spawnbase) {
|
||||||
submunitionConeType[] = {"random", 15};
|
submunitionConeType[] = {"random", 15};
|
||||||
submunitionAmmo = QGVAR(tiny);
|
submunitionAmmo = QGVAR(tiny);
|
||||||
};
|
};
|
||||||
@ -98,7 +98,7 @@ class GVAR(def_tiny_15_top) : GVAR(def_tiny_15) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
class GVAR(def_tiny_10) : GVAR(spawnbase) {
|
class GVAR(def_tiny_10) : GVAR(spawnbase) {
|
||||||
submunitionConeType[] = {"random", 10};
|
submunitionConeType[] = {"random", 10};
|
||||||
submunitionAmmo = QGVAR(tiny);
|
submunitionAmmo = QGVAR(tiny);
|
||||||
};
|
};
|
||||||
@ -119,7 +119,7 @@ class GVAR(def_tiny_10_top) : GVAR(def_tiny_10) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
class GVAR(def_tiny_5) : GVAR(spawnbase) {
|
class GVAR(def_tiny_5) : GVAR(spawnbase) {
|
||||||
submunitionConeType[] = {"random", 5};
|
submunitionConeType[] = {"random", 5};
|
||||||
submunitionAmmo = QGVAR(tiny);
|
submunitionAmmo = QGVAR(tiny);
|
||||||
};
|
};
|
||||||
@ -139,7 +139,7 @@ class GVAR(def_tiny_5_top) : GVAR(def_tiny_5) {
|
|||||||
triggerSpeedCoef[] = {-1.5, -0.75};
|
triggerSpeedCoef[] = {-1.5, -0.75};
|
||||||
};
|
};
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
class GVAR(def_small_15) : GVAR(spawnbase) {
|
class GVAR(def_small_15) : GVAR(spawnbase) {
|
||||||
submunitionConeType[] = {"random", 15};
|
submunitionConeType[] = {"random", 15};
|
||||||
submunitionAmmo = QGVAR(small);
|
submunitionAmmo = QGVAR(small);
|
||||||
};
|
};
|
||||||
@ -159,7 +159,7 @@ class GVAR(def_small_15_top) : GVAR(def_small_15) {
|
|||||||
triggerSpeedCoef[] = {-1.15, -0.715};
|
triggerSpeedCoef[] = {-1.15, -0.715};
|
||||||
};
|
};
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
class GVAR(def_small_10) : GVAR(spawnbase) {
|
class GVAR(def_small_10) : GVAR(spawnbase) {
|
||||||
submunitionConeType[] = {"random", 10};
|
submunitionConeType[] = {"random", 10};
|
||||||
submunitionAmmo = QGVAR(small);
|
submunitionAmmo = QGVAR(small);
|
||||||
};
|
};
|
||||||
@ -179,7 +179,7 @@ class GVAR(def_small_10_top) : GVAR(def_small_10) {
|
|||||||
triggerSpeedCoef[] = {-1.10, -0.710};
|
triggerSpeedCoef[] = {-1.10, -0.710};
|
||||||
};
|
};
|
||||||
/********************* ***************************/
|
/********************* ***************************/
|
||||||
class GVAR(def_small_5) : GVAR(spawnbase) {
|
class GVAR(def_small_5) : GVAR(spawnbase) {
|
||||||
submunitionConeType[] = {"random", 5};
|
submunitionConeType[] = {"random", 5};
|
||||||
submunitionAmmo = QGVAR(small);
|
submunitionAmmo = QGVAR(small);
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,7 @@ class GVAR(spallBase) : B_65x39_Caseless {
|
|||||||
triggerSpeedCoef[] = {0.75,1.25};
|
triggerSpeedCoef[] = {0.75,1.25};
|
||||||
deleteParentWhenTriggered = 1;
|
deleteParentWhenTriggered = 1;
|
||||||
submunitionParentSpeedCoef = 1;
|
submunitionParentSpeedCoef = 1;
|
||||||
ACE_FRAG_RM_EH;
|
ACE_FRAG_RM_EH;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ params [
|
|||||||
if (_sidePlayer) then
|
if (_sidePlayer) then
|
||||||
{
|
{
|
||||||
GVAR(dev_trackLines) set [getObjectID _proj, [1, [getposATL _proj], [0, 0, 1, 1]]];
|
GVAR(dev_trackLines) set [getObjectID _proj, [1, [getposATL _proj], [0, 0, 1, 1]]];
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
GVAR(dev_trackLines) set [getObjectID _proj, [1, [getposATL _proj], [1, 0, 0, 1]]];
|
GVAR(dev_trackLines) set [getObjectID _proj, [1, [getposATL _proj], [1, 0, 0, 1]]];
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: _dispAll <BOOL> - Display rounds that will never frag (power < 5).
|
* 0: _dispAll <BOOL> - Display rounds that will never frag (power < 5).
|
||||||
* Default value false
|
* Default value false
|
||||||
* 1: _minFrgPowRng <FLOAT> - minimum range for sqrt power calculation
|
* 1: _minFrgPowRng <FLOAT> - minimum range for sqrt power calculation
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
@ -64,7 +64,7 @@ diag_log text "//****************** fragCalcDump Beg ******************//";
|
|||||||
private _fragCount = getNumber (configFile >> "cfgAmmo" >> _ammo >> QGVAR(fragCount));
|
private _fragCount = getNumber (configFile >> "cfgAmmo" >> _ammo >> QGVAR(fragCount));
|
||||||
if (_fragCount == 0) then {_fragCount = 200; _warn = true};
|
if (_fragCount == 0) then {_fragCount = 200; _warn = true};
|
||||||
|
|
||||||
private _velocity = 0.8 * _gC * sqrt (_c /(_m + _c * _k));
|
private _velocity = 0.8 * _gC * sqrt (_c /(_m + _c * _k));
|
||||||
// number of shrapnel to send a direction
|
// number of shrapnel to send a direction
|
||||||
private _count = ceil (random (sqrt (_m / 1000)));
|
private _count = ceil (random (sqrt (_m / 1000)));
|
||||||
private _fragPowerSpeedRange = [0.5, 1] vectorMultiply _fragPower;
|
private _fragPowerSpeedRange = [0.5, 1] vectorMultiply _fragPower;
|
||||||
|
@ -31,12 +31,12 @@ _aID = _cVic addAction
|
|||||||
[
|
[
|
||||||
"Reset Lines",
|
"Reset Lines",
|
||||||
FUNC(dev_clearTraces),
|
FUNC(dev_clearTraces),
|
||||||
nil, // arguments
|
nil, // arguments
|
||||||
1.5, // priority
|
1.5, // priority
|
||||||
true, // showWindow
|
true, // showWindow
|
||||||
false, // hideOnUse
|
false, // hideOnUse
|
||||||
"", // shortcut
|
"", // shortcut
|
||||||
"true", // condition
|
"true", // condition
|
||||||
8
|
8
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
params [
|
params [
|
||||||
"_obj",
|
"_obj",
|
||||||
["_color", "blue", ["blue"]],
|
["_color", "blue", ["blue"]],
|
||||||
["_isProj", false, [false]]
|
["_isProj", false, [false]]
|
||||||
];
|
];
|
||||||
TRACE_4("devDraw",_this,_obj,_color,_isProj);
|
TRACE_4("devDraw",_this,_obj,_color,_isProj);
|
||||||
/// track round on each frame
|
/// track round on each frame
|
||||||
@ -33,7 +33,7 @@ private _colorArray = switch (toLower _color) do {
|
|||||||
case "red": {[0.8, 0, 0, 1]};
|
case "red": {[0.8, 0, 0, 1]};
|
||||||
case "black": {[1, 1, 1, 1]};
|
case "black": {[1, 1, 1, 1]};
|
||||||
case "white": {[0, 0, 0, 1]};
|
case "white": {[0, 0, 0, 1]};
|
||||||
default {[0, 0.8, 0.8, 1]};
|
default {[0, 0.8, 0.8, 1]};
|
||||||
};
|
};
|
||||||
GVAR(dev_trackLines) set [getObjectID _obj, [1, [getposATL _obj], _colorArray]];
|
GVAR(dev_trackLines) set [getObjectID _obj, [1, [getposATL _obj], _colorArray]];
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ _obj addEventHandler [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Add deflected eventHandler
|
// Add deflected eventHandler
|
||||||
_proj addEventHandler [
|
_obj addEventHandler [
|
||||||
"Deflected",
|
"Deflected",
|
||||||
{
|
{
|
||||||
params ["_proj", "_posASL"];
|
params ["_proj", "_posASL"];
|
||||||
|
@ -25,19 +25,19 @@ _args*/ params [
|
|||||||
["_proj", objNull, [objNull]],
|
["_proj", objNull, [objNull]],
|
||||||
["_posASL", [0,0,0], [[]], [3]],
|
["_posASL", [0,0,0], [[]], [3]],
|
||||||
["_vel", [0,0,0] , [[]], [3]],
|
["_vel", [0,0,0] , [[]], [3]],
|
||||||
["_ammo", "", [""]],
|
["_ammo", "", [""]],
|
||||||
["_shotParents", [objNull, objNull], [[]]]
|
["_shotParents", [objNull, objNull], [[]]]
|
||||||
];
|
];
|
||||||
|
|
||||||
private _shotParentVic = _shotParents#0;
|
private _shotParentVic = _shotParents#0;
|
||||||
if (_shotParentVic getVariable [QGVAR(nextFragTime), -1] > CBA_missionTime) exitWith {
|
if (_shotParentVic getVariable [QGVAR(nextFragTime), -1] > CBA_missionTime) exitWith {
|
||||||
TRACE_1("vehicleTimeExit",_shotParentVic);
|
TRACE_1("vehicleTimeExit",_shotParentVic);
|
||||||
};
|
};
|
||||||
_shotParentVic setVariable [QGVAR(nextFragTime), CBA_missionTime + ACE_FRAG_HOLDOFF_VEHICLE];
|
_shotParentVic setVariable [QGVAR(nextFragTime), CBA_missionTime + ACE_FRAG_HOLDOFF_VEHICLE];
|
||||||
|
|
||||||
private _timeSince = CBA_missionTime - GVAR(lastFragTime);
|
private _timeSince = CBA_missionTime - GVAR(lastFragTime);
|
||||||
if (_ammo isEqualTo "" || {_posASL isEqualTo [0,0,0] || _timeSince < ACE_FRAG_HOLDOFF}) exitWith {
|
if (_ammo isEqualTo "" || {_posASL isEqualTo [0,0,0] || _timeSince < ACE_FRAG_HOLDOFF}) exitWith {
|
||||||
TRACE_3("timeExit",_timeSince,CBA_missionTime,GVAR(lastFragTime));
|
TRACE_3("timeExit",_timeSince,CBA_missionTime,GVAR(lastFragTime));
|
||||||
};
|
};
|
||||||
GVAR(lastFragTime) = CBA_missionTime;
|
GVAR(lastFragTime) = CBA_missionTime;
|
||||||
private _maxFrags = round (linearConversion [0.1, 1.5, _timeSince, ACE_FRAG_COUNT_MIN, ACE_FRAG_COUNT_MAX, true]);
|
private _maxFrags = round (linearConversion [0.1, 1.5, _timeSince, ACE_FRAG_COUNT_MIN, ACE_FRAG_COUNT_MAX, true]);
|
||||||
@ -52,7 +52,6 @@ if (_heightAGL < 0.25) then {
|
|||||||
_posASL = _posASL vectorAdd [0, 0, 0.25];
|
_posASL = _posASL vectorAdd [0, 0, 0.25];
|
||||||
};
|
};
|
||||||
|
|
||||||
// !*! make holdoff a gvar?
|
|
||||||
TRACE_3("fnc_doFragTargeted IF", _fragRange, _timeSince, GVAR(fragSimComplexity));
|
TRACE_3("fnc_doFragTargeted IF", _fragRange, _timeSince, GVAR(fragSimComplexity));
|
||||||
if (_fragRange > 3 && _timeSince > ACE_FRAG_HOLDOFF*1.5 && GVAR(fragSimComplexity) != 1) then {
|
if (_fragRange > 3 && _timeSince > ACE_FRAG_HOLDOFF*1.5 && GVAR(fragSimComplexity) != 1) then {
|
||||||
_maxFrags = _maxFrags - ([_posASL, _fragVel, _fragRange, _maxFrags, _fragTypes, _modFragCount, _shotParents] call FUNC(doFragTargeted));
|
_maxFrags = _maxFrags - ([_posASL, _fragVel, _fragRange, _maxFrags, _fragTypes, _modFragCount, _shotParents] call FUNC(doFragTargeted));
|
||||||
|
@ -39,7 +39,7 @@ private _hMode = switch (true) do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _type = if (count _fragType > 0 &&
|
private _type = if (count _fragType > 0 &&
|
||||||
{"ace_frag_tiny" isEqualTo (_fragType#0)}) then {
|
{"ace_frag_tiny" isEqualTo (_fragType#0)}) then {
|
||||||
QGVAR(def_tiny_)
|
QGVAR(def_tiny_)
|
||||||
} else {
|
} else {
|
||||||
QGVAR(def_small_)
|
QGVAR(def_small_)
|
||||||
@ -69,6 +69,6 @@ _fragSpawner addEventHandler [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
if (GVAR(dbgSphere)) then {
|
if (GVAR(dbgSphere)) then {
|
||||||
[_posASL] call FUNC(dev_sphereDraw);
|
[_posASL] call FUNC(dev_sphereDraw);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
@ -158,9 +158,9 @@ private _fragCount = 0; // limit of # of fragments to _maxFrags
|
|||||||
_fragObj setShotParents _shotPrnt;
|
_fragObj setShotParents _shotPrnt;
|
||||||
#ifdef DEBUG_MODE_DRAW
|
#ifdef DEBUG_MODE_DRAW
|
||||||
[_fragObj, "purple", true] call FUNC(dev_trackObj);
|
[_fragObj, "purple", true] call FUNC(dev_trackObj);
|
||||||
if (GVAR(dbgSphere)) then {
|
if (GVAR(dbgSphere)) then {
|
||||||
[_targetPos, "orange"] call FUNC(dev_sphereDraw);
|
[_targetPos, "orange"] call FUNC(dev_sphereDraw);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_fragCount = _fragCount + _count;
|
_fragCount = _fragCount + _count;
|
||||||
|
@ -19,12 +19,12 @@ TRACE_1("",_this);
|
|||||||
params [
|
params [
|
||||||
"_projectile",
|
"_projectile",
|
||||||
["_hitObj", objNull],
|
["_hitObj", objNull],
|
||||||
// "",
|
// "",
|
||||||
["_lPosASL", [0, 0, 0]],
|
["_lPosASL", [0, 0, 0]],
|
||||||
["_lVel", [0, 0, 0]],
|
["_lVel", [0, 0, 0]],
|
||||||
["_sNorm", [0, 0, 0]],
|
["_sNorm", [0, 0, 0]],
|
||||||
// "",
|
// "",
|
||||||
// "",
|
// "",
|
||||||
["_surfaceType", ""],
|
["_surfaceType", ""],
|
||||||
["_ammo", "", [""]],
|
["_ammo", "", [""]],
|
||||||
["_shotParents", [objNull, objNull], [[]]],
|
["_shotParents", [objNull, objNull], [[]]],
|
||||||
@ -32,9 +32,9 @@ params [
|
|||||||
];
|
];
|
||||||
|
|
||||||
if (CBA_missionTime - GVAR(lastSpallTime) < ACE_FRAG_SPALL_HOLDOFF ||
|
if (CBA_missionTime - GVAR(lastSpallTime) < ACE_FRAG_SPALL_HOLDOFF ||
|
||||||
_lPosASL isEqualTo [0,0,0] ||
|
_lPosASL isEqualTo [0,0,0] ||
|
||||||
{isNull _hitObj || {_hitObj isKindOf "man" ||
|
{isNull _hitObj || {_hitObj isKindOf "man" ||
|
||||||
{_ammo isEqualTo ""}}}) exitWith {
|
{_ammo isEqualTo ""}}}) exitWith {
|
||||||
TRACE_4("time/invldHit",CBA_missionTime,GVAR(lastSpallTime),_hitObj,_lPosASL);
|
TRACE_4("time/invldHit",CBA_missionTime,GVAR(lastSpallTime),_hitObj,_lPosASL);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ private _vel = if (alive _projectile) then {
|
|||||||
|
|
||||||
// Find spall speed / fragment
|
// Find spall speed / fragment
|
||||||
private _dV = vectorMagnitude _lVel - vectorMagnitude _vel;
|
private _dV = vectorMagnitude _lVel - vectorMagnitude _vel;
|
||||||
private _caliber = getNumber (configFile >> "cfgAmmo" >> _ammo >> "caliber"); // !*! optimize this later?
|
private _caliber = getNumber (configFile >> "cfgAmmo" >> _ammo >> "caliber");
|
||||||
// scaled momentum change made on caliber-mass assumption ~sqrt(2)/20 * caliber ~= mass
|
// scaled momentum change made on caliber-mass assumption ~sqrt(2)/20 * caliber ~= mass
|
||||||
private _deltaMomentum = 0.0707 * _caliber * sqrt( _dV ) * GVAR(SpallIntensity);
|
private _deltaMomentum = 0.0707 * _caliber * sqrt( _dV ) * GVAR(SpallIntensity);
|
||||||
TRACE_3("found speed",_dV,_caliber,_deltaMomentum);
|
TRACE_3("found speed",_dV,_caliber,_deltaMomentum);
|
||||||
@ -63,20 +63,19 @@ if (_deltaMomentum < 2) exitWith {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//** start calculating where the spalling should come !*! could be better **//
|
|
||||||
private _lVelUnit = vectorNormalized _lVel;
|
private _lVelUnit = vectorNormalized _lVel;
|
||||||
private _unitStep = _lVelUnit vectorMultiply 0.05;
|
private _unitStep = _lVelUnit vectorMultiply 0.05;
|
||||||
private _spallPos = +_lPosASL;
|
private _spallPos = +_lPosASL;
|
||||||
|
|
||||||
|
if (terrainIntersectASL [_lPosASL vectorAdd _unitStep, _lPosASL]) exitWith {
|
||||||
|
TRACE_3("terrainIntersect",_lPosASL,_unitStep,_lPosASL);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
if (120 > acos ((vectorNormalized _lVelUnit) vectorDotProduct _sNorm)) then {
|
if (120 > acos ((vectorNormalized _lVelUnit) vectorDotProduct _sNorm)) then {
|
||||||
_spallPos = _spallPos vectorAdd (_unitStep vectorMultiply 5);
|
_spallPos = _spallPos vectorAdd (_unitStep vectorMultiply 5);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (terrainIntersectASL [_lPosASL vectorAdd _unitStep, _lPosASL]) exitWith {
|
|
||||||
TRACE_3("terrainIntersect",_lPosASL,_unitStep,_lPosASL);
|
|
||||||
};
|
|
||||||
|
|
||||||
//***** Passed all exit withs *****//
|
//***** Passed all exit withs *****//
|
||||||
GVAR(lastSpallTime) = CBA_missionTime;
|
GVAR(lastSpallTime) = CBA_missionTime;
|
||||||
|
|
||||||
|
@ -33,7 +33,8 @@ _shouldFrag params ["_doFrag", "_doSubmunit"];
|
|||||||
|
|
||||||
if (_doFrag) then {
|
if (_doFrag) then {
|
||||||
// wait for frag damage to kill units before spawning fragments
|
// wait for frag damage to kill units before spawning fragments
|
||||||
_projectile addEventHandler ["Explode", {
|
_projectile addEventHandler ["Explode",
|
||||||
|
{
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
[FUNC(doFrag), [_this]] call CBA_fnc_execNextFrame;
|
[FUNC(doFrag), [_this]] call CBA_fnc_execNextFrame;
|
||||||
} else {
|
} else {
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* _ammoInfo <ARRAY>
|
* _ammoInfo <ARRAY>
|
||||||
* 0: _fragRange - search range for fragments
|
* 0: _fragRange - search range for fragments
|
||||||
* 1: _fragVel - gurney equation calculated velocity
|
* 1: _fragVel - gurney equation calculated velocity
|
||||||
* 2: _fragTypes - array of fragment types
|
* 2: _fragTypes - array of fragment types
|
||||||
* 3: _fragCount - modified frag count used under assumptions
|
* 3: _fragCount - modified frag count used under assumptions
|
||||||
* of spherical fragmentation
|
* of spherical fragmentation
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* ["B_556x45_Ball"] call ace_frag_fnc_getFragInfo;
|
* ["B_556x45_Ball"] call ace_frag_fnc_getFragInfo;
|
||||||
@ -74,7 +74,7 @@ if (_warn) then {
|
|||||||
// 1: _fragVel - gurney equation calculated velocity
|
// 1: _fragVel - gurney equation calculated velocity
|
||||||
// 2: _fragTypes - array of fragment types
|
// 2: _fragTypes - array of fragment types
|
||||||
// 3: _fragCount - modified frag count used under assumptions
|
// 3: _fragCount - modified frag count used under assumptions
|
||||||
// of spherical fragmentation
|
// of spherical fragmentation
|
||||||
_ammoInfo = [
|
_ammoInfo = [
|
||||||
sqrt (_fragCount / (4 * pi * 0.005)),
|
sqrt (_fragCount / (4 * pi * 0.005)),
|
||||||
0.8 * _gC * sqrt (_c / (_m + _c * _k)),
|
0.8 * _gC * sqrt (_c / (_m + _c * _k)),
|
||||||
|
@ -29,11 +29,11 @@ if (isClass (configFile >> "CfgSurfaces" >> _surfType)) then {
|
|||||||
_material = getText (configFile >> "CfgSurfaces" >> _surfType >> "soundEnviron");
|
_material = getText (configFile >> "CfgSurfaces" >> _surfType >> "soundEnviron");
|
||||||
} else { // Messy way when a surface isn't added to cfgSurfaces
|
} else { // Messy way when a surface isn't added to cfgSurfaces
|
||||||
private _surfFileText = tolower preprocessFile _surfType;
|
private _surfFileText = tolower preprocessFile _surfType;
|
||||||
_surfFileText = _surfFileText regexReplace ["[^a-z0-9]", ""];
|
_surfFileText = _surfFileText regexReplace ["[^a-z0-9]", ""];
|
||||||
private _idx = 12 + (_surfFileText find "soundenviron");
|
private _idx = 12 + (_surfFileText find "soundenviron");
|
||||||
if (_surfFileText select [_idx, 5] isEqualTo "empty") then {
|
if (_surfFileText select [_idx, 5] isEqualTo "empty") then {
|
||||||
_idx = 8 + (_surfFileText find "soundhit");
|
_idx = 8 + (_surfFileText find "soundhit");
|
||||||
};
|
};
|
||||||
_material = _surfFileText select [_idx, 10];
|
_material = _surfFileText select [_idx, 10];
|
||||||
};
|
};
|
||||||
TRACE_1("materialSubString",_material);
|
TRACE_1("materialSubString",_material);
|
||||||
@ -46,7 +46,7 @@ _material = switch (true) do {
|
|||||||
case ("rock" in _material): { "rock" };
|
case ("rock" in _material): { "rock" };
|
||||||
case ("wood" in _material): { "wood" };
|
case ("wood" in _material): { "wood" };
|
||||||
case ("lino" in _material);
|
case ("lino" in _material);
|
||||||
case ("building" in _material);
|
case ("building" in _material);
|
||||||
case ("concrete" in _material): { "concrete" };
|
case ("concrete" in _material): { "concrete" };
|
||||||
case ("metal" in _material): { "metal" };
|
case ("metal" in _material): { "metal" };
|
||||||
default { "ground" };
|
default { "ground" };
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* _shouldFrag <ARRAY>
|
* _shouldFrag <ARRAY>
|
||||||
* 0 - Should the specific round fragment
|
* 0 - Should the specific round fragment
|
||||||
* 1 - Does the munition have a child submunition
|
* 1 - Does the munition have a child submunition
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
|
@ -25,7 +25,6 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
|
|||||||
1
|
1
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
/// !*! TODO: add stringtable entries
|
|
||||||
[
|
[
|
||||||
QGVAR(fragSimComplexity), "LIST",
|
QGVAR(fragSimComplexity), "LIST",
|
||||||
[LSTRING(FragMode), LSTRING(FragMode_Desc)],
|
[LSTRING(FragMode), LSTRING(FragMode_Desc)],
|
||||||
@ -33,7 +32,7 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
|
|||||||
[_category, LSTRING(Frag)],
|
[_category, LSTRING(Frag)],
|
||||||
[[2, 1, 0], [LSTRING(FragMode_Opt2),LSTRING(FragMode_Opt1),LSTRING(FragMode_Opt0)], 2],
|
[[2, 1, 0], [LSTRING(FragMode_Opt2),LSTRING(FragMode_Opt1),LSTRING(FragMode_Opt0)], 2],
|
||||||
// [[2, 1, 0], ["Targeted & random fragmentation","Random fragmentation","Unit targeted fragmentation"], 2],
|
// [[2, 1, 0], ["Targeted & random fragmentation","Random fragmentation","Unit targeted fragmentation"], 2],
|
||||||
true
|
true
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[
|
[
|
||||||
@ -50,9 +49,9 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
|
|||||||
// ["Fragmentation BlackList", "Array of ammo classnames strings to blackist fragmentation for."],
|
// ["Fragmentation BlackList", "Array of ammo classnames strings to blackist fragmentation for."],
|
||||||
[_category, LSTRING(Frag)],
|
[_category, LSTRING(Frag)],
|
||||||
QUOTE(['B_556x45_Ball']),
|
QUOTE(['B_556x45_Ball']),
|
||||||
true,
|
true,
|
||||||
nil,
|
nil,
|
||||||
true
|
true
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[
|
[
|
||||||
@ -60,5 +59,5 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
|
|||||||
[LSTRING(SpallIntensity), LSTRING(SpallIntensity_Desc)],
|
[LSTRING(SpallIntensity), LSTRING(SpallIntensity_Desc)],
|
||||||
[_category, LSTRING(Spall)],
|
[_category, LSTRING(Spall)],
|
||||||
[0.1, 2, 1, 1],
|
[0.1, 2, 1, 1],
|
||||||
true
|
true
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
Loading…
Reference in New Issue
Block a user