mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-13 10:58:07 +00:00
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:
@@ -47,13 +47,8 @@ void ExplodingAsset::OnHit(Entity* self, Entity* attacker) {
|
|||||||
if (!proximityComponent) return;
|
if (!proximityComponent) return;
|
||||||
|
|
||||||
if (!self->GetBoolean(u"bIsHit")) {
|
if (!self->GetBoolean(u"bIsHit")) {
|
||||||
for (const auto objID : proximityComponent->GetProximityObjects("crateHitters")) {
|
auto* const destroyable = attacker->GetComponent<DestroyableComponent>();
|
||||||
auto* const entity = Game::entityManager->GetEntity(objID);
|
if (destroyable) destroyable->Smash(attacker->GetObjectID());
|
||||||
if (!entity || !entity->IsPlayer()) continue;
|
|
||||||
|
|
||||||
auto* const destroyable = entity->GetComponent<DestroyableComponent>();
|
|
||||||
if (destroyable) destroyable->Smash(attacker->GetObjectID());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
attacker = attacker->GetOwner();
|
attacker = attacker->GetOwner();
|
||||||
|
Reference in New Issue
Block a user