diff --git a/server/gameserver/bullet.cc b/server/gameserver/bullet.cc index 2b059e94..b12939ae 100644 --- a/server/gameserver/bullet.cc +++ b/server/gameserver/bullet.cc @@ -142,6 +142,13 @@ void Bullet::OnHit(std::set& objects) if (!room->BulletCanReach(born_pos.ToGlmVec3(), target->GetPos().ToGlmVec3())) { eat = true; } + if (gun_meta->id() == 30905 && eat && sender.Get()) { + glm::vec3 new_born_pos = born_pos.ToGlmVec3(); + new_born_pos.y = target->GetPos().GetY(); + if (room->BulletCanReach(new_born_pos, target->GetPos().ToGlmVec3())) { + eat = false; + } + } if (sender.Get() && sender.Get()->IsPlayer()) { #ifdef MYDEBUG a8::XPrintf("eat %d xxxxxxxxxxxxxxxxxxxxxxxx\n", {eat}); @@ -933,6 +940,9 @@ void Bullet::GetHitCreatures(BulletCheckResult& result) } } else { result.objects.insert(c); +#ifdef MYDEBUG1 + a8::XPrintf("GetHitCreatures gun_id:%d\n", {gun_meta->id()}); +#endif if (gun_meta->ispenetrate()) { ++result.c_hit_num; hit_objects_.insert(c->GetUniId()); @@ -1027,6 +1037,9 @@ float Bullet::GetHitRadius() hit_radius = GetExplosionRange(); } } + if (gun_meta->id() == 30905) { + hit_radius = 20; + } return hit_radius; } diff --git a/server/gameserver/collision.cc b/server/gameserver/collision.cc index 52b2a03d..87504526 100644 --- a/server/gameserver/collision.cc +++ b/server/gameserver/collision.cc @@ -14,7 +14,7 @@ #include "mt/MapThing.h" #include "mt/Hero.h" -static const float GUN_HEIGHT = 10.0f; +static const float GUN_HEIGHT = 20.0f; bool Collision::CheckBullet(IBullet* bullet, Creature* c) {