This commit is contained in:
aozhiwei 2023-04-07 21:08:13 +08:00
parent 47b863f60d
commit 170650a4ac

View File

@ -798,10 +798,13 @@ void Room::InternalRemoveObjectLater(Entity* entity, a8::Attacher& xtimer_attach
#endif
delete entity;
};
xtimer.SetTimeoutEx
(NEXT_FRAME_TIMER,
remove_func,
&xtimer_attacher);
if (!entity->removing) {
entity->removing = true;
xtimer.SetTimeoutEx
(NEXT_FRAME_TIMER,
remove_func,
&xtimer_attacher);
}
}
void Room::OnHumanDie(Human* hum)