Skip to content

Explosion Modifications#16971

Open
NotAlwaysTrue wants to merge 1 commit intoFakeFishGames:masterfrom
NotAlwaysTrue:BarotraumaExplosionModification
Open

Explosion Modifications#16971
NotAlwaysTrue wants to merge 1 commit intoFakeFishGames:masterfrom
NotAlwaysTrue:BarotraumaExplosionModification

Conversation

@NotAlwaysTrue
Copy link

@NotAlwaysTrue NotAlwaysTrue commented Mar 7, 2026

[Changes]
Made penetration work when dealing damage on characters
Removed 1800 (600*3) distance hard-coded limit for structureDamage

[Reasons]
I noticed multiple explosives have penetration parameter but penetration were never used during the whole process
There are explosions with range over 1800 in mods
The hard limit seems no use because there is only one enumeration operation and it is on WallList in the affacted codes and the return value was only used when playing sounds

[Tests]
Part.1 structureDamage range test

  1. Copy-paste the DebugOnlyTest mod in the LocalMods Folder
  2. Enter SubEditor, load "TestCamel", Enter Test mode
  3. FreeCamera
  4. Observe the result
    Release Ver: The damage is limited to near ~1800 marker
    PR Ver: The damage goes further than ~4000 marker

Part.2 penetration test

  1. Copy-paste the DebugOnlyTest mod in the LocalMods Folder
  2. Enter SubEditor, load random sub, place following items:
    2x Timed detonator
    1x [DebugOnlyTest]C4WithoutPen
    1x [DebugOnlyTest]C4WithPen
    1x [DebugOnlyTest]EXPLOSIONTESTSUIT
  3. Enter Test mode
  4. Wear the [DebugOnlyTest]EXPLOSIONTESTSUIT
  5. Install 1x Timed detonator with 1x [DebugOnlyTest]C4WithoutPen in it
  6. Stand next to the item, set off the detonator
  7. Observe the result
    Release Ver + PR Ver: No damage to the character
  8. Install 1x Timed detonator with 1x [DebugOnlyTest]C4WithPen in it
  9. Stand next to the item, set off the detonator
  10. Observe the result
    Release Ver: No damage to the character
    PR Ver: Character was damaged

[Notes]

  1. The item "[DebugOnlyTest]C4With2000range" used in Part.1 test has 5000 explosion range, the name was incorrect
  2. Penetration should be affacted by distance and obstacles, not tested but it should work without problem

Make Penetration work when explosions dealing damage on characters
Removed hard-coded StructureDamage limit
@NotAlwaysTrue
Copy link
Author

Will fix #16939

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant