Base Cleanup

Headers
Formating
Small optimizations
This commit is contained in:
PabstMirror
2015-02-19 19:32:41 -06:00
parent a8e269bc18
commit 9935ac57bd
11 changed files with 310 additions and 292 deletions

View File

@ -1,44 +1,44 @@
class Extended_PreInit_EventHandlers { class Extended_PreInit_EventHandlers {
class ADDON { class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) ); init = QUOTE( call COMPILE_FILE(XEH_preInit) );
}; };
}; };
class Extended_PostInit_EventHandlers { class Extended_PostInit_EventHandlers {
class ADDON { class ADDON {
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) ); clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
}; };
}; };
class Extended_FiredBIS_EventHandlers { class Extended_FiredBIS_EventHandlers {
class CAManBase { class CAManBase {
class ADDON { class ADDON {
firedBIS = QUOTE( _this call FUNC(replaceATWeapon) ); firedBIS = QUOTE( _this call FUNC(replaceATWeapon) );
};
}; };
};
}; };
// handle preloaded missile // handle preloaded missile
class Extended_Init_EventHandlers { class Extended_Init_EventHandlers {
class CAManBase { class CAManBase {
class ADDON { class ADDON {
init = QUOTE( _this call FUNC(takeLoadedATWeapon) ); init = QUOTE( _this call FUNC(takeLoadedATWeapon) );
};
}; };
};
}; };
class Extended_Take_EventHandlers { class Extended_Take_EventHandlers {
class CAManBase { class CAManBase {
class ADDON { class ADDON {
take = QUOTE( _this call FUNC(takeLoadedATWeapon); [_this select 0] call FUNC(updateInventoryDisplay); ); take = QUOTE( _this call FUNC(takeLoadedATWeapon); [_this select 0] call FUNC(updateInventoryDisplay); );
};
}; };
};
}; };
class Extended_Put_EventHandlers { class Extended_Put_EventHandlers {
class CAManBase { class CAManBase {
class ADDON { class ADDON {
put = QUOTE( [_this select 0] call FUNC(updateInventoryDisplay); ); put = QUOTE( [_this select 0] call FUNC(updateInventoryDisplay); );
};
}; };
};
}; };

View File

@ -1,24 +1,24 @@
class CfgMagazines { class CfgMagazines {
class NLAW_F; class NLAW_F;
class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
scope = 1; scope = 1;
displayName = "$STR_ACE_Disposable_PreloadedMissileDummy"; displayName = "$STR_ACE_Disposable_PreloadedMissileDummy";
picture = PATHTOEF(common,UI\blank_CO.paa); picture = PATHTOEF(common,UI\blank_CO.paa);
weaponPoolAvailable = 0; weaponPoolAvailable = 0;
mass = 0; mass = 0;
}; };
class ACE_FiredMissileDummy: ACE_PreloadedMissileDummy { class ACE_FiredMissileDummy: ACE_PreloadedMissileDummy {
count = 0; count = 0;
}; };
class ACE_UsedTube_F: NLAW_F { class ACE_UsedTube_F: NLAW_F {
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
displayName = "$STR_ACE_Disposable_UsedTube"; displayName = "$STR_ACE_Disposable_UsedTube";
descriptionShort = "$STR_ACE_Disposable_UsedTubeDescription"; descriptionShort = "$STR_ACE_Disposable_UsedTubeDescription";
displayNameShort = "-"; displayNameShort = "-";
count = 0; count = 0;
weaponPoolAvailable = 0; weaponPoolAvailable = 0;
modelSpecial = ""; modelSpecial = "";
mass = 0; mass = 0;
}; };
}; };

View File

@ -1,146 +1,146 @@
class CfgVehicles { class CfgVehicles {
#define MACRO_NONLAW \ #define MACRO_NONLAW \
class TransportMagazines { \ class TransportMagazines { \
class _xx_NLAW_F { \ class _xx_NLAW_F { \
count = 0; \ count = 0; \
}; \ }; \
};
class ReammoBox_F;
class NATO_Box_Base: ReammoBox_F {};
class Box_NATO_Ammo_F: NATO_Box_Base {
MACRO_NONLAW
};
class Box_NATO_WpsLaunch_F: NATO_Box_Base {
MACRO_NONLAW
}; };
class ReammoBox_F; class IND_Box_Base: ReammoBox_F {};
class NATO_Box_Base: ReammoBox_F {}; class Box_IND_WpsLaunch_F: IND_Box_Base {
class Box_NATO_Ammo_F: NATO_Box_Base { MACRO_NONLAW
MACRO_NONLAW };
}; class Box_IND_Ammo_F: IND_Box_Base {
class Box_NATO_WpsLaunch_F: NATO_Box_Base { MACRO_NONLAW
MACRO_NONLAW };
};
class IND_Box_Base: ReammoBox_F {}; class B_supplyCrate_F: ReammoBox_F {
class Box_IND_WpsLaunch_F: IND_Box_Base { MACRO_NONLAW
MACRO_NONLAW };
}; class I_supplyCrate_F: B_supplyCrate_F {
class Box_IND_Ammo_F: IND_Box_Base { MACRO_NONLAW
MACRO_NONLAW };
}; class C_supplyCrate_F: ReammoBox_F {
MACRO_NONLAW
};
class B_supplyCrate_F: ReammoBox_F { class B_AssaultPack_rgr;
MACRO_NONLAW class B_AssaultPack_rgr_LAT: B_AssaultPack_rgr {
}; MACRO_NONLAW
class I_supplyCrate_F: B_supplyCrate_F { };
MACRO_NONLAW class B_AssaultPack_rgr_ReconLAT: B_AssaultPack_rgr {
}; MACRO_NONLAW
class C_supplyCrate_F: ReammoBox_F { };
MACRO_NONLAW
};
class B_AssaultPack_rgr; class B_Carryall_mcamo;
class B_AssaultPack_rgr_LAT: B_AssaultPack_rgr { class B_AssaultPack_mcamo_Ammo: B_Carryall_mcamo {
MACRO_NONLAW MACRO_NONLAW
}; };
class B_AssaultPack_rgr_ReconLAT: B_AssaultPack_rgr { class B_Carryall_oli;
MACRO_NONLAW class I_Fieldpack_oli_Ammo: B_Carryall_oli {
}; MACRO_NONLAW
};
class B_Carryall_mcamo; class B_AssaultPack_dgtl;
class B_AssaultPack_mcamo_Ammo: B_Carryall_mcamo { class I_Fieldpack_oli_LAT: B_AssaultPack_dgtl {
MACRO_NONLAW MACRO_NONLAW
}; };
class B_Carryall_oli;
class I_Fieldpack_oli_Ammo: B_Carryall_oli {
MACRO_NONLAW
};
class B_AssaultPack_dgtl; class CargoNet_01_ammo_base_F;
class I_Fieldpack_oli_LAT: B_AssaultPack_dgtl { class B_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F {
MACRO_NONLAW MACRO_NONLAW
}; };
class I_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F {
MACRO_NONLAW
};
class CargoNet_01_ammo_base_F; class Slingload_01_Base_F;
class B_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F { class B_Slingload_01_Cargo_F: Slingload_01_Base_F {
MACRO_NONLAW MACRO_NONLAW
}; };
class I_CargoNet_01_ammo_F: CargoNet_01_ammo_base_F {
MACRO_NONLAW
};
class Slingload_01_Base_F; class Tank_F;
class B_Slingload_01_Cargo_F: Slingload_01_Base_F { class APC_Tracked_01_base_F: Tank_F {
MACRO_NONLAW
};
/*class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {
MACRO_NONLAW MACRO_NONLAW
}; };
class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F {
class Tank_F; MACRO_NONLAW
class APC_Tracked_01_base_F: Tank_F { };
MACRO_NONLAW class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F {
}; MACRO_NONLAW
/*class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F { };
MACRO_NONLAW class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F {
}; MACRO_NONLAW
class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F { };*/
MACRO_NONLAW
}; class Car_F;
class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { class MRAP_01_base_F: Car_F {
MACRO_NONLAW MACRO_NONLAW
}; };
class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { /*class MRAP_01_gmg_base_F: MRAP_01_base_F {
MACRO_NONLAW MACRO_NONLAW
};*/ };
class MRAP_01_hmg_base_F: MRAP_01_gmg_base_F {
class Car_F; MACRO_NONLAW
class MRAP_01_base_F: Car_F { };
MACRO_NONLAW class B_MRAP_01_F: MRAP_01_base_F {
}; MACRO_NONLAW
/*class MRAP_01_gmg_base_F: MRAP_01_base_F { };
MACRO_NONLAW class B_MRAP_01_gmg_F: MRAP_01_gmg_base_F {
}; MACRO_NONLAW
class MRAP_01_hmg_base_F: MRAP_01_gmg_base_F { };
MACRO_NONLAW class B_MRAP_01_hmg_F: MRAP_01_hmg_base_F {
}; MACRO_NONLAW
class B_MRAP_01_F: MRAP_01_base_F { };*/
MACRO_NONLAW
}; class MRAP_03_base_F: Car_F {
class B_MRAP_01_gmg_F: MRAP_01_gmg_base_F { MACRO_NONLAW
MACRO_NONLAW };
}; /*class MRAP_03_hmg_base_F: MRAP_03_base_F {
class B_MRAP_01_hmg_F: MRAP_01_hmg_base_F { MACRO_NONLAW
MACRO_NONLAW };
};*/ class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F {
MACRO_NONLAW
class MRAP_03_base_F: Car_F { };
MACRO_NONLAW class I_MRAP_03_F: MRAP_03_base_F {
}; MACRO_NONLAW
/*class MRAP_03_hmg_base_F: MRAP_03_base_F { };
MACRO_NONLAW class I_MRAP_03_hmg_F: MRAP_03_hmg_base_F {
}; MACRO_NONLAW
class MRAP_03_gmg_base_F: MRAP_03_hmg_base_F { };
MACRO_NONLAW class I_MRAP_03_gmg_F: MRAP_03_gmg_base_F {
}; MACRO_NONLAW
class I_MRAP_03_F: MRAP_03_base_F { };*/
MACRO_NONLAW
}; class Wheeled_APC_F: Car_F {};
class I_MRAP_03_hmg_F: MRAP_03_hmg_base_F { class APC_Wheeled_03_base_F: Wheeled_APC_F {
MACRO_NONLAW MACRO_NONLAW
}; };
class I_MRAP_03_gmg_F: MRAP_03_gmg_base_F { class APC_Wheeled_01_base_F: Wheeled_APC_F {
MACRO_NONLAW MACRO_NONLAW
};*/ };
/*class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {
class Wheeled_APC_F: Car_F {}; MACRO_NONLAW
class APC_Wheeled_03_base_F: Wheeled_APC_F { };
MACRO_NONLAW class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F {
}; MACRO_NONLAW
class APC_Wheeled_01_base_F: Wheeled_APC_F { };
MACRO_NONLAW class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F {
}; MACRO_NONLAW
/*class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F { };
MACRO_NONLAW class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F {
}; MACRO_NONLAW
class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { };*/
MACRO_NONLAW
};
class I_APC_Wheeled_03_base_F: APC_Wheeled_03_base_F {
MACRO_NONLAW
};
class I_APC_Wheeled_03_cannon_F: I_APC_Wheeled_03_base_F {
MACRO_NONLAW
};*/
}; };

View File

@ -1,18 +1,18 @@
class CfgWeapons { class CfgWeapons {
class Launcher_Base_F; class Launcher_Base_F;
class launch_NLAW_F: Launcher_Base_F { class launch_NLAW_F: Launcher_Base_F {
ACE_UsedTube = "ACE_launch_NLAW_Used_F"; // The class name of the used tube. ACE_UsedTube = "ACE_launch_NLAW_Used_F"; // The class name of the used tube.
magazines[] = {"ACE_PreloadedMissileDummy"}; // The dummy magazine magazines[] = {"ACE_PreloadedMissileDummy"}; // The dummy magazine
}; };
class ACE_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher class ACE_launch_NLAW_Used_F: launch_NLAW_F { // the used tube should be a sub class of the disposable launcher
scope = 1; scope = 1;
ACE_isUsedLauncher = 1; ACE_isUsedLauncher = 1;
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
displayName = "$STR_ACE_Disposable_UsedTube"; displayName = "$STR_ACE_Disposable_UsedTube";
descriptionShort = "$STR_ACE_Disposable_UsedTubeDescription"; descriptionShort = "$STR_ACE_Disposable_UsedTubeDescription";
magazines[] = {"ACE_FiredMissileDummy"}; // This will disable the used launcher class from being fired again. magazines[] = {"ACE_FiredMissileDummy"}; // This will disable the used launcher class from being fired again.
//picture = ""; @todo //picture = ""; @todo
//model = ""; @todo //model = ""; @todo
weaponPoolAvailable = 0; weaponPoolAvailable = 0;
}; };
}; };

View File

@ -1,7 +1,7 @@
ace_disposable ace_disposable
============== ==============
Makes the NLAW a disposable one-way weapon. Makes the NLAW a disposable one-shot weapon.
## Maintainers ## Maintainers

View File

@ -5,9 +5,9 @@
#include "script_component.hpp" #include "script_component.hpp"
if (isNil QGVAR(UpdateInventoryDisplay_EHID)) then { if (isNil QGVAR(UpdateInventoryDisplay_EHID)) then {
GVAR(UpdateInventoryDisplay_EHID) = ["inventoryDisplayLoaded",{ GVAR(UpdateInventoryDisplay_EHID) = ["inventoryDisplayLoaded",{
_player = ACE_player; _player = ACE_player;
[_player, secondaryWeapon _player] call FUNC(takeLoadedATWeapon); [_player] call FUNC(takeLoadedATWeapon);
[_player, (_this select 0)] call FUNC(updateInventoryDisplay); [_player, (_this select 0)] call FUNC(updateInventoryDisplay);
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);
}; };

View File

@ -1,15 +1,15 @@
#include "script_component.hpp" #include "script_component.hpp"
class CfgPatches { class CfgPatches {
class ADDON { class ADDON {
units[] = {}; units[] = {};
weapons[] = {}; weapons[] = {};
requiredVersion = REQUIRED_VERSION; requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"}; requiredAddons[] = {"ace_common"};
author[] = {"commy2"}; author[] = {"commy2"};
authorUrl = "https://github.com/commy2/"; authorUrl = "https://github.com/commy2/";
VERSION_CONFIG; VERSION_CONFIG;
}; };
}; };
#include "CfgEventHandlers.hpp" #include "CfgEventHandlers.hpp"

View File

@ -1,32 +1,36 @@
/* /*
* Author: bux, commy2 * Author: bux, commy2
* * Remove the ai's missle launcher tube after the missle has exploded
* Remove the ai's missle launcher tube *
* * Arguments:
* Return value: * 0: Params [unit<OBJECT>, Tube<STRING>, Projectile<OBJECT>] <ARRAY>
* Nothing * 1: CBA PFH ID <NUMBER>
*/ *
* Return Value:
* Nothing
*
* Example:
* [[someAI, "emptyTube", theRocket], 55] call ace_disposable_fnc_aiDropWeaponCallback;
*
* Public: No
*/
#include "script_component.hpp" #include "script_component.hpp"
private ["_unit", "_tube", "_projectile", "_logic"]; EXPLODE_2_PVT(_this,_params,_pfhId);
EXPLODE_3_PVT(_params,_unit,_tube,_projectile);
_unit = (_this select 0) select 0;
_tube = (_this select 0) select 1;
_projectile = (_this select 0) select 2;
if (!isNull _projectile) exitWith {}; if (!isNull _projectile) exitWith {};
//remove frameEH //remove frameEH
[(_this select 1)] call cba_fnc_removePerFrameHandler; [_pfhId] call cba_fnc_removePerFrameHandler;
if ([_unit] call EFUNC(common,isPlayer)) exitWith {}; //Just in case a player took control if ([_unit] call EFUNC(common,isPlayer)) exitWith {}; //Just in case a player took control
if (!alive _unit) exitWith {}; //No point doing this for dead if (!alive _unit) exitWith {}; //No point doing this for dead
//If AI still has tube, throw it on ground //If AI still has tube, throw it on ground
if (secondaryWeapon _unit == _tube) then { if (secondaryWeapon _unit == _tube) then {
_logic = createVehicle ["GroundWeaponHolder", position _unit, [], 0, "CAN_COLLIDE"]; private ["_logic"];
_logic addWeaponCargoGlobal [_tube, 1]; // @todo secondary weapon items _logic = createVehicle ["GroundWeaponHolder", position _unit, [], 0, "CAN_COLLIDE"];
_logic addWeaponCargoGlobal [_tube, 1]; // @todo secondary weapon items
_unit removeWeaponGlobal _tube; _unit removeWeaponGlobal _tube;
}; };

View File

@ -1,26 +1,36 @@
/* /*
* Author: commy2 * Author: bux, commy2
*
* Replace the disposable launcher with the used dummy. * Replace the disposable launcher with the used dummy.
* *
* Argument: * Arguments:
* Input from "Fired" eventhandler * 0: unit - Object the event handler is assigned to <OBJECT>
* * 1: weapon - Fired weapon <STRING>
* Return value: * 2: muzzle - Muzzle that was used <STRING>
* 3: mode - Current mode of the fired weapon <STRING>
* 4: ammo - Ammo used <STRING>
* 5: magazine - magazine name which was used <STRING>
* 6: projectile - Object of the projectile that was shot <OBJECT>
*
* Return Value:
* Nothing * Nothing
*
* Example:
* [fromBisFiredEH] call ace_disposable_fnc_replaceATWeapon;
*
* Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private ["_unit", "_tube", "_projectile"]; private ["_unit", "_tube", "_projectile"];
_unit = _this select 0; _unit = _this select 0;
_tube = getText (configFile >> "CfgWeapons" >> (_this select 1) >> "ACE_UsedTube");
_projectile = _this select 6;
if (!local _unit) exitWith {}; if (!local _unit) exitWith {};
_tube = getText (configFile >> "CfgWeapons" >> (_this select 1) >> "ACE_UsedTube");
if (_tube == "") exitWith {}; if (_tube == "") exitWith {};
_projectile = _this select 6;
private "_items"; private "_items";
_items = secondaryWeaponItems _unit; _items = secondaryWeaponItems _unit;
@ -28,11 +38,11 @@ _items = secondaryWeaponItems _unit;
_unit addWeapon _tube; _unit addWeapon _tube;
_unit selectWeapon _tube; _unit selectWeapon _tube;
{ {
if (_x != "") then {_unit addSecondaryWeaponItem _x}; if (_x != "") then {_unit addSecondaryWeaponItem _x};
} forEach _items; } forEach _items;
// AI // AI
if !([_unit] call EFUNC(common,isPlayer)) then { if !([_unit] call EFUNC(common,isPlayer)) then {
//waits until _projectile is null, so random 0-2 tickTime seconds after that //waits until _projectile is null, so random 0-2 tickTime seconds after that
[FUNC(aiDropWeaponCallback), 2, [_unit, _tube, _projectile]] call CBA_fnc_addPerFrameHandler; [FUNC(aiDropWeaponCallback), 2, [_unit, _tube, _projectile]] call CBA_fnc_addPerFrameHandler;
}; };

View File

@ -1,48 +1,50 @@
/* /*
* Author: commy2 * Author: commy2
*
* Handle the take event. Add a dummy magazine if a disposable rocket launcher is taken. * Handle the take event. Add a dummy magazine if a disposable rocket launcher is taken.
* *
* Argument: * Arguments:
* Input from "Take" eventhandler * 0: unit - Object the event handler is assigned to <OBJECT>
* *
* Return value: * Return Value:
* Nothing * Nothing
*
* Example:
* [fromTakeEH] call ace_disposable_fnc_takeLoadedATWeapon;
*
* Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private ["_unit", "_launcher", "_config"]; private ["_unit", "_launcher", "_config"];
_unit = _this select 0; PARAMS_1(_unit);
_launcher = secondaryWeapon _unit;
if (!local _unit) exitWith {}; if (!local _unit) exitWith {};
_launcher = secondaryWeapon _unit;
_config = configFile >> "CfgWeapons" >> _launcher; _config = configFile >> "CfgWeapons" >> _launcher;
if (isClass _config && {getText (_config >> "ACE_UsedTube") != ""} && {getNumber (_config >> "ACE_isUsedLauncher") != 1} && {count secondaryWeaponMagazine _unit == 0}) then { if (isClass _config && {getText (_config >> "ACE_UsedTube") != ""} && {getNumber (_config >> "ACE_isUsedLauncher") != 1} && {count secondaryWeaponMagazine _unit == 0}) then {
private ["_magazine", "_isLauncherSelected"]; private ["_magazine", "_isLauncherSelected"];
_magazine = getArray (_config >> "magazines") select 0; _magazine = getArray (_config >> "magazines") select 0;
_isLauncherSelected = currentWeapon _unit == _launcher; _isLauncherSelected = currentWeapon _unit == _launcher;
_unit removeMagazines _magazine; _unit removeMagazines _magazine;
if (backpack _unit == "") then { if (backpack _unit == "") then {
_unit addBackpack "Bag_Base"; _unit addBackpack "Bag_Base";
_unit addMagazine _magazine; _unit addMagazine _magazine;
_unit addWeapon _launcher; _unit addWeapon _launcher;
removeBackpack _unit; removeBackpack _unit;
} else { } else {
_unit addMagazine _magazine; _unit addMagazine _magazine;
_unit addWeapon _launcher; _unit addWeapon _launcher;
}; };
if (_isLauncherSelected) then { if (_isLauncherSelected) then {
_unit selectWeapon _launcher; _unit selectWeapon _launcher;
}; };
}; };

View File

@ -1,26 +1,28 @@
/* /*
* Author: bux, commy2 * Author: bux, commy2
*
* Hide or show the secondary weapon magazine inventory slot to prevent unloading of dummy magazines. * Hide or show the secondary weapon magazine inventory slot to prevent unloading of dummy magazines.
* *
* Argument: * Arguments:
* 0: The player. (Object) * 0: unit - Object the event handler is assigned to <OBJECT>
* *
* Return value: * Return Value:
* Nothing * Nothing
*
* Example:
* [player] call ace_disposable_fnc_updateInventoryDisplay;
*
* Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private ["_player", "_display"]; disableSerialization;
_player = _this select 0; PARAMS_1(_player);
DEFAULT_PARAM(1,_display,(findDisplay 602));
_player removeMagazines "ACE_PreloadedMissileDummy"; _player removeMagazines "ACE_PreloadedMissileDummy";
_player removeMagazines "ACE_FiredMissileDummy"; _player removeMagazines "ACE_FiredMissileDummy";
disableSerialization;
_display = [_this, 1, (findDisplay 602)] call BIS_fnc_param;
if (isNull _display) exitWith {}; if (isNull _display) exitWith {};
private ["_launcher", "_control", "_config"]; private ["_launcher", "_control", "_config"];
@ -28,21 +30,21 @@ private ["_launcher", "_control", "_config"];
_launcher = secondaryWeapon _player; _launcher = secondaryWeapon _player;
if (_launcher == "" || {getText (configFile >> "CfgWeapons" >> _launcher >> "ACE_UsedTube") == ""}) then { if (_launcher == "" || {getText (configFile >> "CfgWeapons" >> _launcher >> "ACE_UsedTube") == ""}) then {
_control = _display displayCtrl 627; _control = _display displayCtrl 627;
_config = configFile >> "RscDisplayInventory" >> "controls" >> "SlotSecondaryMagazine"; _config = configFile >> "RscDisplayInventory" >> "controls" >> "SlotSecondaryMagazine";
_control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")]; _control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")];
_control ctrlCommit 0; _control ctrlCommit 0;
_control = _display displayCtrl 1251; _control = _display displayCtrl 1251;
_config = configFile >> "RscDisplayInventory" >> "controls" >> "BackgroundSlotSecondaryMagazine"; _config = configFile >> "RscDisplayInventory" >> "controls" >> "BackgroundSlotSecondaryMagazine";
_control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")]; _control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")];
_control ctrlCommit 0; _control ctrlCommit 0;
} else { } else {
_control = _display displayCtrl 627; _control = _display displayCtrl 627;
_control ctrlSetPosition [0, 0, 0, 0]; _control ctrlSetPosition [0, 0, 0, 0];
_control ctrlCommit 0; _control ctrlCommit 0;
_control = _display displayCtrl 1251; _control = _display displayCtrl 1251;
_control ctrlSetPosition [0, 0, 0, 0]; _control ctrlSetPosition [0, 0, 0, 0];
_control ctrlCommit 0; _control ctrlCommit 0;
}; };