1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 14:37:44 +00:00

Temprarly disabling pushing of other bnpcs

This commit is contained in:
Mordred 2019-01-31 23:08:43 +01:00
parent 26f923d5f8
commit 858ae86075

View file

@ -99,7 +99,8 @@ Sapphire::Entity::BNpc::BNpc( uint32_t id, BNpcTemplatePtr pTemplate, float posX
m_scale = bNpcBaseData->scale; m_scale = bNpcBaseData->scale;
// todo: is this actually good? // todo: is this actually good?
m_naviTargetReachedDistance = m_scale * 2.f; //m_naviTargetReachedDistance = m_scale * 2.f;
m_naviTargetReachedDistance = 4.f;
} }
Sapphire::Entity::BNpc::~BNpc() = default; Sapphire::Entity::BNpc::~BNpc() = default;
@ -222,7 +223,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(); //pushNearbyBNpcs();
if( Util::distance( getPos(), pos ) <= m_naviTargetReachedDistance ) if( Util::distance( getPos(), pos ) <= m_naviTargetReachedDistance )
{ {
@ -636,6 +637,7 @@ void Sapphire::Entity::BNpc::pushNearbyBNpcs()
auto pos = bNpc->getPos(); auto pos = bNpc->getPos();
auto distance = Util::distance( m_pos, bNpc->getPos() ); auto distance = Util::distance( m_pos, bNpc->getPos() );
// todo: not sure what's good here // todo: not sure what's good here
auto factor = bNpc->getNaviTargetReachedDistance(); auto factor = bNpc->getNaviTargetReachedDistance();
@ -653,7 +655,7 @@ void Sapphire::Entity::BNpc::pushNearbyBNpcs()
bNpc->setPos( pos.x + ( x * factor * delta ), bNpc->setPos( pos.x + ( x * factor * delta ),
pos.y, pos.y,
pos.z + ( z * factor * delta ), false ); pos.z + ( z * factor * delta ), true );
// setPos( m_pos.x + ( xBase * -pushDistance ), // setPos( m_pos.x + ( xBase * -pushDistance ),
// m_pos.y, // m_pos.y,