1
This commit is contained in:
parent
34906b3ae6
commit
42b1eb217c
@ -2125,9 +2125,13 @@ void Room::AddObjectLater(RoomEntity* entity)
|
||||
|
||||
void Room::OnGameOver()
|
||||
{
|
||||
for (auto& pair : human_hash_) {
|
||||
pair.second->SendGameOver();
|
||||
}
|
||||
TraverseRawHumanList
|
||||
(
|
||||
[] (Human* ele_hum) -> bool
|
||||
{
|
||||
ele_hum->SendGameOver();
|
||||
return true;
|
||||
});
|
||||
int param1 = 1;
|
||||
xtimer.SetIntervalEx
|
||||
(
|
||||
@ -2147,9 +2151,13 @@ void Room::OnGameOver()
|
||||
#endif
|
||||
RoomMgr::Instance()->AddOverRoom(room_uuid_);
|
||||
}
|
||||
for (auto& pair : human_hash_) {
|
||||
pair.second->SendGameOver();
|
||||
}
|
||||
TraverseRawHumanList
|
||||
(
|
||||
[] (Human* ele_hum) -> bool
|
||||
{
|
||||
ele_hum->SendGameOver();
|
||||
return true;
|
||||
});
|
||||
++param1;
|
||||
}
|
||||
},
|
||||
@ -2195,12 +2203,20 @@ void Room::RandRemoveAndroid()
|
||||
alive_count_chged_frameno_ = GetFrameNo();
|
||||
--PerfMonitor::Instance()->alive_count;
|
||||
}
|
||||
for (auto& pair : human_hash_) {
|
||||
pair.second->RemovePartObjects(hum);
|
||||
}
|
||||
for (auto& pair : human_hash_) {
|
||||
pair.second->RemoveObjects(hum);
|
||||
}
|
||||
TraverseRawHumanList
|
||||
(
|
||||
[] (Human* ele_hum) -> bool
|
||||
{
|
||||
ele_hum->RemovePartObjects(hum);
|
||||
return true;
|
||||
});
|
||||
TraverseRawHumanList
|
||||
(
|
||||
[] (Human* ele_hum) -> bool
|
||||
{
|
||||
ele_hum->RemoveObjects(hum);
|
||||
return true;
|
||||
});
|
||||
frame_event.AddExitGame(hum->GetWeakPtrRef());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user