Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cookOff - Fix: Disable ammunition cookoff and turret effect when skipping destruction effects #8122

Merged
merged 2 commits into from
Feb 23, 2021

Conversation

Vdauphin
Copy link
Contributor

@Vdauphin Vdauphin commented Feb 22, 2021

When merged this pull request will:

  • When you apply cursorObject setDamage [1, false] to destroy an object by skipping destruction effects the ammunition still cookoff
  • So now we check if we want to skip destruction effects or not before calling cookoff ammunition

@jonpas
Copy link
Member

jonpas commented Feb 22, 2021

Can we also check the same thing in normal cookoff? I didn't check, but I think if you do VEHICLE setDamage [0.99, false] there is still a chance for cookoff to happen.

@jonpas jonpas added the kind/bug-fix Release Notes: **FIXED:** label Feb 22, 2021
@jonpas jonpas added this to the 3.13.6 milestone Feb 22, 2021
@Vdauphin
Copy link
Contributor Author

When you do VEHICLE setDamage [0.99, false].
The vehicle blow up after some second. I think this is an Arma behavior
Because the vehicle explode by itself, I don't see how we can know if we should use the explosion effect or not

Also you might want to set 0.99 damage without effect and let Arma behave normaly?

@jonpas
Copy link
Member

jonpas commented Feb 22, 2021

Also you might want to set 0.99 damage without effect and let Arma behave normaly?

Well this is really besides the point.

If we can't know that, we can't, it was just a question.

params ["_vehicle", "", "", "_useEffects"];
if (
_vehicle getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmoCookoff)] &&
_useEffects
Copy link
Member

@veteran29 veteran29 Feb 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the shorter condition first would be a bit more readable imho _useEffects &&.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also combine the if exitWith below into this as well.

@PabstMirror PabstMirror merged commit d00e7a1 into acemod:master Feb 23, 2021
@Vdauphin Vdauphin deleted the patch-6 branch March 10, 2021 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants