This commit is contained in:
aozhiwei 2024-09-09 11:14:28 +08:00
parent eb70f58aae
commit 265c27a9bf

View File

@ -294,10 +294,16 @@ void Movement::AdjustLastPath(float distance)
bool Movement::MoveToPos(const glm::vec3& target_pos)
{
ClearPath();
#ifdef MYDEBUG1
if (owner_->IsPlayer()) {
a8::XPrintf("MoveToTarget old_size:%d distance:%f\n", {paths_.size(), distance});
}
#ifdef MYDEBUG
a8::XPrintf("MoveToTarget curr_pos:%f %f %f target_pos:%f %f %f\n",
{
owner_->GetPos().GetX(),
owner_->GetPos().GetY(),
owner_->GetPos().GetZ(),
target_pos.x,
target_pos.y,
target_pos.z,
});
#endif
Position pos = owner_->GetPos();
glm::vec3 start = owner_->GetPos().ToGlmVec3();
@ -359,9 +365,9 @@ bool Movement::MoveToPos(const glm::vec3& target_pos)
point.tar_pos.GetZ() < 0) {
abort();
}
#ifdef MYDEBUG1
if (owner_->IsPlayer()) {
a8::XPrintf("MoveTotarget 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:%f\n",
#ifdef MYDEBUG
{
a8::XPrintf("MoveTotarget src_pos:%f,%f,%f tar_pos:%f,%f,%f is_hit:%d start:%f,%f,%f end:%f,%f,%f distance:%f \n",
{
point.src_pos.GetX(),
point.src_pos.GetY(),
@ -379,7 +385,6 @@ bool Movement::MoveToPos(const glm::vec3& target_pos)
end.y,
end.z,
point.distance,
distance
});
}
#endif