1
This commit is contained in:
parent
55a14af63e
commit
08994498ff
@ -9,6 +9,11 @@
|
||||
<property Prototype="Self.BaseAgent::ChaseToKill(0)" />
|
||||
<property IsHTN="false" />
|
||||
<node class="Sequence" id="1">
|
||||
<node class="Assignment" id="9">
|
||||
<property CastRight="false" />
|
||||
<property Opl="int Self.AndroidAgent::_$local_task_param_$_0" />
|
||||
<property Opr="int Self.BaseAgent::find_enemy_target_uniid" />
|
||||
</node>
|
||||
<node class="Action" id="2">
|
||||
<property Method="Self.BaseAgent::SetCurrentTarget(int Self.AndroidAgent::_$local_task_param_$_0)" />
|
||||
<property ResultOption="BT_SUCCESS" />
|
||||
|
@ -46,7 +46,7 @@
|
||||
<property ReferenceBehavior="const string "boss_40101_attack"" />
|
||||
</node>
|
||||
<node class="Action" id="8">
|
||||
<property Method="Self.BaseAgent::CoFindPathToCurrentTarget(60)" />
|
||||
<property Method="Self.BaseAgent::CoFindPathToCurrentTarget(0)" />
|
||||
<property ResultOption="BT_INVALID" />
|
||||
</node>
|
||||
</node>
|
||||
|
@ -45,8 +45,13 @@ bool AndroidAgent::IsCrazeModePrepareMode()
|
||||
if (!IsCrazeMode()) {
|
||||
return false;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (GetOwner()->room->GetFrameNo() - GetOwner()->AsHuman()->enable_frameno > SERVER_FRAME_RATE * 5) {
|
||||
return false;
|
||||
#else
|
||||
if (GetOwner()->room->GetFrameNo() - GetOwner()->AsHuman()->enable_frameno > SERVER_FRAME_RATE * 20) {
|
||||
return false;
|
||||
#endif
|
||||
} else {
|
||||
if (GetSafeAreaRadius() < 200) {
|
||||
return false;
|
||||
|
@ -308,6 +308,9 @@ behaviac::EBTStatus BaseAgent::SelectUseableSkill(const behaviac::vector<int> sk
|
||||
if (!current_target_.Get()) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
if (GlmHelper::IsEqual2D(GetOwner()->GetPos().ToGlmVec3(),
|
||||
current_target_.Get()->GetPos().ToGlmVec3())) {
|
||||
}
|
||||
for (int skill_id : skill_ids) {
|
||||
Skill* skill = GetOwner()->GetSkill(skill_id);
|
||||
if (skill && GetOwner()->CanUseSkill(skill->GetSkillId())) {
|
||||
@ -366,10 +369,15 @@ behaviac::EBTStatus BaseAgent::CoMoveToCurrentTarget(float distance)
|
||||
if (!current_target_.Get()) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
float target_distance = GetOwner()->GetPos().Distance2D2(current_target_.Get()->GetPos());
|
||||
if (target_distance > 2) {
|
||||
return behaviac::BT_SUCCESS;
|
||||
}
|
||||
/*
|
||||
if (GlmHelper::IsEqual2D(GetOwner()->GetPos().ToGlmVec3(),
|
||||
current_target_.Get()->GetPos().ToGlmVec3())) {
|
||||
return behaviac::BT_SUCCESS;
|
||||
}
|
||||
}*/
|
||||
auto context = MAKE_BTCONTEXT
|
||||
(
|
||||
CreatureWeakPtr target;
|
||||
|
Loading…
x
Reference in New Issue
Block a user