This commit is contained in:
aozhiwei 2023-06-20 19:38:18 +08:00
parent f1228baf09
commit a659923a33
3 changed files with 28 additions and 2 deletions

View File

@ -539,3 +539,16 @@ void Incubator::ShowHand()
&room->xtimer_attacher_); &room->xtimer_attacher_);
hold_humans_.clear(); hold_humans_.clear();
} }
void Incubator::Clear(int save_num)
{
while (hold_humans_.size() > save_num) {
Human* hum = hold_humans_.at(0);
hum->BeKill(VP_Gas,
TEXT("battle_server_killer_gas", "毒圈"),
VW_Gas,
VP_Gas,
TEXT("battle_server_killer_gas", "毒圈"));
hold_humans_.erase(hold_humans_.begin());
}
}

View File

@ -19,6 +19,7 @@ class Incubator
int GetPveLeftTime(); int GetPveLeftTime();
void NextWave(); void NextWave();
void ShowHand(); void ShowHand();
void Clear(int save_num);
private: private:
bool CanSee(Human* hum, Human* exclude_hum); bool CanSee(Human* hum, Human* exclude_hum);

View File

@ -3381,11 +3381,11 @@ void Room::GMFastForward()
( (
[this] (Player* hum) [this] (Player* hum)
{ {
glm::vec3 point = glm::vec3(GetGasData().new_area_meta->GetLastArea()->x1(), glm::vec3 src_point = glm::vec3(GetGasData().new_area_meta->GetLastArea()->x1(),
6.0f, 6.0f,
GetGasData().new_area_meta->GetLastArea()->y1()); GetGasData().new_area_meta->GetLastArea()->y1());
{ {
glm::vec3 center = hum->GetPos().ToGlmVec3(); glm::vec3 center = src_point;
map_instance->Scale(center); map_instance->Scale(center);
glm::vec3 point; glm::vec3 point;
bool ok = false; bool ok = false;
@ -3402,6 +3402,18 @@ void Room::GMFastForward()
} }
} }
}); });
GetIncubator()->Clear(6);
for (auto& pair : human_hash_) {
if (pair.second->IsAndroid() &&
!a8::HasBitFlag(pair.second->status, CS_Disable)) {
Human* hum = pair.second;
hum->BeKill(VP_Gas,
TEXT("battle_server_killer_gas", "毒圈"),
VW_Gas,
VP_Gas,
TEXT("battle_server_killer_gas", "毒圈"));
}
}
xtimer.SetTimeoutEx xtimer.SetTimeoutEx
( (
1, 1,