1
This commit is contained in:
parent
60fb279830
commit
06ff506672
@ -13,6 +13,12 @@
|
||||
<property ResultOption="BT_INVALID" />
|
||||
</node>
|
||||
</node>
|
||||
<node class="IfElse" id="6">
|
||||
<node class="Condition" id="7">
|
||||
<property Operator="Greater" />
|
||||
<property Opl="Self.BaseAgent::GetAttackRange()" />
|
||||
<property Opr="Self.BaseAgent::GetCurrentTargetDistance()" />
|
||||
</node>
|
||||
<node class="Action" id="5">
|
||||
<property Method="Self.BaseAgent::CoShot()" />
|
||||
<property ResultOption="BT_INVALID" />
|
||||
@ -22,4 +28,5 @@
|
||||
<property ResultOption="BT_INVALID" />
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</behavior>
|
@ -511,7 +511,7 @@ behaviac::EBTStatus BaseAgent::CoShot()
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
glm::vec3 dir = GetOwner()->GetPos().CalcDir(current_target_.Get()->GetPos());
|
||||
if (GlmHelper::Norm(dir) > 150) {
|
||||
if (GlmHelper::Norm(dir) > GetAttackRange()) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
bool shot_ok = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user