From 7b023395819698b3d6174b7998589bbac65dc99f Mon Sep 17 00:00:00 2001 From: thokkat Date: Wed, 8 Mar 2023 16:31:18 +0100 Subject: [PATCH 1/2] prevent ranged damage from hitting twice --- game/world/bullet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/world/bullet.cpp b/game/world/bullet.cpp index 1fbc16deb..088a506c1 100644 --- a/game/world/bullet.cpp +++ b/game/world/bullet.cpp @@ -130,7 +130,7 @@ void Bullet::onCollide(phoenix::material_group matId) { } void Bullet::onCollide(Npc& npc) { - if(&npc==origin()) + if(&npc==origin() || isFinished()) return; if(ow!=nullptr) { From 4b29fa68fb3e8a5dcc891c33bbcb748f38187986 Mon Sep 17 00:00:00 2001 From: Try Date: Thu, 9 Mar 2023 23:09:07 +0300 Subject: [PATCH 2/2] Update bullet.cpp --- game/world/bullet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/game/world/bullet.cpp b/game/world/bullet.cpp index 088a506c1..9c2b8b126 100644 --- a/game/world/bullet.cpp +++ b/game/world/bullet.cpp @@ -115,6 +115,8 @@ void Bullet::onMove() { } void Bullet::onCollide(phoenix::material_group matId) { + if(isFinished()) + return; if(matId != phoenix::material_group::none) { if(material < ItemMaterial::MAT_COUNT) { auto s = wrld->addLandHitEffect(ItemMaterial(material),matId,obj->matrix());