1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-01 08:27:46 +00:00

Walking displays correctly

This commit is contained in:
Mordred 2018-07-08 00:43:03 +02:00
parent 814d9e995c
commit 406b69b88d
4 changed files with 16 additions and 18 deletions

View file

@ -195,7 +195,7 @@ namespace Common {
Walking = 0x02, Walking = 0x02,
Strafing = 0x04, Strafing = 0x04,
Jumping = 0x10, Jumping = 0x10,
BackWalk = Walking | Strafing, BackWalk = 0x06,
}; };
enum MoveState : uint8_t enum MoveState : uint8_t

View file

@ -68,8 +68,7 @@ Core::Entity::Player::Player() :
m_markedForRemoval( false ), m_markedForRemoval( false ),
m_mount( 0 ), m_mount( 0 ),
m_directorInitialized( false ), m_directorInitialized( false ),
m_onEnterEventDone( false ), m_onEnterEventDone( false )
m_bJumping( false )
{ {
m_id = 0; m_id = 0;
m_currentStance = Stance::Passive; m_currentStance = Stance::Passive;

View file

@ -595,13 +595,10 @@ public:
/*! checks if a spawn index is valid */ /*! checks if a spawn index is valid */
bool isObjSpawnIndexValid( uint8_t index ); bool isObjSpawnIndexValid( uint8_t index );
uint64_t m_lastMoveTime; uint64_t m_lastMoveTime;
uint8_t m_lastMoveflag; uint8_t m_lastMoveflag;
bool m_bJumping;
private: private:
uint32_t m_lastWrite; uint32_t m_lastWrite;
uint32_t m_lastPing; uint32_t m_lastPing;

View file

@ -191,13 +191,21 @@ void Core::Network::GameConnection::updatePositionHandler( const Core::Network::
//pLog->debug( std::to_string( moveState ) + " -- moveState " ); //pLog->debug( std::to_string( moveState ) + " -- moveState " );
//pLog->debug( std::to_string( moveType ) + " -- moveType " ); //pLog->debug( std::to_string( moveType ) + " -- moveType " );
if( moveType & MoveType::Running )
{
unk1 = 0x7F;
unk2 = 0x00;
unk4 = 0x3C;
}
if( moveType & MoveType::Strafing ) if( moveType & MoveType::Strafing )
{ {
unk2 = 0x40; unk2 = 0x40;
if( IPC_OP_019A.strafeRight == 1 ) unk1 = 0x7F;
unk1 = 0xbf; //if( IPC_OP_019A.strafeRight == 1 )
else // unk1 = 0xbf;
unk1 = 0x5f; //else
// unk1 = 0x5f;
unk4 = 0x3C; unk4 = 0x3C;
} }
@ -206,22 +214,16 @@ void Core::Network::GameConnection::updatePositionHandler( const Core::Network::
unk1 = 0x7F; unk1 = 0x7F;
unk2 = 0x02; unk2 = 0x02;
unk3 = 0x00; unk3 = 0x00;
unk4 = 0x0518; unk4 = 0x18;
} }
if( moveType & MoveType::BackWalk ) if( moveType & MoveType::Walking && moveType & MoveType::Strafing )
{ {
unk2 = 0x06; unk2 = 0x06;
unk1 = 0xFF; unk1 = 0xFF;
unk4 = 0x18; unk4 = 0x18;
} }
if( moveType & MoveType::Running )
{
unk1 = 0x7F;
unk4 = 0x3C;
}
if( moveType & MoveType::Jumping ) if( moveType & MoveType::Jumping )
{ {