ACE3/addons/vehicle_damage/script_macros.hpp
johnb432 80b2fa9a05
Vehicle damage - Code cleanup (#9831)
* Cook-off improvements

* More changes

* Update fnc_getVehicleAmmo.sqf

* Better engine fire placement

* Update fnc_detonateAmmunition.sqf

* Update XEH_postInit.sqf

* Update fnc_getVehicleAmmo.sqf

* Update events-framework.md

* Various improvements

* Separate effect handling

* Tweaks

* Update XEH_postInit.sqf

* Prevent double ammo detonation

* Fixed objects not being able to cook-off again

* Added incendiary rounds as source of box cookoff

* Converted enable setting to bool

* Fixed brackets

* Update fnc_cookOff.sqf

* Update CfgEden.hpp

* Removed GVAR(enable), added GVAR(enableFire) back

* Vehicle damage fixes

* Made hitpoint hash common

* Update fnc_addEventHandler.sqf

* Update fnc_medicalDamage.sqf

* Update fnc_handleBail.sqf

* Changed API

* Remove `CBA_fnc_getConfigEntry` as much as possible, as it's 2x slower

* More cleanup

* More cleanup

* Fix merging issues, remove turret tossing

* Update translations

* More cleanup

* Reverted some logic back to original, minor tweaks & fixes

* Fix undefined variable

* Cleanup

* Fixed bad logic

* Update addons/vehicle_damage/script_macros.hpp

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/vehicle_damage/functions/fnc_handleDamage.sqf

* Update addons/vehicle_damage/stringtable.xml

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/vehicle_damage/stringtable.xml

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/vehicle_damage/XEH_postInit.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2024-08-20 16:23:21 -03:00

30 lines
1.2 KiB
C++

#define CONST_TIME 0.03
#define MAX_CREW_BAILOUT_TIME 12
#define BAILOUT_CHANCE_SHOOT 0.5
#define BAILOUT_CHANCE_MOVE 0.8
#define IS_EXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") > 0.5)
#define ENGINE_HITPOINTS [["hitengine"], "engine"]
#define HULL_HITPOINTS [["hithull", "hitbody", "#structural"], "hull"]
#define TRACK_HITPOINTS [["hitltrack", "hitrtrack"], "track"]
#define WHEEL_HITPOINTS [["hitlbwheel", "hitlmwheel", "hitlfwheel", "hitlf2wheel", "hitrbwheel", "hitrmwheel", "hitrlwheel", "hitrfwheel", "hitrf2wheel"], "wheel"]
#define FUEL_HITPOINTS [["hitfuel"], "fuel"]
#define ALL_HITPOINTS [ENGINE_HITPOINTS, HULL_HITPOINTS, TRACK_HITPOINTS, WHEEL_HITPOINTS, FUEL_HITPOINTS]
#define CRITICAL_HITPOINTS ["hithull", "hitbody", "#structural", "hitengine"]
#define CRITICAL_HITPOINTS_THRESHOLDS [0.89, 0.89, 0.89, 0.9]
#define WARHEAD_TYPE_HE 0
#define WARHEAD_TYPE_AP 1
#define WARHEAD_TYPE_HEAT 2
#define WARHEAD_TYPE_TANDEM 3
#define EJECT_IF_DESTROYED_VEHICLES ["Boat_Transport_02_base_F", "Rubber_duck_base_F"]
#define CREATE_INCENDIARY_AMMO(ammo,base,inc)\
class ammo: base {\
GVAR(incendiary) = inc;\
}