1
This commit is contained in:
parent
a96777029b
commit
907585d60c
@ -3308,8 +3308,8 @@ void Creature::AutoNavigation(Position target_pos, float speed,
|
||||
Room* room = context->c.Get()->room;
|
||||
Creature* c = context->c.Get();
|
||||
|
||||
a8::Vec2 dir = c->GetPos().CalcDir2D(context->target_pos);
|
||||
dir.Normalize();
|
||||
glm::vec3 dir = c->GetPos().CalcDir(context->target_pos);
|
||||
GlmHelper::Normalize(dir);
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user