mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
removed some redundant switch cases
This commit is contained in:
parent
f852a3ab2d
commit
c3f04596c0
@ -35,13 +35,12 @@ TRACE_5("fnc_doFragRandom", _posASL, _projVel, _heightAGL, _fragType, _fragCnt);
|
|||||||
private _hMode = switch (true) do {
|
private _hMode = switch (true) do {
|
||||||
case (_heightAGL > 10): {"_top"};
|
case (_heightAGL > 10): {"_top"};
|
||||||
case (_heightAGL > 5): {"_hi"};
|
case (_heightAGL > 5): {"_hi"};
|
||||||
case (_heightAGL > 1.5): {"_mid"};
|
|
||||||
default {"_mid"};
|
default {"_mid"};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Select the cfgAmmo type
|
// Select the cfgAmmo type
|
||||||
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_)
|
||||||
@ -55,6 +54,7 @@ _fragCnt = switch (true) do {
|
|||||||
|
|
||||||
// Spawn the fragment spawner
|
// Spawn the fragment spawner
|
||||||
private _fragSpawner = createVehicle [_type + _fragCnt + _hMode, ASLToATL _posASL, [], 0, "CAN_COLLIDE"];
|
private _fragSpawner = createVehicle [_type + _fragCnt + _hMode, ASLToATL _posASL, [], 0, "CAN_COLLIDE"];
|
||||||
|
_fragSpawner setVectorDirandUp [[0,0,1], [1,0,0]];
|
||||||
_fragSpawner setVelocity _projVel;
|
_fragSpawner setVelocity _projVel;
|
||||||
_fragSpawner setShotParents _shotParents;
|
_fragSpawner setShotParents _shotParents;
|
||||||
|
|
||||||
@ -63,9 +63,9 @@ _fragSpawner setShotParents _shotParents;
|
|||||||
_fragSpawner addEventHandler [
|
_fragSpawner addEventHandler [
|
||||||
"SubmunitionCreated",
|
"SubmunitionCreated",
|
||||||
{
|
{
|
||||||
params ["","_proj","_posASL"];
|
params ["","_subProj"];
|
||||||
[_posASL] call FUNC(dev_sphereDraw);
|
[_subProj, "green", true] call FUNC(dev_trackObj);
|
||||||
[_proj, "green", true] call FUNC(dev_trackObj);
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
[_posASL] call FUNC(dev_sphereDraw);
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user