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

don't send position updates when pushing bnpcs

This commit is contained in:
NotAdam 2019-02-01 00:04:19 +11:00
parent 8c9c98e896
commit c349142929
3 changed files with 11 additions and 7 deletions

View file

@ -57,18 +57,22 @@ Sapphire::Common::FFXIVARR_POSITION3& Sapphire::Entity::Actor::getPos()
return m_pos;
}
void Sapphire::Entity::Actor::setPos( float x, float y, float z )
void Sapphire::Entity::Actor::setPos( float x, float y, float z, bool broadcastUpdate )
{
m_pos.x = x;
m_pos.y = y;
m_pos.z = z;
m_pCurrentZone->updateActorPosition( *this );
if( broadcastUpdate )
m_pCurrentZone->updateActorPosition( *this );
}
void Sapphire::Entity::Actor::setPos( const Sapphire::Common::FFXIVARR_POSITION3& pos )
void Sapphire::Entity::Actor::setPos( const Sapphire::Common::FFXIVARR_POSITION3& pos, bool broadcastUpdate )
{
m_pos = pos;
m_pCurrentZone->updateActorPosition( *this );
if( broadcastUpdate )
m_pCurrentZone->updateActorPosition( *this );
}
float Sapphire::Entity::Actor::getRot() const

View file

@ -59,9 +59,9 @@ namespace Sapphire::Entity
Common::FFXIVARR_POSITION3& getPos();
void setPos( const Common::FFXIVARR_POSITION3& pos );
void setPos( const Common::FFXIVARR_POSITION3& pos, bool broadcastUpdate = true );
void setPos( float x, float y, float z );
void setPos( float x, float y, float z, bool broadcastUpdate = true );
float getRot() const;

View file

@ -653,7 +653,7 @@ void Sapphire::Entity::BNpc::pushNearbyBNpcs()
bNpc->setPos( pos.x + ( x * factor * delta ),
pos.y,
pos.z + ( z * factor * delta ) );
pos.z + ( z * factor * delta ), false );
// setPos( m_pos.x + ( xBase * -pushDistance ),
// m_pos.y,