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 <me@bearbin.net>
This commit is contained in:
Tiger Wang
2020-09-12 18:57:44 +00:00
committed by GitHub
co-authored by Alexander Harkness
parent 834d61dacc
commit 93adbdce9a
22 changed files with 531 additions and 300 deletions
@@ -67,8 +67,7 @@ public:
return 0;
}
std::swap(Result->second, Power);
return Power;
return std::exchange(Result->second, Power);
}
/** Adjust From-relative coordinates into To-relative coordinates. */