mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 15:17:46 +00:00
Revert "fix npcs not facing target after being pushed"
This reverts commit 692c32b934
.
This commit is contained in:
parent
692c32b934
commit
8c9c98e896
2 changed files with 3 additions and 4 deletions
|
@ -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
|
// 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
|
// and then this npc will then path from the position after pushing/being pushed
|
||||||
pushNearbyBNpcs( pos );
|
pushNearbyBNpcs();
|
||||||
|
|
||||||
if( Util::distance( getPos(), pos ) <= m_naviTargetReachedDistance )
|
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 )
|
for( auto& bNpc : m_inRangeBNpc )
|
||||||
{
|
{
|
||||||
|
@ -651,7 +651,6 @@ void Sapphire::Entity::BNpc::pushNearbyBNpcs( const Common::FFXIVARR_POSITION3&
|
||||||
auto x = ( cosf( angle ) );
|
auto x = ( cosf( angle ) );
|
||||||
auto z = ( sinf( angle ) );
|
auto z = ( sinf( angle ) );
|
||||||
|
|
||||||
bNpc->face( pos );
|
|
||||||
bNpc->setPos( pos.x + ( x * factor * delta ),
|
bNpc->setPos( pos.x + ( x * factor * delta ),
|
||||||
pos.y,
|
pos.y,
|
||||||
pos.z + ( z * factor * delta ) );
|
pos.z + ( z * factor * delta ) );
|
||||||
|
|
|
@ -98,7 +98,7 @@ namespace Sapphire::Entity
|
||||||
|
|
||||||
void checkAggro();
|
void checkAggro();
|
||||||
|
|
||||||
void pushNearbyBNpcs( const Common::FFXIVARR_POSITION3& pos );
|
void pushNearbyBNpcs();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32_t m_bNpcBaseId;
|
uint32_t m_bNpcBaseId;
|
||||||
|
|
Loading…
Add table
Reference in a new issue