1
This commit is contained in:
parent
f91482495b
commit
329937a74e
@ -847,12 +847,17 @@ void Room::RemoveObjectLater(RoomObstacle* entity)
|
|||||||
|
|
||||||
void Room::InternalRemoveObjectLater(Entity* entity, a8::Attacher& xtimer_attacher)
|
void Room::InternalRemoveObjectLater(Entity* entity, a8::Attacher& xtimer_attacher)
|
||||||
{
|
{
|
||||||
|
int entity_uniid = entity->GetUniId();
|
||||||
auto remove_func =
|
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) {
|
if (a8::TIMER_EXEC_EVENT != event) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Entity* entity = GetEntityByUniId(entity_uniid);
|
||||||
|
if (!entity) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (entity->GetEntityType()) {
|
switch (entity->GetEntityType()) {
|
||||||
case ET_Bullet:
|
case ET_Bullet:
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user