Skip to content

Commit

Permalink
fixed badges showing after despawn sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
afwbkbc committed Jun 9, 2024
1 parent 23a7642 commit c609ec1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/task/game/unit/UnitManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,13 @@ void UnitManager::DespawnUnit( const size_t unit_id ) {
auto* unit = it->second;

m_units.erase( it );
delete unit;


if ( unit->IsOwned() ) {
RemoveSelectable( unit );
}

delete unit;

m_game->RefreshSelectedTile( m_selected_unit );

}
Expand Down

0 comments on commit c609ec1

Please sign in to comment.