Skip to content

Commit

Permalink
Merge pull request #38545 from Fris0uman/reset_scent
Browse files Browse the repository at this point in the history
Reset scent types on game load
  • Loading branch information
ZhilkinSerg authored Mar 4, 2020
2 parents 4859a3d + c8833cc commit 5723071
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ void DynamicDataLoader::unload_data()
event_transformation::reset();
event_statistic::reset();
score::reset();
scent_type::reset();

// TODO:
// Name::clear();
Expand Down
5 changes: 5 additions & 0 deletions src/scent_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,8 @@ void scent_type::check_scent_consistency()
}
}
}

void scent_type::reset()
{
scent_factory.reset();
}
1 change: 1 addition & 0 deletions src/scent_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class scent_type

scenttype_id id;
std::set<species_id> receptive_species;
static void reset();
};

class scent_map
Expand Down

0 comments on commit 5723071

Please sign in to comment.