This commit is contained in:
aozhiwei 2022-12-14 19:21:02 +08:00
parent 0d8f6b17c2
commit 199e4c9e0f
2 changed files with 4 additions and 8 deletions

View File

@ -96,7 +96,7 @@ void MoveHelper::CalcTargetPos(float distance)
}
#ifdef DEBUG
if (owner_->IsPlayer()) {
a8::XPrintf("CalcTargetPos src_pos:%f,%f,%f tar_pos:%f,%f%f is_hit:%d start:%f,%f,%f end:%f,%f,%f distance:%f\n",
a8::XPrintf("CalcTargetPos src_pos:%f,%f,%f tar_pos:%f,%f,%f is_hit:%d start:%f,%f,%f end:%f,%f,%f distance:%f src_distance\n",
{
point.src_pos.x,
point.src_pos.y,
@ -113,7 +113,8 @@ void MoveHelper::CalcTargetPos(float distance)
end.x,
end.y,
end.z,
point.distance
point.distance,
distance
});
}
#endif

View File

@ -10,11 +10,6 @@ float Position::Distance2D(a8::Vec2 pos)
return pos.Distance(ToVec2());
}
float Position::Distance2D2(const Position& pos)
{
return Distance2D(pos.ToVec2());
}
float Position::ManhattanDistance2D(const Position& target_pos)
{
return ToVec2().ManhattanDistance(target_pos.ToVec2());
@ -79,7 +74,7 @@ a8::Vec2 Position::ToVec2() const
{
a8::Vec2 v2;
v2.x = x;
v2.y = y;
v2.y = z;
return v2;
}