mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 15:17:46 +00:00
Let's not forget...
This commit is contained in:
parent
8ea23d521b
commit
4d5a8f1fcf
1 changed files with 20 additions and 0 deletions
20
src/world/Util/ActorFilter.cpp
Normal file
20
src/world/Util/ActorFilter.cpp
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#include "ActorFilter.h"
|
||||||
|
#include "Actor/Actor.h"
|
||||||
|
#include "Util/Util.h"
|
||||||
|
#include "Util/UtilMath.h"
|
||||||
|
|
||||||
|
|
||||||
|
Sapphire::World::Util::ActorFilterInRange::ActorFilterInRange( Common::FFXIVARR_POSITION3 startPos,
|
||||||
|
float range ) :
|
||||||
|
m_startPos( startPos ),
|
||||||
|
m_range( range )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Sapphire::World::Util::ActorFilterInRange::conditionApplies( const Entity::Actor& actor )
|
||||||
|
{
|
||||||
|
return Sapphire::Util::distance( m_startPos.x, m_startPos.y, m_startPos.z,
|
||||||
|
actor.getPos().x, actor.getPos().y, actor.getPos().z ) <= m_range;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
Loading…
Add table
Reference in a new issue