Minetest_game: Falling TNT timer starts when landing after falling, make it explode at 4s after activation

Created on 20 Oct 2018  路  5Comments  路  Source: minetest/minetest_game

If you ignite TNT, then the burning TNT falls down due to gravity, the TNT timer is actually being reset. While falling, the burning TNT can't explode at all. When the TNT dropped and became a node again, the timer starts again from the beginning.

Therefore, the TNT can take longer than 4 seconds to explode.

Bug Request / Suggestion

Most helpful comment

Sounds more like a Minetest core issue, where falling node timers aren't preserved.

All 5 comments

Sounds more like a Minetest core issue, where falling node timers aren't preserved.

Actually the proper solution is to convert the node timer to a timer maintained by the falling entity, and then back to a new node timer. If at any point in time the timer expires, even when the tnt is an entity, it should explode on the spot.

I always intended to code this, but never got to it.

What if the node timer was set to a very short interval and the time left is stored in the TNT's metadata? If the TNT becomes a falling node entity, the timer would be a minetest.after call doing the countdown instead.

It's just a thought.

This can all be done exactly right but requires extra code. The code that makes the node start falling can calculate the remaining time... The falling entity could also explode mid-falling as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Wuzzy2 picture Wuzzy2  路  4Comments

stujones11 picture stujones11  路  4Comments

paanrama picture paanrama  路  4Comments

Fixer-007 picture Fixer-007  路  6Comments

cdqwertz picture cdqwertz  路  6Comments