fixed crash on lua DoExplosion call
This commit is contained in:
parent
cc9f7c06b3
commit
5b8b6eeaa8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user