Jump to content
Stray Fawn Community

[0.5.9] Multi-TNT explosions don't destroy things they should.

Recommended Posts

(Credit to Wumpie on discord)

Multiple TNT blocks no longer seem to destroy parts that have that exact multiple of 500 hp.

  • 1 TNT destroys 500 hp blocks as expected
  • 2 TNT does NOT destroy 1000 hp blocks
  • 4 TNT does NOT destroy 2000 hp blocks
  • etc


Repro: make a drone like this, detonate the TNT, the button survives even though it has 1000 hp and the TNT should be doing 2x500 damage.


Link to post
Share on other sites

If it works with 3 then I assume its a timing problem. A TnT block has a small delay before it explodes if it gets triggered by another explosion. I did this to allow large chain explosions without them exploding all at the same time.

Combined with the fact that all parts repair themselves by a small amount over time might give the part a few milliseconds time to regenerate before the second blast.

Its ether this or something else is broken. Are both TnT on the same button or does only 1 explode and then trigger the other explosion?

Link to post
Share on other sites

All TNT packs were mapped to Mouse0 on all of my attempts. Packs that are too close to one another indeed do not explode at exactly the same time, but that is regardless of their activation method.

On the contrary, packs that are far enough from one another explode all at the same time, and destroy the target as intended.

First gif shows the delay when packs are close to one another, even with all having the same key as detonator; second shows the intended destruction after both packs explode at the same time.



Link to post
Share on other sites
3 hours ago, Micha said:

Are both TnT on the same button or does only 1 explode and then trigger the other explosion?

both detonated on same input.


I know blocks repair themselves, but when detonated at the same time it should be destroying the block.

Maybe the delay-on-detonation-if-hit-by-other-explosion is overriding the detonation input?  Even if it happens on the same tick?  if so, that's not the right way to handle simultaneous events :P

Link to post
Share on other sites

It looks like the damage is assigned before the game moves on to detonating the next pack, so the next pack is damage-detonated instead of signal-detonated.  But then, the third back in the chain should be signal-detonated before the second explodes.  Huh.  

Micah, how about stopping block regeneration for a moment after taking damage?  Half a second of halted regeneration would obviate this, and is a common game mechanic for making continual damage more threatening, and not something you can just out-regen.

Link to post
Share on other sites

Yep it's fixed by adding a small cooldown on the self regeneration after taking damage.
I rather leave the timing as it is, so you can build huge tnt chains. If they explode in the same frame it's just a huge lag spike.

I'll upload a silent hotfix today so you can blow up stuff.

  • Like 2
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...