diff options
author | x12xx12x <44411062+12xx12@users.noreply.github.com> | 2021-06-23 17:46:29 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-06-23 18:13:35 +0200 |
commit | 5b8b6eeaa8881ec8ffa6e483f7ab27bb0d1ae629 (patch) | |
tree | 90c680c1da243afc05ff5d3591d2d4f263c489e5 /src/Physics | |
parent | Add optional prefix parameter to LOG functions (#5229) (diff) | |
download | cuberite-5b8b6eeaa8881ec8ffa6e483f7ab27bb0d1ae629.tar cuberite-5b8b6eeaa8881ec8ffa6e483f7ab27bb0d1ae629.tar.gz cuberite-5b8b6eeaa8881ec8ffa6e483f7ab27bb0d1ae629.tar.bz2 cuberite-5b8b6eeaa8881ec8ffa6e483f7ab27bb0d1ae629.tar.lz cuberite-5b8b6eeaa8881ec8ffa6e483f7ab27bb0d1ae629.tar.xz cuberite-5b8b6eeaa8881ec8ffa6e483f7ab27bb0d1ae629.tar.zst cuberite-5b8b6eeaa8881ec8ffa6e483f7ab27bb0d1ae629.zip |
Diffstat (limited to 'src/Physics')
-rw-r--r-- | src/Physics/Explodinator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Physics/Explodinator.cpp b/src/Physics/Explodinator.cpp index 862952fb9..b220508ce 100644 --- a/src/Physics/Explodinator.cpp +++ b/src/Physics/Explodinator.cpp @@ -297,7 +297,7 @@ namespace Explodinator // Activate the TNT, with initial velocity and no fuse sound: World.SpawnPrimedTNT(Vector3d(0.5, 0, 0.5) + Absolute, FuseTime, 1, false); } - else if (a_ExplodingEntity->IsTNT() || BlockAlwaysDrops(DestroyedBlock) || Random.RandBool(1.f / a_Power)) // For TNT explosions, destroying a block that always drops, or if RandBool, drop pickups + else if ((a_ExplodingEntity != nullptr) && (a_ExplodingEntity->IsTNT() || BlockAlwaysDrops(DestroyedBlock) || Random.RandBool(1.f / a_Power))) // For TNT explosions, destroying a block that always drops, or if RandBool, drop pickups { const auto DestroyedMeta = a_Chunk.GetMeta(a_Position); a_Chunk.GetWorld()->SpawnItemPickups(cBlockHandler::For(DestroyedBlock).ConvertToPickups(DestroyedMeta), Absolute); |