1
This commit is contained in:
parent
0d8f6b17c2
commit
199e4c9e0f
@ -96,7 +96,7 @@ void MoveHelper::CalcTargetPos(float distance)
|
|||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (owner_->IsPlayer()) {
|
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.x,
|
||||||
point.src_pos.y,
|
point.src_pos.y,
|
||||||
@ -113,7 +113,8 @@ void MoveHelper::CalcTargetPos(float distance)
|
|||||||
end.x,
|
end.x,
|
||||||
end.y,
|
end.y,
|
||||||
end.z,
|
end.z,
|
||||||
point.distance
|
point.distance,
|
||||||
|
distance
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,11 +10,6 @@ float Position::Distance2D(a8::Vec2 pos)
|
|||||||
return pos.Distance(ToVec2());
|
return pos.Distance(ToVec2());
|
||||||
}
|
}
|
||||||
|
|
||||||
float Position::Distance2D2(const Position& pos)
|
|
||||||
{
|
|
||||||
return Distance2D(pos.ToVec2());
|
|
||||||
}
|
|
||||||
|
|
||||||
float Position::ManhattanDistance2D(const Position& target_pos)
|
float Position::ManhattanDistance2D(const Position& target_pos)
|
||||||
{
|
{
|
||||||
return ToVec2().ManhattanDistance(target_pos.ToVec2());
|
return ToVec2().ManhattanDistance(target_pos.ToVec2());
|
||||||
@ -79,7 +74,7 @@ a8::Vec2 Position::ToVec2() const
|
|||||||
{
|
{
|
||||||
a8::Vec2 v2;
|
a8::Vec2 v2;
|
||||||
v2.x = x;
|
v2.x = x;
|
||||||
v2.y = y;
|
v2.y = z;
|
||||||
return v2;
|
return v2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user