From 5791c55a9e0b92d143c9d100fb515fb5195eb632 Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Sun, 5 Oct 2025 00:19:46 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20the=20exploding=20script=20is=20the=20mo?= =?UTF-8?q?st=20amazing=20piece=20of=20code=20i=20have=20ev=E2=80=A6=20(#1?= =?UTF-8?q?900)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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草 * Enhance hit detection with proximity object checks Refactor hit handling to include proximity checks for destroyable entities. --- dScripts/02_server/Map/General/ExplodingAsset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dScripts/02_server/Map/General/ExplodingAsset.cpp b/dScripts/02_server/Map/General/ExplodingAsset.cpp index 54ae4207..bba56f0c 100644 --- a/dScripts/02_server/Map/General/ExplodingAsset.cpp +++ b/dScripts/02_server/Map/General/ExplodingAsset.cpp @@ -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 || !entity->IsPlayer()) continue; + if (!entity || entity->GetObjectID() != attacker->GetObjectID()) continue; auto* const destroyable = entity->GetComponent(); if (destroyable) destroyable->Smash(attacker->GetObjectID());