diff --git a/server/gameserver/constant.h b/server/gameserver/constant.h index b2e3af06..cce4fbbf 100644 --- a/server/gameserver/constant.h +++ b/server/gameserver/constant.h @@ -348,7 +348,6 @@ enum ObstacleType_e kObstacleShield = 11, kObstacleStrengthenWall = 12, kObstacleMedicalStation = 13, - kObstaclePortal = 14, }; enum BulletHit_e @@ -499,7 +498,6 @@ const int SPEC2_SLOT_BEGIN = 5; //地雷 燃烧瓶 陷井 毒气弹 const int SPEC3_SLOT_BEGIN = 9; //c4 盾墙 信号抢 汽油桶 const int DOOR_THING_ID = 61701; -const int PVE_DOOR_THING_ID = 80020; const int FIGHTING_MODE_BULLET_NUM = 10000 * 10000; diff --git a/server/gameserver/pvedata.cc b/server/gameserver/pvedata.cc index 24c4ba6a..b8741025 100644 --- a/server/gameserver/pvedata.cc +++ b/server/gameserver/pvedata.cc @@ -107,9 +107,6 @@ void PveData::OnBeKill(Hero* hero) if (GetWave() + 1 < max_wave) { if (GetWave() < room->pve_mode_meta->_next_door.size()) { glm::vec3 point = room->pve_mode_meta->_next_door[room->pve_data.GetWave()]; -#if 0 - room->CreateObstacle(PVE_DOOR_THING_ID, point.x, point.y); -#endif FlyDoor(room, point, 50); } } @@ -145,7 +142,7 @@ void PveData::FlyDoor(Room* room, glm::vec3& point, int radius) { a8::Vec2 dir = a8::Vec2::UP; dir.Rotate(a8::RandAngle()); - // 999 + hum->GetMutablePos().FromGlmVec3(point); #if 1 #else a8::Vec2 new_pos = point + dir * a8::RandEx(1, radius); diff --git a/server/gameserver/roomobstacle.cc b/server/gameserver/roomobstacle.cc index 777cd306..ca4ea536 100644 --- a/server/gameserver/roomobstacle.cc +++ b/server/gameserver/roomobstacle.cc @@ -366,11 +366,6 @@ void RoomObstacle::Active() ActiveMedicalStation(); } break; - case kObstaclePortal: - { - ActivePortal(); - } - break; default: { } @@ -944,55 +939,3 @@ void RoomObstacle::ActiveMedicalStation() }, &xtimer_attacher); } - -void RoomObstacle::ActivePortal() -{ - room->xtimer.SetIntervalEx - ( - SERVER_FRAME_RATE, - [this] (int event, const a8::Args* args) - { - if (a8::TIMER_EXEC_EVENT == event) { - ProcPortal(); - } - }, - &xtimer_attacher); -} - -void RoomObstacle::ProcPortal() -{ - if (room->IsGameOver()) { - return; - } - if (!room->IsPveRoom()) { - return; - } - if (!grid_list_) { - grid_list_ = new std::set(); - room->grid_service->GetAllCellsByXy(room, GetPos().x, GetPos().y, *grid_list_); - } - bool ready = true; - room->TraverseHumanList - ( - [this, &ready] (Human* hum) - { - if (!a8::IntersectCircleCircle - ( - hum->GetPos().ToVec2(), - hum->GetRadius(), - GetPos().ToVec2(), - meta->height() - )) { - ready = false; - return false; - } - return true; - } - ); - if (ready) { - room->GetIncubator()->NextWave(); - Die(room); - BroadcastFullState(room); - room->xtimer.DeleteCurrentTimer(); - } -} diff --git a/server/gameserver/roomobstacle.h b/server/gameserver/roomobstacle.h index cc0fbd71..eb29d863 100644 --- a/server/gameserver/roomobstacle.h +++ b/server/gameserver/roomobstacle.h @@ -52,13 +52,11 @@ private: void ActiveKeepRangeBuff(); void ActiveStrengthenWall(); void ActiveMedicalStation(); - void ActivePortal(); void SummonAirDropBox(int box_id); void ProcKeepRangeBuff(); void DetachFromMaster(); void InstallPreExplostionSummonTimer(); - void ProcPortal(); void CalcTempPassObjects();