This commit is contained in:
aozhiwei 2023-01-05 11:38:48 +08:00
parent 4b9fb4a4d7
commit 8e64f163ec

View File

@ -2587,7 +2587,8 @@ void Creature::AutoNavigation(const glm::vec3& target_pos, float speed,
Global::Instance()->verify_set_pos = 0;
#ifdef DEBUG
a8::XPrintf("speed:%d src_pos:%f,%f,%f new_pos:%f,%f,%f move_distance:%f src_distance:%f\n",
a8::XPrintf("speed:%d src_pos:%f,%f,%f new_pos:%f,%f,%f move_distance:%f src_distance:%f "
"target_pos:%f,%f,%f\n",
{
context->speed,
context->src_pos.x,
@ -2597,7 +2598,10 @@ void Creature::AutoNavigation(const glm::vec3& target_pos, float speed,
new_pos.y,
new_pos.z,
move_distance,
context->distance
context->distance,
context->target_pos.x,
context->target_pos.y,
context->target_pos.z
});
#endif
bool ok = std::abs(move_distance - context->distance) < 0.0001f;