mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-06-10 09:47:46 +00:00
update 3
This commit is contained in:
parent
415be38845
commit
fa3226bc00
2 changed files with 3 additions and 3 deletions
|
@ -60,10 +60,10 @@ std::string Sapphire::Entity::Chara::getName() const
|
|||
return std::string( m_name );
|
||||
}
|
||||
|
||||
bool Sapphire::Entity::Chara::isFacing( Entity::CharaPtr target )
|
||||
bool Sapphire::Entity::Chara::isFacing( Entity::CharaPtr target, float arcDegree )
|
||||
{
|
||||
auto angleBetween = Util::RelativeAngle( getRot(), getPos().x, getPos().y, target->getPos().x, target->getPos().y );
|
||||
return angleBetween >= ( -( 180.0f / 2 ) && angleBetween <= ( 180.0f / 2 ) );
|
||||
return angleBetween >= ( -( arcDegree / 2 ) && angleBetween <= ( arcDegree / 2 ) );
|
||||
}
|
||||
|
||||
/*! \return current stance of the actors */
|
||||
|
|
|
@ -160,7 +160,7 @@ namespace Sapphire::Entity
|
|||
|
||||
std::string getName() const;
|
||||
|
||||
bool isFacing( Entity::CharaPtr target );
|
||||
bool isFacing( Entity::CharaPtr target, float arcDegree = 100 );
|
||||
|
||||
bool face( const Common::FFXIVARR_POSITION3& p );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue