1
This commit is contained in:
parent
97057b81c2
commit
3afdaf0f2f
@ -9,6 +9,7 @@
|
||||
#include "player.h"
|
||||
#include "app.h"
|
||||
#include "car.h"
|
||||
#include "mapinstance.h"
|
||||
|
||||
const int SHUA_RANGE = 580;
|
||||
|
||||
@ -468,6 +469,35 @@ void AndroidAI::UpdatePursuit()
|
||||
ChangeToStateNewAI(ASE_Attack);
|
||||
} else {
|
||||
#ifdef MAP3D
|
||||
a8::Vec3 center;
|
||||
glm::vec3 random_pt;
|
||||
center.x = myself->GetPos().x;
|
||||
center.y = 0;
|
||||
center.z = myself->GetPos().y;
|
||||
int ret = myself->room->map_instance->FindRandomPointAroundCircle
|
||||
(0,
|
||||
center,
|
||||
GetAttackRange() / 10.f,
|
||||
random_pt
|
||||
);
|
||||
if (ret > 0) {
|
||||
a8::Vec3 start = center;
|
||||
a8::Vec3 end;
|
||||
end.x = random_pt.x;
|
||||
end.y = random_pt.y;
|
||||
end.z = random_pt.z;
|
||||
std::vector<a8::Vec3> paths;
|
||||
int ret = myself->room->map_instance->FindStraightPath
|
||||
(
|
||||
0,
|
||||
start,
|
||||
end,
|
||||
paths
|
||||
);
|
||||
if (ret > 0) {
|
||||
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (node_->exec_frame_num > 100 * 2) {
|
||||
ChangeToStateNewAI(ASE_RandomWalk);
|
||||
|
Loading…
x
Reference in New Issue
Block a user