fix: why oh why is the aggro radius apart of the enemy (#1899)

This commit is contained in:
David Markowitz
2025-10-04 20:45:42 -07:00
committed by GitHub
parent 7dbbef81ac
commit 17d0c45382

View File

@@ -49,7 +49,7 @@ void ExplodingAsset::OnHit(Entity* self, Entity* attacker) {
if (!self->GetBoolean(u"bIsHit")) {
for (const auto objID : proximityComponent->GetProximityObjects("crateHitters")) {
auto* const entity = Game::entityManager->GetEntity(objID);
if (!entity) continue;
if (!entity || !entity->IsPlayer()) continue;
auto* const destroyable = entity->GetComponent<DestroyableComponent>();
if (destroyable) destroyable->Smash(attacker->GetObjectID());