1
This commit is contained in:
parent
b99e46de42
commit
f161f2b744
@ -86,8 +86,11 @@ void AndroidAI::DoMove()
|
|||||||
float distance = 8.0f + rand() % 10;
|
float distance = 8.0f + rand() % 10;
|
||||||
Vector2D out_pos;
|
Vector2D out_pos;
|
||||||
if (owner->room->RandomPos((Human*)owner, distance, out_pos)) {
|
if (owner->room->RandomPos((Human*)owner, distance, out_pos)) {
|
||||||
owner->movement->ClearPath();
|
Human* hum = (Human*)owner;
|
||||||
owner->movement->AddPathPoint(out_pos, distance, owner->GetSpeed());
|
hum->movement->ClearPath();
|
||||||
|
hum->movement->AddPathPoint(out_pos, distance, owner->GetSpeed());
|
||||||
|
hum->attack_dir = out_pos - owner->pos;
|
||||||
|
hum->attack_dir.Normalize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user