1
This commit is contained in:
parent
dda5d1a4a7
commit
15488a4309
@ -10,6 +10,7 @@
|
||||
#include "target_agent.h"
|
||||
#include "weapon.h"
|
||||
#include "mapinstance.h"
|
||||
#include "collision.h"
|
||||
|
||||
#include "mt/Hero.h"
|
||||
#include "mt/Equip.h"
|
||||
@ -247,18 +248,23 @@ bool HeroAgent::HasBuffEffect(int effect_id)
|
||||
|
||||
bool HeroAgent::IsNearGas(float range)
|
||||
{
|
||||
float x_distance = std::fabs(owner_->GetPos().ToGlmVec3().x -
|
||||
owner_->room->GetGasData().pos_old.x);
|
||||
float z_distance = std::fabs(owner_->GetPos().ToGlmVec3().z -
|
||||
owner_->room->GetGasData().pos_old.y);
|
||||
return false;
|
||||
return Collision::IsNearInRange
|
||||
(owner_->GetPos().ToGlmVec3(),
|
||||
owner_->GetPos().ToGlmVec3(),
|
||||
range);
|
||||
}
|
||||
|
||||
bool HeroAgent::MasterInRange(float range)
|
||||
{
|
||||
abort();
|
||||
if (!owner_->IsHero() ||
|
||||
!owner_->AsHero()->master.Get()) {
|
||||
return false;
|
||||
}
|
||||
return Collision::IsNearInRange
|
||||
(owner_->AsHero()->master.Get()->GetPos().ToGlmVec3(),
|
||||
owner_->GetPos().ToGlmVec3(),
|
||||
range);
|
||||
}
|
||||
|
||||
behaviac::EBTStatus HeroAgent::SearchEnemy(float range)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user