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/BlockInfo.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/BlockInfo.h') diff --git a/src/BlockInfo.h b/src/BlockInfo.h index 9644eb208..5992db9d9 100644 --- a/src/BlockInfo.h +++ b/src/BlockInfo.h @@ -47,6 +47,10 @@ public: // tolua_end + /** Returns how much of an explosion Destruction Lazor's (tm) intensity the given block attenuates. + See Physics\Explodinator.cpp for details of explosion block destruction. */ + static float GetExplosionAbsorption(BLOCKTYPE Block); + inline static cBlockHandler * GetHandler (BLOCKTYPE a_Type) { return Get(a_Type).m_Handler.get(); } /** Creates a default BlockInfo structure, initializes all values to their defaults */ -- cgit v1.2.3