From 93adbdce9a769b42baeb70f9ead5c7c6a35834b5 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 12 Sep 2020 19:57:44 +0100 Subject: Use tracing for explosions (#4845) * TNT: Implement tracing algorithm + Add intensity tracing * Fix iterating over all players to SendExplosion, even those not in range * Implemented TNT entity interaction * Fixed misaligned destruction tracing * Finalise TNT algorithm - Remove BlockArea and just use chunks Using SetBlock makes it so that we can update everything properly, and does appear to be faster. * BlockInfo learns about explosion attentuation * Rename Explodinator parameters * TNT: pull block destruction into common function Co-authored-by: Alexander Harkness --- src/Physics/Explodinator.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/Physics/Explodinator.h (limited to 'src/Physics/Explodinator.h') diff --git a/src/Physics/Explodinator.h b/src/Physics/Explodinator.h new file mode 100644 index 000000000..daf86456a --- /dev/null +++ b/src/Physics/Explodinator.h @@ -0,0 +1,20 @@ + +#pragma once + + + + + +class cWorld; + + + + + +namespace Explodinator +{ + /** Creates an explosion of Power, centred at Position, with ability to set fires as provided. + For maximum efficiency, Position should be in the centre of the entity or block that exploded. + Kaboom indeed, you drunken wretch. */ + void Kaboom(cWorld & World, Vector3f Position, unsigned Power, bool Fiery); +} -- cgit v1.2.3