1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-30 16:17:46 +00:00
This commit is contained in:
AriAvery 2019-02-06 09:27:30 +01:00
parent df56b88cae
commit 3f1ac7b5d8
3 changed files with 10 additions and 10 deletions

View file

@ -669,7 +669,7 @@ struct FFXIVIpcActorMove :
/* 0002 */ uint8_t animationType;
/* 0003 */ uint8_t animationState;
/* 0004 */ uint8_t animationSpeed;
/* 0005 */ uint8_t unkownRotation;
/* 0005 */ uint8_t unknownRotation;
/* 0006 */ uint16_t posX;
/* 0008 */ uint16_t posY;
/* 000a */ uint16_t posZ;

View file

@ -206,7 +206,7 @@ void Sapphire::Network::GameConnection::updatePositionHandler( FrameworkPtr pFw,
auto animationState = updatePositionPacket.data().animationState;
auto animationType = updatePositionPacket.data().animationType;
auto headRotation = updatePositionPacket.data().headPosition;
uint8_t unkownRotation = 0;
uint8_t unknownRotation = 0;
uint16_t animationSpeed = MoveSpeed::Walk;
animationType |= clientAnimationType;
@ -227,7 +227,7 @@ void Sapphire::Network::GameConnection::updatePositionHandler( FrameworkPtr pFw,
headRotation = 0x7F;
animationSpeed = MoveSpeed::Run;
}
if( animationType & MoveType::Jumping)
if( animationType & MoveType::Jumping )
{
if( animationState == MoveState::Fall )
player.m_falling = true;
@ -240,7 +240,7 @@ void Sapphire::Network::GameConnection::updatePositionHandler( FrameworkPtr pFw,
if( player.m_falling )
{
animationType += 0x10;
unkownRotation = 0x7F;
unknownRotation = 0x7F;
}
uint64_t currentTime = Util::getTimeMs();
@ -250,7 +250,7 @@ void Sapphire::Network::GameConnection::updatePositionHandler( FrameworkPtr pFw,
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 );
}
}

View file

@ -19,22 +19,22 @@ namespace Sapphire::Network::Packets::Server
public ZoneChannelPacket< FFXIVIpcActorMove >
{
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() )
{
initialize( actor, headRotation, animationType, state, animationSpeed, unkownRotation );
initialize( actor, headRotation, animationType, state, animationSpeed, unknownRotation );
};
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.headRotation = headRotation;
m_data.animationType = animationType;
m_data.animationState = state;
m_data.animationSpeed = animationSpeed;;
m_data.unkownRotation = unkownRotation;
m_data.animationSpeed = animationSpeed;
m_data.unknownRotation = unknownRotation;
m_data.posX = Util::floatToUInt16( actor.getPos().x );
m_data.posY = Util::floatToUInt16( actor.getPos().y );
m_data.posZ = Util::floatToUInt16( actor.getPos().z );