Fixing where open drive content is cached

This commit is contained in:
bernatx 2021-07-21 11:37:23 +02:00
parent a6dbdb234a
commit cdb0318e05
2 changed files with 7 additions and 4 deletions

View File

@ -28,12 +28,15 @@ namespace client {
Map::Map(rpc::MapInfo description, std::string xodr_content)
: _description(std::move(description)),
_map(MakeMap(xodr_content)){}
_map(MakeMap(xodr_content)){
open_drive_file = xodr_content;
}
Map::Map(std::string name, std::string xodr_content)
: Map(rpc::MapInfo{
std::move(name),
std::vector<geom::Transform>{}}, xodr_content) {}
std::vector<geom::Transform>{}}, xodr_content) {
open_drive_file = xodr_content;
}
Map::~Map() = default;

View File

@ -27,7 +27,7 @@ class TestMap(SmokeTest):
# workaround: give time to UE4 to clean memory after loading (old assets)
time.sleep(5)
m = world.get_map()
self.assertEqual(map_name.split('/')[-1], m.name)
self.assertEqual(map_name.split('/')[-1], m.name.split('/')[-1])
self._check_map(m)
def _check_map(self, m):