mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 16:17:46 +00:00
fixes
This commit is contained in:
parent
df56b88cae
commit
3f1ac7b5d8
3 changed files with 10 additions and 10 deletions
|
@ -669,7 +669,7 @@ struct FFXIVIpcActorMove :
|
||||||
/* 0002 */ uint8_t animationType;
|
/* 0002 */ uint8_t animationType;
|
||||||
/* 0003 */ uint8_t animationState;
|
/* 0003 */ uint8_t animationState;
|
||||||
/* 0004 */ uint8_t animationSpeed;
|
/* 0004 */ uint8_t animationSpeed;
|
||||||
/* 0005 */ uint8_t unkownRotation;
|
/* 0005 */ uint8_t unknownRotation;
|
||||||
/* 0006 */ uint16_t posX;
|
/* 0006 */ uint16_t posX;
|
||||||
/* 0008 */ uint16_t posY;
|
/* 0008 */ uint16_t posY;
|
||||||
/* 000a */ uint16_t posZ;
|
/* 000a */ uint16_t posZ;
|
||||||
|
|
|
@ -206,7 +206,7 @@ void Sapphire::Network::GameConnection::updatePositionHandler( FrameworkPtr pFw,
|
||||||
auto animationState = updatePositionPacket.data().animationState;
|
auto animationState = updatePositionPacket.data().animationState;
|
||||||
auto animationType = updatePositionPacket.data().animationType;
|
auto animationType = updatePositionPacket.data().animationType;
|
||||||
auto headRotation = updatePositionPacket.data().headPosition;
|
auto headRotation = updatePositionPacket.data().headPosition;
|
||||||
uint8_t unkownRotation = 0;
|
uint8_t unknownRotation = 0;
|
||||||
uint16_t animationSpeed = MoveSpeed::Walk;
|
uint16_t animationSpeed = MoveSpeed::Walk;
|
||||||
|
|
||||||
animationType |= clientAnimationType;
|
animationType |= clientAnimationType;
|
||||||
|
@ -227,7 +227,7 @@ void Sapphire::Network::GameConnection::updatePositionHandler( FrameworkPtr pFw,
|
||||||
headRotation = 0x7F;
|
headRotation = 0x7F;
|
||||||
animationSpeed = MoveSpeed::Run;
|
animationSpeed = MoveSpeed::Run;
|
||||||
}
|
}
|
||||||
if( animationType & MoveType::Jumping)
|
if( animationType & MoveType::Jumping )
|
||||||
{
|
{
|
||||||
if( animationState == MoveState::Fall )
|
if( animationState == MoveState::Fall )
|
||||||
player.m_falling = true;
|
player.m_falling = true;
|
||||||
|
@ -240,7 +240,7 @@ void Sapphire::Network::GameConnection::updatePositionHandler( FrameworkPtr pFw,
|
||||||
if( player.m_falling )
|
if( player.m_falling )
|
||||||
{
|
{
|
||||||
animationType += 0x10;
|
animationType += 0x10;
|
||||||
unkownRotation = 0x7F;
|
unknownRotation = 0x7F;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t currentTime = Util::getTimeMs();
|
uint64_t currentTime = Util::getTimeMs();
|
||||||
|
@ -250,7 +250,7 @@ void Sapphire::Network::GameConnection::updatePositionHandler( FrameworkPtr pFw,
|
||||||
|
|
||||||
if( shouldSend )
|
if( shouldSend )
|
||||||
{
|
{
|
||||||
auto movePacket = std::make_shared< MoveActorPacket >( player, headRotation, animationType, animationState, animationSpeed, unkownRotation );
|
auto movePacket = std::make_shared< MoveActorPacket >( player, headRotation, animationType, animationState, animationSpeed, unknownRotation );
|
||||||
player.sendToInRangeSet( movePacket );
|
player.sendToInRangeSet( movePacket );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,22 +19,22 @@ namespace Sapphire::Network::Packets::Server
|
||||||
public ZoneChannelPacket< FFXIVIpcActorMove >
|
public ZoneChannelPacket< FFXIVIpcActorMove >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MoveActorPacket( Entity::Chara& actor, uint8_t headRotation, uint8_t animationType, uint8_t state, uint16_t animationSpeed, uint8_t unkownRotation = 0 ) :
|
MoveActorPacket( Entity::Chara& actor, uint8_t headRotation, uint8_t animationType, uint8_t state, uint16_t animationSpeed, uint8_t unknownRotation = 0 ) :
|
||||||
ZoneChannelPacket< FFXIVIpcActorMove >( actor.getId(), actor.getId() )
|
ZoneChannelPacket< FFXIVIpcActorMove >( actor.getId(), actor.getId() )
|
||||||
{
|
{
|
||||||
initialize( actor, headRotation, animationType, state, animationSpeed, unkownRotation );
|
initialize( actor, headRotation, animationType, state, animationSpeed, unknownRotation );
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initialize( Entity::Chara& actor, uint8_t headRotation, uint8_t animationType, uint8_t state, uint16_t animationSpeed, uint8_t unkownRotation )
|
void initialize( Entity::Chara& actor, uint8_t headRotation, uint8_t animationType, uint8_t state, uint16_t animationSpeed, uint8_t unknownRotation )
|
||||||
{
|
{
|
||||||
|
|
||||||
m_data.rotation = Util::floatToUInt8Rot( actor.getRot() );
|
m_data.rotation = Util::floatToUInt8Rot( actor.getRot() );
|
||||||
m_data.headRotation = headRotation;
|
m_data.headRotation = headRotation;
|
||||||
m_data.animationType = animationType;
|
m_data.animationType = animationType;
|
||||||
m_data.animationState = state;
|
m_data.animationState = state;
|
||||||
m_data.animationSpeed = animationSpeed;;
|
m_data.animationSpeed = animationSpeed;
|
||||||
m_data.unkownRotation = unkownRotation;
|
m_data.unknownRotation = unknownRotation;
|
||||||
m_data.posX = Util::floatToUInt16( actor.getPos().x );
|
m_data.posX = Util::floatToUInt16( actor.getPos().x );
|
||||||
m_data.posY = Util::floatToUInt16( actor.getPos().y );
|
m_data.posY = Util::floatToUInt16( actor.getPos().y );
|
||||||
m_data.posZ = Util::floatToUInt16( actor.getPos().z );
|
m_data.posZ = Util::floatToUInt16( actor.getPos().z );
|
||||||
|
|
Loading…
Add table
Reference in a new issue