1
This commit is contained in:
parent
d2cfdc64b2
commit
853d5cd2bc
@ -93,7 +93,7 @@
|
||||
<property DecorateWhenChildEnds="false" />
|
||||
<property Weight="const int 60" />
|
||||
<node class="Action" id="15">
|
||||
<property Method="Self.HeroAgent::CoIdle(2000,4000)" />
|
||||
<property Method="Self.HeroAgent::CoIdle(1000,4000)" />
|
||||
<property ResultOption="BT_INVALID" />
|
||||
</node>
|
||||
</node>
|
||||
@ -102,22 +102,6 @@
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node class="DecoratorWeight" id="25">
|
||||
<property DecorateWhenChildEnds="false" />
|
||||
<property Weight="const int 50" />
|
||||
<node class="IfElse" id="19">
|
||||
<node class="Condition" id="20">
|
||||
<property Operator="Equal" />
|
||||
<property Opl="Self.HeroAgent::SearchTeammate(800)" />
|
||||
<property Opr="const bool true" />
|
||||
</node>
|
||||
<node class="ReferencedBehavior" id="21">
|
||||
<property ReferenceBehavior="const string "task/FollowTeammate"" />
|
||||
<property Task="Self.HeroAgent::FollowTeammate({x=0;y=0;z=0;},0)" />
|
||||
</node>
|
||||
<node class="True" id="22" />
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
@ -45,7 +45,9 @@ static bool IsMulCalc(int attr_id)
|
||||
case kHAT_pDefendRateIn:
|
||||
case kHAT_pBlockRateIn:
|
||||
case kHAT_pCritRateIn:
|
||||
#if 0
|
||||
case kHAT_vSpeedRateIn:
|
||||
#endif
|
||||
case kHAT_vHaste:
|
||||
case kHAT_vDrain:
|
||||
case kHAT_vTenacity:
|
||||
|
@ -1640,10 +1640,12 @@ behaviac::EBTStatus HeroAgent::SearchTeammate(int range)
|
||||
if (nearest_teammate) {
|
||||
float distance = nearest_teammate->GetPos().Distance2D2(owner_->GetPos());
|
||||
if (distance <= range) {
|
||||
if (distance > 400) {
|
||||
current_teammate_agent->SetTarget(nearest_teammate);
|
||||
return behaviac::BT_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user