1
This commit is contained in:
parent
640e239b58
commit
5fba11b7dc
@ -3667,5 +3667,6 @@ void Creature::InitMobaRoad()
|
||||
if (room->IsMobaModeRoom()) {
|
||||
road_idx = rand() % room->GetMapMeta()->moba_path_points.size();
|
||||
point_idx = 0;
|
||||
path_dir = side == 2 ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
@ -1089,7 +1089,7 @@ bool HeroAgent::SwitchToNewAttacker()
|
||||
|
||||
int HeroAgent::GetReviveCount()
|
||||
{
|
||||
return false;
|
||||
return owner_->revive_count;
|
||||
}
|
||||
|
||||
behaviac::EBTStatus HeroAgent::CoGetNextMobaModeRoadPoint()
|
||||
@ -1102,7 +1102,7 @@ behaviac::EBTStatus HeroAgent::CoGetNextMobaModeRoadPoint()
|
||||
GlmHelper::RotateY(dir, (10 + rand() % 360)/ 180.0f);
|
||||
GlmHelper::Normalize(dir);
|
||||
if (owner_->point_idx < road.size()) {
|
||||
if (owner_->side == 2) {
|
||||
if (owner_->path_dir == 1) {
|
||||
out_point0 = std::get<0>(road.at(road.size() - owner_->point_idx - 1))->pos;
|
||||
} else {
|
||||
out_point0 = std::get<0>(road.at(owner_->point_idx))->pos;
|
||||
@ -1110,6 +1110,8 @@ behaviac::EBTStatus HeroAgent::CoGetNextMobaModeRoadPoint()
|
||||
}
|
||||
++owner_->point_idx;
|
||||
} else {
|
||||
owner_->point_idx =0;
|
||||
owner_->path_dir = owner_->path_dir == 1 ? 0 : 1;
|
||||
}
|
||||
return behaviac::BT_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user