This commit is contained in:
songhao 2018-08-24 08:38:55 -04:00
parent 5bc827bd2f
commit 3d4881f5c9

View File

@ -283,7 +283,7 @@ bool TiledMap::CalcCurrPos(std::list<int>& path_points, int old_pos_x, int old_p
path_point = a8::XValue(point).GetString(); path_point = a8::XValue(point).GetString();
path_end = !path_end; path_end = !path_end;
} else { } else {
path_point += "|" + a8::XValue(point).GetString(); path_point += "-" + a8::XValue(point).GetString();
stage_path_list.push_back(path_point); stage_path_list.push_back(path_point);
path_end = !path_end; path_end = !path_end;
} }
@ -295,7 +295,7 @@ bool TiledMap::CalcCurrPos(std::list<int>& path_points, int old_pos_x, int old_p
std::string stage_path_reverse; std::string stage_path_reverse;
std::vector<std::string> split_list; std::vector<std::string> split_list;
a8::Split(stage_path,split_list,'|'); a8::Split(stage_path,split_list,'-');
if (split_list.size() != 2) { if (split_list.size() != 2) {
return false; return false;
} }
@ -305,7 +305,7 @@ bool TiledMap::CalcCurrPos(std::list<int>& path_points, int old_pos_x, int old_p
} }
grid_list = GetStagePath(stage_path); grid_list = GetStagePath(stage_path);
if (grid_list == nullptr) { if (grid_list == nullptr) {
stage_path_reverse = split_list[1] + "|" + split_list[0]; stage_path_reverse = split_list[1] + "-" + split_list[0];
grid_list = GetStagePath(stage_path_reverse); grid_list = GetStagePath(stage_path_reverse);
if (grid_list == nullptr) { if (grid_list == nullptr) {
return false; return false;