This commit is contained in:
aozhiwei 2024-02-02 17:24:24 +08:00
parent 2fb4b632be
commit b24c5768fa

View File

@ -2700,12 +2700,15 @@ void Room::SyncFrameData()
void Room::RemoveRescue(Human* hum) void Room::RemoveRescue(Human* hum)
{ {
for (auto& pair : human_hash_) { TraverseHumanList
if (pair.second != hum && pair.second->GetActionType() == AT_Relive && (
pair.second->GetActionTargetId() == hum->GetUniId()) { [this, hum] (Human* ele_hum) -> bool
pair.second->CancelAction(); {
} if (ele_hum != hum && ele_hum->GetActionType() == AT_Relive &&
} ele_hum->GetActionTargetId() == hum->GetUniId()) {
ele_hum->CancelAction();
}
});
} }
void Room::NotifyCountdown(const std::string& msg, int time) void Room::NotifyCountdown(const std::string& msg, int time)