1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-28 07:07:45 +00:00

Revert "fix npcs not facing target after being pushed"

This reverts commit 692c32b934.
This commit is contained in:
NotAdam 2019-01-31 23:55:55 +11:00
parent 692c32b934
commit 8c9c98e896
2 changed files with 3 additions and 4 deletions

View file

@ -222,7 +222,7 @@ bool Sapphire::Entity::BNpc::moveTo( const FFXIVARR_POSITION3& pos )
{
// do this first, this will update local actor position and the position of other actors
// and then this npc will then path from the position after pushing/being pushed
pushNearbyBNpcs( pos );
pushNearbyBNpcs();
if( Util::distance( getPos(), pos ) <= m_naviTargetReachedDistance )
{
@ -629,7 +629,7 @@ void Sapphire::Entity::BNpc::checkAggro()
}
}
void Sapphire::Entity::BNpc::pushNearbyBNpcs( const Common::FFXIVARR_POSITION3& pos )
void Sapphire::Entity::BNpc::pushNearbyBNpcs()
{
for( auto& bNpc : m_inRangeBNpc )
{
@ -651,7 +651,6 @@ void Sapphire::Entity::BNpc::pushNearbyBNpcs( const Common::FFXIVARR_POSITION3&
auto x = ( cosf( angle ) );
auto z = ( sinf( angle ) );
bNpc->face( pos );
bNpc->setPos( pos.x + ( x * factor * delta ),
pos.y,
pos.z + ( z * factor * delta ) );

View file

@ -98,7 +98,7 @@ namespace Sapphire::Entity
void checkAggro();
void pushNearbyBNpcs( const Common::FFXIVARR_POSITION3& pos );
void pushNearbyBNpcs();
private:
uint32_t m_bNpcBaseId;