1
This commit is contained in:
parent
3b4fafd137
commit
c906259fcd
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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<GridCell*>();
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user