Skip to content

Commit

Permalink
Improve launcher range (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoramD0 authored Jan 9, 2022
1 parent 8f468ee commit 18b1c71
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 36 deletions.
1 change: 1 addition & 0 deletions Olympus.Stratis/functions/fn_initArsenalCrate.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private _launcher = [
"CUP_PG7VR_M",
"CUP_PG7VM_M",
"launch_MRAWS_green_rail_F",
"launch_MRAWS_green_F",
"launch_NLAW_F",
"launch_RPG32_green_F",
"MRAWS_HEAT_F",
Expand Down
70 changes: 36 additions & 34 deletions Olympus.Stratis/functions/fn_resetDamagedObjects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

params ["_controller", "_targetPads", "_targetClasses"];

if (isServer) exitWith {
if (isServer) then {
{
private _vehicle = createVehicle [_targetClasses select _forEachIndex, _x, [], 0, "CAN_COLLIDE"];
_vehicle setDir (getDir _x);
Expand All @@ -30,39 +30,41 @@ if (isServer) exitWith {
} forEach _targetPads;
};

private _action = [
QGVAR(resetDamageAction),
"Reset targets",
"a3\missions_f_exp\data\img\lobby\ui_campaign_lobby_background_tablet_button_respawn02_ca.paa",
{
(_this select 2) params ["_targetPads", "_targetClasses"];
if (hasInterface) then {
private _action = [
QGVAR(resetDamageAction),
"Reset targets",
"a3\missions_f_exp\data\img\lobby\ui_campaign_lobby_background_tablet_button_respawn02_ca.paa",
{
private _type = _targetClasses select _forEachIndex;
private _nearestObjects = nearestObjects [_x, [_type], 5];
private _target = _nearestObjects select 0;
if (_nearestObjects isEqualTo [] || {damage _target != 0}) then {
deleteVehicle _target;
(_this select 2) params ["_targetPads", "_targetClasses"];
{
private _type = _targetClasses select _forEachIndex;
private _nearestObjects = nearestObjects [_x, [_type], 5];
private _target = _nearestObjects select 0;
if (_nearestObjects isEqualTo [] || {damage _target != 0}) then {
deleteVehicle _target;

[
{
params ["_type", "_position"];
private _newTarget = createVehicle [_type, _position, [], 0, "CAN_COLLIDE"];
_newTarget setDir (getDir _position);
_newTarget setVehicleLock "LOCKED";
_newTarget setVehicleAmmo 0;
clearMagazineCargoGlobal _newTarget;
clearWeaponCargoGlobal _newTarget;
clearItemCargoGlobal _newTarget;
},
[_type, _x],
2
] call CBA_fnc_waitAndExecute;
};
} forEach _targetPads;
},
{true},
{},
[_targetPads, _targetClasses]
] call ACEFUNC(interact_menu,createAction);
[
{
params ["_type", "_position"];
private _newTarget = createVehicle [_type, _position, [], 0, "CAN_COLLIDE"];
_newTarget setDir (getDir _position);
_newTarget setVehicleLock "LOCKED";
_newTarget setVehicleAmmo 0;
clearMagazineCargoGlobal _newTarget;
clearWeaponCargoGlobal _newTarget;
clearItemCargoGlobal _newTarget;
},
[_type, _x],
2
] call CBA_fnc_waitAndExecute;
};
} forEach _targetPads;
},
{true},
{},
[_targetPads, _targetClasses]
] call ACEFUNC(interact_menu,createAction);

[_controller, 0, ["ACE_MainActions"], _action] call ACEFUNC(interact_menu,addActionToObject);
[_controller, 0, ["ACE_MainActions"], _action] call ACEFUNC(interact_menu,addActionToObject);
};
2 changes: 1 addition & 1 deletion Olympus.Stratis/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Version
#define MAJOR 3
#define MINOR 6
#define PATCHLVL 0
#define PATCHLVL 1

// Map
#define MAP Stratis
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>
<p align="center">
<a href="https://github.com/Theseus-Aegis/Olympus/releases/latest">
<img src="https://img.shields.io/badge/Version-3.6.0-blue.svg" alt="Olympus Version">
<img src="https://img.shields.io/badge/Version-3.6.1-blue.svg" alt="Olympus Version">
</a>
<a href="https://github.com/Theseus-Aegis/Olympus/issues">
<img src="https://img.shields.io/github/issues-raw/Theseus-Aegis/Olympus.svg?label=Issues" alt="Olympus Issues">
Expand Down

0 comments on commit 18b1c71

Please sign in to comment.