1
This commit is contained in:
parent
60be8befe7
commit
ce7c06d841
@ -282,6 +282,8 @@ void HeroAI::DoMoveAI()
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
if (owner->room->IsPveRoom()) {
|
||||||
|
}
|
||||||
int speed = std::max(1, (int)hero->GetSpeed()) * 1;
|
int speed = std::max(1, (int)hero->GetSpeed()) * 1;
|
||||||
hero->_UpdateMove(speed);
|
hero->_UpdateMove(speed);
|
||||||
hero->on_move_collision = old_on_move_collision_func;
|
hero->on_move_collision = old_on_move_collision_func;
|
||||||
@ -342,6 +344,9 @@ void HeroAI::ChangeToStateAI(HeroState_e to_state)
|
|||||||
a8::Vec2 move_dir = a8::Vec2(1.0f, 0);
|
a8::Vec2 move_dir = a8::Vec2(1.0f, 0);
|
||||||
move_dir.Rotate(a8::RandAngle());
|
move_dir.Rotate(a8::RandAngle());
|
||||||
move_dir.Normalize();
|
move_dir.Normalize();
|
||||||
|
if (owner->room->IsPveRoom()) {
|
||||||
|
|
||||||
|
}
|
||||||
hero->SetMoveDir(move_dir);
|
hero->SetMoveDir(move_dir);
|
||||||
hero->SetAttackDir(hero->GetMoveDir());
|
hero->SetAttackDir(hero->GetMoveDir());
|
||||||
if (node_->param1 <= 1) {
|
if (node_->param1 <= 1) {
|
||||||
@ -420,6 +425,9 @@ Creature* HeroAI::GetTarget()
|
|||||||
if (hum->IsCar() && !hum->AsCar()->HasPassenter()) {
|
if (hum->IsCar() && !hum->AsCar()->HasPassenter()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (hum->room->IsPveRoom() && !hum->IsHuman()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (target) {
|
if (target) {
|
||||||
if (myself->GetPos().ManhattanDistance(target->GetPos()) >
|
if (myself->GetPos().ManhattanDistance(target->GetPos()) >
|
||||||
myself->GetPos().ManhattanDistance(hum->GetPos())) {
|
myself->GetPos().ManhattanDistance(hum->GetPos())) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user