Skip to content

Commit

Permalink
fix darttrap segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
Narre committed Aug 5, 2023
1 parent 967c565 commit 04efaf2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/badguy/darttrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ DartTrap::DartTrap(const ReaderMapping& reader) :
if (!Editor::is_active()) {
if (m_initial_delay == 0) m_initial_delay = 0.1f;
}

auto allowed_directions = get_allowed_directions();

for (int i = 0; i < static_cast<int>(allowed_directions.size()); ++i)
{
if (allowed_directions[i] == m_start_dir)
{
m_dir_in_allowed = i;
break;
}
}
}

void
Expand Down

0 comments on commit 04efaf2

Please sign in to comment.