Skip to content

Commit

Permalink
Set default deleted agents idx to -1
Browse files Browse the repository at this point in the history
  • Loading branch information
aaravpandya committed Jan 18, 2025
1 parent 25fe4e8 commit 4e894d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,11 @@ Sim::Sim(Engine &ctx,

auto& map = ctx.singleton<Map>();
map = *(init.map);

auto& deletedAgents = ctx.singleton<DeletedAgents>();
for (auto i = 0; i < consts::kMaxAgentCount; i++) {
deletedAgents.deletedAgents[i] = -1;
}
// Creates agents, walls, etc.
createPersistentEntities(ctx);

Expand Down

0 comments on commit 4e894d2

Please sign in to comment.