This commit is contained in:
aozhiwei 2023-10-24 15:22:04 +08:00
parent dd358cfde4
commit d753254c0b
3 changed files with 17 additions and 3 deletions

View File

@ -188,6 +188,20 @@
<property Opr2="const bool true" /> <property Opr2="const bool true" />
<property Phase="Both" /> <property Phase="Both" />
</attachment> </attachment>
<attachment class="Precondition" id="55" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Greater" />
<property Opl="Self.HeroAgent::GetAliveEnemyNum()" />
<property Opr2="const int 1" />
<property Phase="Both" />
</attachment>
<attachment class="Precondition" id="56" flag="precondition">
<property BinaryOperator="And" />
<property Operator="Greater" />
<property Opl="Self.HeroAgent::GetSafeAreaRadius()" />
<property Opr2="const float 350" />
<property Phase="Both" />
</attachment>
<node class="Selector" id="42"> <node class="Selector" id="42">
<node class="Condition" id="53"> <node class="Condition" id="53">
<property Operator="Greater" /> <property Operator="Greater" />

View File

@ -10,7 +10,7 @@
<property IsHTN="false" /> <property IsHTN="false" />
<node class="Sequence" id="1"> <node class="Sequence" id="1">
<node class="DecoratorLoop" id="5"> <node class="DecoratorLoop" id="5">
<property Count="const int 3" /> <property Count="const int 1" />
<property DecorateWhenChildEnds="true" /> <property DecorateWhenChildEnds="true" />
<property DoneWithinFrame="false" /> <property DoneWithinFrame="false" />
<node class="Sequence" id="6"> <node class="Sequence" id="6">

View File

@ -964,12 +964,12 @@ behaviac::EBTStatus HeroAgent::CoGetRunAwayPoint()
glm::vec3 dir = gas_center - owner_->GetPos().ToGlmVec3(); glm::vec3 dir = gas_center - owner_->GetPos().ToGlmVec3();
GlmHelper::Normalize(dir); GlmHelper::Normalize(dir);
context->step_len = a8::RandEx(200, 300); context->step_len = a8::RandEx(150, 220);
glm::vec3 center = gas_center; glm::vec3 center = gas_center;
if (owner_->room->GetGasData().gas_progress > context->step_len + 50) { if (owner_->room->GetGasData().gas_progress > context->step_len + 50) {
center = gas_center + dir * (owner_->room->GetGasData().gas_progress - context->step_len); center = gas_center + dir * (owner_->room->GetGasData().gas_progress - context->step_len);
} }
GlmHelper::RotateY(dir, (10 + rand() % 360)/ 180.0f); GlmHelper::RotateY(dir, (10 + rand() % 360)/ 360.0f);
center = center + dir * (float)context->step_len; center = center + dir * (float)context->step_len;
owner_->room->map_instance->Scale(center); owner_->room->map_instance->Scale(center);
glm::vec3 point; glm::vec3 point;