This commit is contained in:
aozhiwei 2024-03-05 15:17:10 +08:00
parent f91482495b
commit 329937a74e

View File

@ -847,12 +847,17 @@ void Room::RemoveObjectLater(RoomObstacle* entity)
void Room::InternalRemoveObjectLater(Entity* entity, a8::Attacher& xtimer_attacher)
{
int entity_uniid = entity->GetUniId();
auto remove_func =
[this, entity] (int event, const a8::Args* args)
[this, entity_uniid] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT != event) {
return;
}
Entity* entity = GetEntityByUniId(entity_uniid);
if (!entity) {
return;
}
switch (entity->GetEntityType()) {
case ET_Bullet:
{