This commit is contained in:
aozhiwei 2022-12-28 16:14:56 +08:00
parent 907585d60c
commit ed9b629b54

View File

@ -3313,12 +3313,8 @@ void Creature::AutoNavigation(Position target_pos, float speed,
Position old_pos = c->GetPos();
float move_length = context->speed / (float)SERVER_FRAME_RATE;
float move_distance = std::min(move_length * context->exec_frameno, context->distance);
// 999
#if 1
Position new_pos = context->src_pos;
#else
a8::Vec2 new_pos = context->src_pos + dir * move_distance;
#endif
new_pos.AddGlmVec3(dir * move_distance);
c->SetPos(new_pos);
#ifdef DEBUG