- El heroi es independent de la recarrega
This commit is contained in:
@@ -640,13 +640,34 @@ namespace actor
|
||||
|
||||
void clear()
|
||||
{
|
||||
actor_t *hero = nullptr;
|
||||
actor_t *act = first;
|
||||
while (act)
|
||||
{
|
||||
actor_t *tmp = act->next;
|
||||
free(act);
|
||||
if (act->flags & FLAG_HERO) {
|
||||
hero = act;
|
||||
} else {
|
||||
free(act);
|
||||
}
|
||||
act = tmp;
|
||||
}
|
||||
act = dirty;
|
||||
while (act)
|
||||
{
|
||||
actor_t *tmp = act->next;
|
||||
if (act->flags & FLAG_HERO) {
|
||||
hero = act;
|
||||
} else {
|
||||
free(act);
|
||||
}
|
||||
act = tmp;
|
||||
}
|
||||
first = dirty = nullptr;
|
||||
if (hero) {
|
||||
hero->above = hero->below = hero->next = hero->prev = nullptr;
|
||||
dirty = hero;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user