mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 14:07:46 +00:00
Maybe better scales?
This commit is contained in:
parent
88f996e183
commit
d934863673
3 changed files with 6 additions and 9 deletions
|
@ -278,7 +278,7 @@ bool Sapphire::Entity::BNpc::moveTo( const Entity::Chara& targetChara )
|
||||||
|
|
||||||
auto pos1 = pNaviProvider->getMovePos( *this );
|
auto pos1 = pNaviProvider->getMovePos( *this );
|
||||||
|
|
||||||
if( Util::distance( pos1, targetChara.getPos() ) <= ( getScale() + targetChara.getScale() ) )
|
if( Util::distance( pos1, targetChara.getPos() ) <= ( getScale() + targetChara.getScale() ) + 0.25f )
|
||||||
{
|
{
|
||||||
// Reached destination
|
// Reached destination
|
||||||
face( targetChara.getPos() );
|
face( targetChara.getPos() );
|
||||||
|
@ -534,9 +534,7 @@ void Sapphire::Entity::BNpc::update( uint64_t tickCount )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto distanceOrig = Util::distance( getPos().x, getPos().y, getPos().z,
|
auto distanceOrig = Util::distance( getPos().x, getPos().y, getPos().z,
|
||||||
m_spawnPos.x,
|
m_spawnPos.x, m_spawnPos.y, m_spawnPos.z );
|
||||||
m_spawnPos.y,
|
|
||||||
m_spawnPos.z );
|
|
||||||
|
|
||||||
if( pHatedActor && !pHatedActor->isAlive() )
|
if( pHatedActor && !pHatedActor->isAlive() )
|
||||||
{
|
{
|
||||||
|
@ -550,9 +548,7 @@ void Sapphire::Entity::BNpc::update( uint64_t tickCount )
|
||||||
if( pHatedActor )
|
if( pHatedActor )
|
||||||
{
|
{
|
||||||
auto distance = Util::distance( getPos().x, getPos().y, getPos().z,
|
auto distance = Util::distance( getPos().x, getPos().y, getPos().z,
|
||||||
pHatedActor->getPos().x,
|
pHatedActor->getPos().x, pHatedActor->getPos().y, pHatedActor->getPos().z );
|
||||||
pHatedActor->getPos().y,
|
|
||||||
pHatedActor->getPos().z );
|
|
||||||
|
|
||||||
if( !hasFlag( NoDeaggro ) && ( distanceOrig > maxDistanceToOrigin ) )
|
if( !hasFlag( NoDeaggro ) && ( distanceOrig > maxDistanceToOrigin ) )
|
||||||
{
|
{
|
||||||
|
@ -564,7 +560,7 @@ void Sapphire::Entity::BNpc::update( uint64_t tickCount )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( distance > ( getScale() / 2 + pHatedActor->getScale() / 2 ) )
|
if( distance > ( getScale() + pHatedActor->getScale() ) )
|
||||||
{
|
{
|
||||||
if( hasFlag( Immobile ) )
|
if( hasFlag( Immobile ) )
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -84,6 +84,7 @@ Sapphire::Entity::Player::Player( FrameworkPtr pFw ) :
|
||||||
m_queuedZoneing = nullptr;
|
m_queuedZoneing = nullptr;
|
||||||
m_status = ActorStatus::Idle;
|
m_status = ActorStatus::Idle;
|
||||||
m_invincibilityType = InvincibilityType::InvincibilityNone;
|
m_invincibilityType = InvincibilityType::InvincibilityNone;
|
||||||
|
m_scale = 1.f;
|
||||||
|
|
||||||
memset( m_questTracking, 0, sizeof( m_questTracking ) );
|
memset( m_questTracking, 0, sizeof( m_questTracking ) );
|
||||||
memset( m_name, 0, sizeof( m_name ) );
|
memset( m_name, 0, sizeof( m_name ) );
|
||||||
|
|
|
@ -573,7 +573,7 @@ int32_t Sapphire::World::Navi::NaviProvider::addAgent( Entity::Chara& chara )
|
||||||
params.height = 3.f;
|
params.height = 3.f;
|
||||||
params.maxAcceleration = 25.f;
|
params.maxAcceleration = 25.f;
|
||||||
params.maxSpeed = std::pow( 2, chara.getScale() * 0.35f ) + 1.f;
|
params.maxSpeed = std::pow( 2, chara.getScale() * 0.35f ) + 1.f;
|
||||||
params.radius = chara.getScale() / 2;
|
params.radius = ( chara.getScale() ) * 0.9f;
|
||||||
params.collisionQueryRange = params.radius * 12.0f;
|
params.collisionQueryRange = params.radius * 12.0f;
|
||||||
params.pathOptimizationRange = params.radius * 20.0f;
|
params.pathOptimizationRange = params.radius * 20.0f;
|
||||||
params.updateFlags = 0;
|
params.updateFlags = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue