Skip to content

Commit

Permalink
Vehicle Damage - Optimize IS_INEXPLOSIVE_AMMO macro (#10576)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror authored Dec 20, 2024
1 parent a2e3e68 commit 673e2f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if (alive _vehicle) exitWith {};

TRACE_2("handleDamageEjectIfDestroyed",typeOf _vehicle,_this);

if (!IS_EXPLOSIVE_AMMO(_ammo)) then {
if (IS_INEXPLOSIVE_AMMO(_ammo)) then {
{
if (alive _x) then {
moveOut _x;
Expand Down
2 changes: 1 addition & 1 deletion addons/vehicle_damage/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#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 IS_INEXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") <= 0.5)

#define ENGINE_HITPOINTS [["hitengine"], "engine"]
#define HULL_HITPOINTS [["hithull", "hitbody", "#structural"], "hull"]
Expand Down

0 comments on commit 673e2f5

Please sign in to comment.