mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 16:17:46 +00:00
fixes
This commit is contained in:
parent
baedbf6e71
commit
8f012777a2
3 changed files with 10 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Add table
Reference in a new issue