fix: the exploding script is the most amazing piece of code i have ever had the pleasure of working with and has been amazing to work on and translate from lua

hahahahahahahahahahwwwwwwwwwwwwwwww草
This commit is contained in:
David Markowitz
2025-10-04 20:56:21 -07:00
committed by GitHub
parent 17d0c45382
commit f8a82fbf79

View File

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