This commit is contained in:
aozhiwei 2023-06-20 18:57:06 +08:00
parent 45c5fda3c8
commit f1228baf09

View File

@ -3377,4 +3377,39 @@ void Room::GMFastForward()
while (GetGasData().new_area_meta->GetSmallRingCount() >= 4) {
ForwardGasRing(1);
}
TraversePlayerList
(
[this] (Player* hum)
{
glm::vec3 point = glm::vec3(GetGasData().new_area_meta->GetLastArea()->x1(),
6.0f,
GetGasData().new_area_meta->GetLastArea()->y1());
{
glm::vec3 center = hum->GetPos().ToGlmVec3();
map_instance->Scale(center);
glm::vec3 point;
bool ok = false;
for (int i = 0; i < 10; ++i) {
ok = map_instance->FindConnectableNearestPoint(center, 1.0f + 10 * i, point);
if (ok) {
break;
}
}
if (ok) {
map_instance->UnScale(point);
hum->GetMutablePos().FromGlmVec3(point);
grid_service->MoveCreature(hum);
}
}
});
xtimer.SetTimeoutEx
(
1,
[this] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
GetIncubator()->ShowHand();
}
},
&xtimer_attacher_);
}