diff --git a/dScripts/02_server/Map/General/ExplodingAsset.cpp b/dScripts/02_server/Map/General/ExplodingAsset.cpp index e073fffd..bba56f0c 100644 --- a/dScripts/02_server/Map/General/ExplodingAsset.cpp +++ b/dScripts/02_server/Map/General/ExplodingAsset.cpp @@ -47,8 +47,13 @@ void ExplodingAsset::OnHit(Entity* self, Entity* attacker) { if (!proximityComponent) return; if (!self->GetBoolean(u"bIsHit")) { - auto* const destroyable = attacker->GetComponent(); - if (destroyable) destroyable->Smash(attacker->GetObjectID()); + for (const auto objID : proximityComponent->GetProximityObjects("crateHitters")) { + auto* const entity = Game::entityManager->GetEntity(objID); + if (!entity || entity->GetObjectID() != attacker->GetObjectID()) continue; + + auto* const destroyable = entity->GetComponent(); + if (destroyable) destroyable->Smash(attacker->GetObjectID()); + } } attacker = attacker->GetOwner();