This commit is contained in:
aozhiwei 2021-08-19 06:11:14 +00:00
parent a36ebcb0a5
commit b65c03e715

View File

@ -4035,5 +4035,14 @@ void Room::ClearPostBattleAutoFreeList()
void Room::OnBattleStart()
{
std::vector<EntityWeakPtr> entitys;
entitys.reserve(uniid_hash_.size());
for (auto& pair : uniid_hash_) {
entitys.push_back(pair.second->GetEntityWeakPtrRef());
}
for (auto& e : entitys) {
if (e.Get()) {
e.Get()->OnBattleStart(this);
}
}
}