From 4c286dbda0e212d2ccc168566c55383a3ee73739 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 25 Aug 2021 16:48:28 +0800 Subject: [PATCH 1/3] 1 --- third_party/tools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/tools b/third_party/tools index d80b40c..4ce83a4 160000 --- a/third_party/tools +++ b/third_party/tools @@ -1 +1 @@ -Subproject commit d80b40c567a3cf83984cee26d9df18d755f57a05 +Subproject commit 4ce83a44219390264b0ca6bb85541230f44827cf From 42c663c157a77b631cc7d5ee295ddc98e81ee743 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 26 Aug 2021 15:50:26 +0800 Subject: [PATCH 2/3] c4 --- server/gameserver/bullet.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/server/gameserver/bullet.cc b/server/gameserver/bullet.cc index 024c104..a90cc86 100644 --- a/server/gameserver/bullet.cc +++ b/server/gameserver/bullet.cc @@ -91,6 +91,8 @@ void Bullet::ProcBomb() sender.Get()->team_id == c->team_id) { return; } + AabbCollider aabb_box; + c->GetHitAabbBox(aabb_box); if (meta->i->_inventory_slot() == IS_C4) { if (!objects.empty()) { stop = true; @@ -99,12 +101,15 @@ void Bullet::ProcBomb() if (!c->IsCar()) { return; } - c4_target = c->AsCar(); - } - AabbCollider aabb_box; - c->GetHitAabbBox(aabb_box); - if (TestCollision(room, &aabb_box)) { - objects.insert(c); + if (TestCollision(room, &aabb_box)) { + c4_target = c->AsCar(); + stop = true; + return; + } + } else { + if (TestCollision(room, &aabb_box)) { + objects.insert(c); + } } } }); From 951681db6adfe7a5a47d16d766c72f81a3076a5b Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 26 Aug 2021 16:32:20 +0800 Subject: [PATCH 3/3] 1 --- server/gameserver/bullet.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/server/gameserver/bullet.cc b/server/gameserver/bullet.cc index a90cc86..97dbefc 100644 --- a/server/gameserver/bullet.cc +++ b/server/gameserver/bullet.cc @@ -104,6 +104,7 @@ void Bullet::ProcBomb() if (TestCollision(room, &aabb_box)) { c4_target = c->AsCar(); stop = true; + objects.insert(c); return; } } else {