navigation information is now loaded when changing maps

This commit is contained in:
AreopagX 2024-02-29 19:15:58 +01:00 committed by Blyron
parent c097d7acf1
commit 9e94feb3a5
2 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,5 @@
## Latest Changes ## Latest Changes
* Fixed a bug that caused navigation information not to be loaded when switching maps
* Prevent from segfault on failing SignalReference identification when loading OpenDrive files * Prevent from segfault on failing SignalReference identification when loading OpenDrive files
* Added vehicle doors to the recorder * Added vehicle doors to the recorder
* Added functions to get actor' components transform * Added functions to get actor' components transform

View File

@ -88,6 +88,12 @@ namespace detail {
const auto id = GetCurrentEpisode().GetId(); const auto id = GetCurrentEpisode().GetId();
_client.LoadEpisode(std::move(map_name), reset_settings, map_layers); _client.LoadEpisode(std::move(map_name), reset_settings, map_layers);
// delete the pointer to _episode so that the Navigation information
// will be loaded for the correct map
assert(_episode.use_count() == 1);
_episode.reset();
GetReadyCurrentEpisode();
// We are waiting 50ms for the server to reload the episode. // We are waiting 50ms for the server to reload the episode.
// If in this time we have not detected a change of episode, we try again // If in this time we have not detected a change of episode, we try again
// 'number_of_attempts' times. // 'number_of_attempts' times.