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