2015-08-15 16:43:13 +00:00
|
|
|
#define COMPONENT rearm
|
2016-06-20 09:41:17 +00:00
|
|
|
#define COMPONENT_BEAUTIFIED Rearm
|
2015-08-15 16:43:13 +00:00
|
|
|
#include "\z\ace\addons\main\script_mod.hpp"
|
|
|
|
|
2016-01-29 05:26:02 +00:00
|
|
|
// #define DEBUG_MODE_FULL
|
|
|
|
// #define DISABLE_COMPILE_CACHE
|
|
|
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
2017-06-08 16:47:52 +00:00
|
|
|
// #define FAST_PROGRESSBARS
|
2016-01-29 05:26:02 +00:00
|
|
|
|
2015-08-15 17:23:02 +00:00
|
|
|
#ifdef DEBUG_ENABLED_REARM
|
|
|
|
#define DEBUG_MODE_FULL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEBUG_SETTINGS_REARM
|
|
|
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_REARM
|
|
|
|
#endif
|
|
|
|
|
2015-08-15 16:43:13 +00:00
|
|
|
#include "\z\ace\addons\main\script_macros.hpp"
|
2015-08-15 17:23:02 +00:00
|
|
|
|
2015-08-18 00:32:10 +00:00
|
|
|
|
|
|
|
#define REARM_ACTION_DISTANCE 7
|
|
|
|
|
2015-08-20 17:51:22 +00:00
|
|
|
#define REARM_CALIBERS [ 6, 7, 8, 13, 19, 20, 25, 30, 35, 39, 40, 60, 70, 80, 82, 100, 105, 120, 122, 125, 155, 230, 250]
|
|
|
|
#define REARM_DURATION_TAKE [ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 13, 10]
|
|
|
|
#define REARM_DURATION_REARM [ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 7, 7, 7, 7, 7, 8, 10, 10, 10, 10, 27, 20]
|
|
|
|
#define REARM_COUNT [500, 500, 400, 100, 50, 50, 40, 25, 34, 24, 10, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1]
|
|
|
|
|
|
|
|
|
|
|
|
#define REARM_HOLSTER_WEAPON \
|
|
|
|
_unit setVariable [QGVAR(selectedWeaponOnRearm), currentWeapon _unit]; \
|
2017-05-18 16:13:31 +00:00
|
|
|
TRACE_2("REARM_HOLSTER_WEAPON",_unit,currentWeapon _unit); \
|
2017-05-12 18:12:39 +00:00
|
|
|
_unit action ["SwitchWeapon", _unit, _unit, 299];
|
2015-08-20 17:51:22 +00:00
|
|
|
|
|
|
|
#define REARM_UNHOLSTER_WEAPON \
|
|
|
|
_weaponSelect = _unit getVariable QGVAR(selectedWeaponOnRearm); \
|
2016-06-27 05:00:25 +00:00
|
|
|
if (!isNil "_weaponSelect") then { \
|
2017-05-18 16:13:31 +00:00
|
|
|
TRACE_2("REARM_UNHOLSTER_WEAPON",_unit,_weaponSelect); \
|
2016-06-27 05:00:25 +00:00
|
|
|
_unit selectWeapon _weaponSelect; \
|
|
|
|
_unit setVariable [QGVAR(selectedWeaponOnRearm), nil]; \
|
2016-06-27 17:30:39 +00:00
|
|
|
};
|
2017-06-08 16:47:52 +00:00
|
|
|
|
|
|
|
#ifdef FAST_PROGRESSBARS
|
|
|
|
#define TIME_PROGRESSBAR(X) ((X) * 0.075)
|
|
|
|
#else
|
|
|
|
#define TIME_PROGRESSBAR(X) (X)
|
|
|
|
#endif
|