1
This commit is contained in:
parent
b99e46de42
commit
f161f2b744
@ -86,8 +86,11 @@ void AndroidAI::DoMove()
|
||||
float distance = 8.0f + rand() % 10;
|
||||
Vector2D out_pos;
|
||||
if (owner->room->RandomPos((Human*)owner, distance, out_pos)) {
|
||||
owner->movement->ClearPath();
|
||||
owner->movement->AddPathPoint(out_pos, distance, owner->GetSpeed());
|
||||
Human* hum = (Human*)owner;
|
||||
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