diff --git a/server/gameserver/bullet.cc b/server/gameserver/bullet.cc index 024c104..97dbefc 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,16 @@ 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; + objects.insert(c); + return; + } + } else { + if (TestCollision(room, &aabb_box)) { + objects.insert(c); + } } } });