diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 2ba1030..cb70bb9 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -26,6 +26,7 @@ #include "entityfactory.h" const int ROOM_MAX_PLAYER_NUM = 40; +const int SHUA_RANGE = 731; static long long RoomXGetTickCount(void* context) { @@ -1836,7 +1837,7 @@ void Room::ProcShuaAndroid(int shua_time, int shua_num) a8::Vec2 pos = target->GetPos(); a8::Vec2 dir = a8::Vec2::UP; dir.Rotate(a8::RandAngle()); - pos = pos + dir * 400; + pos = pos + dir * SHUA_RANGE; if (OverBorder(pos, hum->GetRadius())) { pos.x = target->GetPos().x; if (OverBorder(pos, hum->GetRadius())) { @@ -1982,6 +1983,7 @@ void Room::CheckAutoDie(Human* target, }, &target->xtimer_attacher.timer_list_); } else { + bool killed = false; for (auto& pair : human_hash_) { if (pair.second->GetEntityUniId() != target->GetEntityUniId() && pair.second->IsAndroid() && @@ -1993,9 +1995,16 @@ void Room::CheckAutoDie(Human* target, hum->name, hum->curr_weapon->weapon_id); } + killed = true; break; } } + if (!killed) { + a8::UnSetBitFlag(target->status, HS_Disable); + target->BeKill(VP_SafeArea, + "毒圈", + VW_SafeArea); + } } }