1
This commit is contained in:
parent
eaa80bf3fb
commit
713a893fc6
@ -317,7 +317,7 @@ void RoomObstacle::Active()
|
||||
break;
|
||||
case kObstacleMedicalStation:
|
||||
{
|
||||
|
||||
ActiveMedicalStation();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -828,3 +828,26 @@ void RoomObstacle::CalcTempPassObjects()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void RoomObstacle::ActiveMedicalStation()
|
||||
{
|
||||
if (!grid_list_) {
|
||||
grid_list_ = new std::set<GridCell*>();
|
||||
room->grid_service->GetAllCellsByXy(room, GetPos().x, GetPos().y, *grid_list_);
|
||||
}
|
||||
|
||||
if (meta->i->width() > 0 && meta->int_param1 > 0) {
|
||||
room->xtimer.AddDeadLineTimerAndAttach
|
||||
(
|
||||
meta->int_param1 / FRAME_RATE_MS,
|
||||
a8::XParams()
|
||||
.SetSender(this),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
RoomObstacle* obstacle = (RoomObstacle*)param.sender.GetUserData();
|
||||
Room* room = obstacle->room;
|
||||
},
|
||||
&xtimer_attacher.timer_list_
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ private:
|
||||
void ActiveGully();
|
||||
void ActiveAirDrop();
|
||||
void ActiveKeepRangeBuff();
|
||||
void ActiveMedicalStation();
|
||||
|
||||
void SummonAirDropBox(int box_id);
|
||||
void ProcKeepRangeBuff();
|
||||
|
Loading…
x
Reference in New Issue
Block a user