mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
3b7a3047cd
* Enabled refuel for non-AllVehicles objects. Un-magic'd refuel progress timer. * Changed helper attach position to centre of object. Offset applied when rope attached. * Made fully compatible with non-thingX simulation types. Removed destruction effects of helper object. * Using arma model. Removed ACE_Actions from helper object. * Correct use of hideObjectGlobal * Remove actions, cargo, repair on helper * Switched helper to be setVar'd on the nozzle object
33 lines
963 B
C++
33 lines
963 B
C++
#define COMPONENT refuel
|
|
#define COMPONENT_BEAUTIFIED Refuel
|
|
#include "\z\ace\addons\main\script_mod.hpp"
|
|
|
|
// #define DEBUG_MODE_FULL
|
|
// #define DISABLE_COMPILE_CACHE
|
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
|
|
|
#ifdef DEBUG_ENABLED_REFUEL
|
|
#define DEBUG_MODE_FULL
|
|
#endif
|
|
|
|
#ifdef DEBUG_ENABLED_REFUEL
|
|
#define DEBUG_SETTINGS DEBUG_ENABLED_REFUEL
|
|
#endif
|
|
|
|
#include "\z\ace\addons\main\script_macros.hpp"
|
|
|
|
#define REFUEL_INFINITE_FUEL -10
|
|
#define REFUEL_ACTION_DISTANCE 7
|
|
#define REFUEL_HOSE_LENGTH 12
|
|
#define REFUEL_PROGRESS_DURATION 2
|
|
|
|
#define REFUEL_HOLSTER_WEAPON \
|
|
_unit setVariable [QGVAR(selectedWeaponOnRefuel), currentWeapon _unit]; \
|
|
_unit call EFUNC(common,fixLoweredRifleAnimation); \
|
|
_unit action ["SwitchWeapon", _unit, _unit, 299];
|
|
|
|
#define REFUEL_UNHOLSTER_WEAPON \
|
|
_weaponSelect = _unit getVariable QGVAR(selectedWeaponOnRefuel); \
|
|
_unit selectWeapon _weaponSelect; \
|
|
_unit setVariable [QGVAR(selectedWeaponOnRefuel), nil];
|