Skip to content

Explosives - Refactor#10805

Merged
PabstMirror merged 27 commits intomasterfrom
explosives-refactor
Dec 13, 2025
Merged

Explosives - Refactor#10805
PabstMirror merged 27 commits intomasterfrom
explosives-refactor

Conversation

@johnb432
Copy link
Contributor

@johnb432 johnb432 commented Mar 15, 2025

When merged this pull request will:

  • Code cleanup & optimisation.
  • Fix and improve ownership transfer of explosives when a unit receives a detonator from another. If a unit has multiple detonators to give, it will only pass explosive ownership when the last one is passed to the receiving unit.
  • Reverted invalid IED codes immediately stopping call, which was unintentionally introduced in Explosives - Improve Support for custom IED ringtones #10731.
  • Eliminate race condition for getting IED cellphone code.
  • Cache detonators.
  • Check variable types in public functions.
  • Remove ace_explosives_fnc_detonateExplosiveAll, as it's just a forEach loop and isn't API.
  • Remove ace_explosives_fnc_dialingPhone, as it's only used in 1 instance, is relatively short and isn't API.
  • Improve documentation.
  • Address ACE3 Feature Requests #3594 (comment) by adding ace_explosives_defuseStart and adding missing documentation for ace_explosives_defuse and ace_explosives_explodeOnDefuse.
  • Remove owned explosives upon respawn.
  • Fully test all features.
    • Test cellphones.
    • Test ownership transfer when moving detonators from one container to the next.
    • Test planting explosives.
    • Test defusing.
    • Test detonators (timer, pressure, remote).

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.
@johnb432 johnb432 added the kind/optimization Release Notes: **IMPROVED:** label Mar 15, 2025
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
@PabstMirror
Copy link
Contributor

merged fix from #10958

@johnb432 johnb432 marked this pull request as ready for review December 13, 2025 08:30
@johnb432
Copy link
Contributor Author

It's finally ready for review.


Not sure what to think about Remove owned explosives upon respawn.. I want explosives to be tied to their clackers, as I find it weird to magically have the ability to detonate explosives after you respawn (that is, if you have the correct clacker type of course). However, if you have your mission set up to delete corpses upon respawn, this means that the placed explosives would lose their clacker and can't be detonates, unless you defuse and place the explosives again.
Personally I find this fair in terms of realism (corpse was destroyed, therefore clacker was too), but I'm not too sure how good it is from a gameplay point of view. Any thoughts?

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
@PabstMirror PabstMirror changed the title Explosives - Minor refactor Explosives - Refactor Dec 13, 2025
@PabstMirror PabstMirror added this to the 3.20.2 milestone Dec 13, 2025
@LinkIsGrim
Copy link
Member

Personally I find this fair in terms of realism (corpse was destroyed, therefore clacker was too), but I'm not too sure how good it is from a gameplay point of view. Any thoughts?

Corpse cleanup on respawn should generally take a while. For missions fast-paced enough to warrant cleaning up corpses that fast, we really wouldn't want explosives to still be tied to the player after respawn IMO.

@PabstMirror PabstMirror merged commit 9dc2c60 into master Dec 13, 2025
3 checks passed
@PabstMirror PabstMirror deleted the explosives-refactor branch December 13, 2025 22:00
@rautamiekka
Copy link
Contributor

Personally I find this fair in terms of realism (corpse was destroyed, therefore clacker was too), but I'm not too sure how good it is from a gameplay point of view. Any thoughts?

Corpse cleanup on respawn should generally take a while. For missions fast-paced enough to warrant cleaning up corpses that fast, we really wouldn't want explosives to still be tied to the player after respawn IMO.

100% agree. Zeuses will cleanup useless corpses, though.

@rautamiekka
Copy link
Contributor

Not sure what to think about Remove owned explosives upon respawn.. I want explosives to be tied to their clackers, as I find it weird to magically have the ability to detonate explosives after you respawn (that is, if you have the correct clacker type of course). However, if you have your mission set up to delete corpses upon respawn, this means that the placed explosives would lose their clacker and can't be detonates, unless you defuse and place the explosives again. Personally I find this fair in terms of realism (corpse was destroyed, therefore clacker was too), but I'm not too sure how good it is from a gameplay point of view. Any thoughts?

Yeah, having to defuse and rearm the explosives would be the best option so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/optimization Release Notes: **IMPROVED:**

4 participants