Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Timi007 committed Dec 15, 2024
2 parents cf9fd97 + 2905fe1 commit 7463227
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 51 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="https://github.com/Metis-Team/mts_enhanced/releases/latest">
<img src="https://img.shields.io/badge/Version-1.7.1-blue.svg?style=flat-square" alt="Metis Enhanced Version">
<img src="https://img.shields.io/badge/Version-1.7.2-blue.svg?style=flat-square" alt="Metis Enhanced Version">
</a>
<a href="https://github.com/Metis-Team/mts_enhanced/releases/latest">
<img src="https://img.shields.io/github/downloads/Metis-Team/mts_enhanced/total.svg?style=flat-square&label=Downloads" alt="Metis Enhanced Downloads">
Expand Down
4 changes: 2 additions & 2 deletions addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 7
#define PATCHLVL 1
#define BUILD 241127
#define PATCHLVL 2
#define BUILD 241215
15 changes: 10 additions & 5 deletions addons/zeus/functions/fnc_artyAirburst.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,23 @@ params ["_projectile", "_detonationHight"];

CHECK(!isServer);

TRACE_2("params",_projectile,_detonationHight);

[{
params ["_argsArray", "_PFHID"];
_argsArray params ["_projectile", "_detonationHight"];

private _projectilePos = getPosATL _projectile;
private _projectilePos = getPosATLVisual _projectile;
if ((_projectilePos select 2) < _detonationHight) exitWith {
// give projectile shrapnels
[_projectilePos, velocity _projectile, "Sh_155mm_AMOS"] call ace_frag_fnc_frago;
private _projectilePosASL = getPosASLVisual _projectile;
private _projectileType = typeOf _projectile;
TRACE_2("burst",_projectilePosASL,_projectileType);

_projectile setVelocity [0,0,0];
"HelicopterExploSmall" createVehicle _projectilePos;
deleteVehicle _projectile;
"HelicopterExploSmall" createVehicle _projectilePos;

// give projectile shrapnels
[_projectilePosASL, _projectileType] call ace_frag_fnc_frago;

[_PFHID] call CBA_fnc_removePerFrameHandler;
};
Expand Down
20 changes: 11 additions & 9 deletions addons/zeus/functions/fnc_artyFireMissionHE.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ params [
//select airburst hight
private _detonationHight = [0, 15, 20, 30] select _airburstType;

if (_delayType isEqualTo 0) then {
[_position, _ammoType, _ammoAmount, false, _delay, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
if (_delayType isEqualTo 1) then {
[_position, _ammoType, _ammoAmount, true, _duration, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
if (_delayType isEqualTo 2) then {
_ammoAmount = ceil (_duration / _delay);
[_position, _ammoType, _ammoAmount, false, _delay, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
switch (_delayType) do {
case 0: {
[_position, _ammoType, _ammoAmount, false, _delay, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
case 1: {
[_position, _ammoType, _ammoAmount, true, _duration, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
case 2: {
_ammoAmount = ceil (_duration / _delay);
[_position, _ammoType, _ammoAmount, false, _delay, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
};
},
{},
Expand Down
42 changes: 22 additions & 20 deletions addons/zeus/functions/fnc_artyFireMissionILLUM.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,30 @@ params [
(_this select 0) params ["_ammoAmount", "_detonationHight", "_delayType", "_delay", "_duration"];
(_this select 1) params ["_position", "_impactArea", "_timeOnTarget"];

_ammoAmount = parseNumber _ammoAmount;
_detonationHight = parseNumber _detonationHight;
_delay = parseNumber _delay;
_duration = parseNumber _duration;
_ammoAmount = parseNumber _ammoAmount;
_detonationHight = parseNumber _detonationHight;
_delay = parseNumber _delay;
_duration = parseNumber _duration;

if (_delay < 0 || _detonationHight < 150 || _duration < 0) exitWith {
[LLSTRING(artillery_errorDelayOrHight)] call zen_common_fnc_showMessage;
};
if (_ammoAmount <= 0) exitWith {
[LLSTRING(artillery_errorAmount)] call zen_common_fnc_showMessage;
};
if (_delay < 0 || _detonationHight < 150 || _duration < 0) exitWith {
[LLSTRING(artillery_errorDelayOrHight)] call zen_common_fnc_showMessage;
};
if (_ammoAmount <= 0) exitWith {
[LLSTRING(artillery_errorAmount)] call zen_common_fnc_showMessage;
};

if (_delayType isEqualTo 0) then {
[_position, QGVAR(artillery_ILLUM), _ammoAmount, false, _delay, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
if (_delayType isEqualTo 1) then {
[_position, QGVAR(artillery_ILLUM), _ammoAmount, true, _duration, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
if (_delayType isEqualTo 2) then {
_ammoAmount = ceil (_duration / _delay);
[_position, QGVAR(artillery_ILLUM), _ammoAmount, false, _delay, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
switch (_delayType) do {
case 0: {
[_position, QGVAR(artillery_ILLUM), _ammoAmount, false, _delay, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
case 1: {
[_position, QGVAR(artillery_ILLUM), _ammoAmount, true, _duration, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
case 2: {
_ammoAmount = ceil (_duration / _delay);
[_position, QGVAR(artillery_ILLUM), _ammoAmount, false, _delay, _detonationHight, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
};
},
{},
[_position, _impactArea, _timeOnTarget]
Expand Down
20 changes: 11 additions & 9 deletions addons/zeus/functions/fnc_artyFireMissionSMOKE.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,17 @@ params [
[LLSTRING(artillery_errorAmount)] call zen_common_fnc_showMessage;
};

if (_delayType isEqualTo 0) then {
[_position, "Smoke_120mm_AMOS_White", _ammoAmount, false, _delay, 0, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
if (_delayType isEqualTo 1) then {
[_position, "Smoke_120mm_AMOS_White", _ammoAmount, true, _duration, 0, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
if (_delayType isEqualTo 2) then {
_ammoAmount = ceil (_duration / _delay);
[_position, "Smoke_120mm_AMOS_White", _ammoAmount, false, _delay, 0, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
switch (_delayType) do {
case 0: {
[_position, "Smoke_120mm_AMOS_White", _ammoAmount, false, _delay, 0, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
case 1: {
[_position, "Smoke_120mm_AMOS_White", _ammoAmount, true, _duration, 0, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
case 2: {
_ammoAmount = ceil (_duration / _delay);
[_position, "Smoke_120mm_AMOS_White", _ammoAmount, false, _delay, 0, _impactArea, _timeOnTarget] call FUNC(execArtyStrike);
};
};
},
{},
Expand Down
10 changes: 5 additions & 5 deletions addons/zeus/functions/fnc_moduleArtillery.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@
_position set [2, 0];
};

call {
if (_ammoType isEqualTo 0) exitWith {
switch (_ammoType) do {
case 0: {
[FUNC(artyFireMissionHE), [_position, "Sh_155mm_AMOS", [_areaLenght, _areaWidth, _areaAngle], _timeOnTarget]] call CBA_fnc_execNextFrame;
};
if (_ammoType isEqualTo 1) exitWith {
case 1: {
[FUNC(artyFireMissionHE), [_position, "Sh_82mm_AMOS", [_areaLenght, _areaWidth, _areaAngle], _timeOnTarget]] call CBA_fnc_execNextFrame;
};
if (_ammoType isEqualTo 2) exitWith {
case 2: {
[FUNC(artyFireMissionSMOKE), [_position, [_areaLenght, _areaWidth, _areaAngle], _timeOnTarget]] call CBA_fnc_execNextFrame;
};
if (_ammoType isEqualTo 3) exitWith {
case 3: {
[FUNC(artyFireMissionILLUM), [_position, [_areaLenght, _areaWidth, _areaAngle], _timeOnTarget]] call CBA_fnc_execNextFrame;
};
};
Expand Down

0 comments on commit 7463227

Please sign in to comment.