Fix not clearing checkpoint list between maps

This commit is contained in:
Ashnal 2025-04-09 00:30:28 -04:00
parent 7d0f97b8a1
commit 18d33e8589
2 changed files with 14 additions and 2 deletions

View file

@ -77,6 +77,14 @@ struct MobjList
}
}
void clear()
{
while (!empty())
{
erase(front());
}
}
auto begin() const { return view().begin(); }
auto end() const { return view().end(); }

View file

@ -502,7 +502,11 @@ struct CheckpointManager
chk->gingerbread();
}
void clear() { lines_.clear(); }
void clear()
{
lines_.clear();
list_.clear();
}
auto count() { return list_.count(); }
@ -558,7 +562,7 @@ void Obj_CheckpointThink(mobj_t* end)
chk->animate();
}
void __attribute__((optimize("O0"))) Obj_CrossCheckpoints(player_t* player, fixed_t old_x, fixed_t old_y)
void Obj_CrossCheckpoints(player_t* player, fixed_t old_x, fixed_t old_y)
{
LineOnDemand ray(old_x, old_y, player->mo->x, player->mo->y, player->mo->radius);