This commit is contained in:
aozhiwei 2024-02-02 16:24:27 +08:00
parent f3042168a4
commit a7423a63e9

View File

@ -2085,12 +2085,16 @@ void Room::RandRemoveAndroid()
{
Human* hum = nullptr;
if (!hum) {
for (auto& pair : human_hash_) {
if (pair.second->IsAndroid() && pair.second->team_uuid.empty()) {
hum = pair.second;
break;
}
}
TraverseHumanList
(
[&hum] (Human* ele_hum) -> bool
{
if (ele_hum->IsAndroid() && ele_hum->team_uuid.empty()) {
hum = ele_hum;
return false;
}
return true;
});
}
if (hum) {
if (hum->team_id != 0) {