离线算位置数据错误处理
This commit is contained in:
parent
e4c476467f
commit
611c2fae03
@ -280,11 +280,16 @@ bool TiledMap::CalcCurrPos(std::vector<int>& path_points, int old_pos_x, int old
|
|||||||
}
|
}
|
||||||
|
|
||||||
StagePoint* sp_terminal = GetStageObject(path_points[path_points.size()-1]);
|
StagePoint* sp_terminal = GetStageObject(path_points[path_points.size()-1]);
|
||||||
if (sp_terminal && old_pos_x == sp_terminal->x && old_pos_y == sp_terminal->y) {
|
if (sp_terminal) {
|
||||||
|
if (old_pos_x == sp_terminal->x && old_pos_y == sp_terminal->y) {
|
||||||
curr_pos_x = old_pos_x;
|
curr_pos_x = old_pos_x;
|
||||||
curr_pos_y = old_pos_y;
|
curr_pos_y = old_pos_y;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
//报错放终点
|
||||||
|
curr_pos_x = sp_terminal->x;
|
||||||
|
curr_pos_y = sp_terminal->y;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::string> stage_path_list;
|
std::vector<std::string> stage_path_list;
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user