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/Entities/Entity.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 8bc941354..627c1ce71 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -241,6 +241,7 @@ public: int GetChunkX(void) const { return FloorC(m_Position.x / cChunkDef::Width); } int GetChunkZ(void) const { return FloorC(m_Position.z / cChunkDef::Width); } + // Get the Entity's axis aligned bounding box, with absolute (world-relative) coordinates. cBoundingBox GetBoundingBox() const { return cBoundingBox(GetPosition(), GetWidth() / 2, GetHeight()); } void SetHeadYaw (double a_HeadYaw); -- cgit v1.2.3