1
This commit is contained in:
parent
f97c4ccc59
commit
414c0aa7e1
@ -2731,7 +2731,7 @@ void Creature::AutoNavigation(Position target_pos, float speed,
|
|||||||
CreatureWeakPtr c;
|
CreatureWeakPtr c;
|
||||||
Position src_pos;
|
Position src_pos;
|
||||||
Position target_pos;
|
Position target_pos;
|
||||||
a8::Vec2 dir;
|
glm::vec3 dir;
|
||||||
int exec_frameno = 0;
|
int exec_frameno = 0;
|
||||||
float speed = 0.0f;
|
float speed = 0.0f;
|
||||||
float distance = 0.0f;
|
float distance = 0.0f;
|
||||||
@ -2741,8 +2741,8 @@ void Creature::AutoNavigation(Position target_pos, float speed,
|
|||||||
context->c = GetWeakPtrRef();
|
context->c = GetWeakPtrRef();
|
||||||
context->src_pos = GetPos();
|
context->src_pos = GetPos();
|
||||||
context->target_pos = target_pos;
|
context->target_pos = target_pos;
|
||||||
context->dir = GetPos().CalcDir2D(target_pos);
|
context->dir = GetPos().CalcDir(target_pos);
|
||||||
context->dir.Normalize();
|
GlmHelper::Normalize(context->dir);
|
||||||
context->speed = speed;
|
context->speed = speed;
|
||||||
context->distance = distance;
|
context->distance = distance;
|
||||||
context->cb = cb;
|
context->cb = cb;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user