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:
parent
814d9e995c
commit
406b69b88d
4 changed files with 16 additions and 18 deletions
|
@ -195,7 +195,7 @@ namespace Common {
|
|||
Walking = 0x02,
|
||||
Strafing = 0x04,
|
||||
Jumping = 0x10,
|
||||
BackWalk = Walking | Strafing,
|
||||
BackWalk = 0x06,
|
||||
};
|
||||
|
||||
enum MoveState : uint8_t
|
||||
|
|
|
@ -68,8 +68,7 @@ Core::Entity::Player::Player() :
|
|||
m_markedForRemoval( false ),
|
||||
m_mount( 0 ),
|
||||
m_directorInitialized( false ),
|
||||
m_onEnterEventDone( false ),
|
||||
m_bJumping( false )
|
||||
m_onEnterEventDone( false )
|
||||
{
|
||||
m_id = 0;
|
||||
m_currentStance = Stance::Passive;
|
||||
|
|
|
@ -595,13 +595,10 @@ public:
|
|||
/*! checks if a spawn index is valid */
|
||||
bool isObjSpawnIndexValid( uint8_t index );
|
||||
|
||||
|
||||
uint64_t m_lastMoveTime;
|
||||
|
||||
uint8_t m_lastMoveflag;
|
||||
|
||||
bool m_bJumping;
|
||||
|
||||
private:
|
||||
uint32_t m_lastWrite;
|
||||
uint32_t m_lastPing;
|
||||
|
|
|
@ -191,13 +191,21 @@ void Core::Network::GameConnection::updatePositionHandler( const Core::Network::
|
|||
//pLog->debug( std::to_string( moveState ) + " -- moveState " );
|
||||
//pLog->debug( std::to_string( moveType ) + " -- moveType " );
|
||||
|
||||
if( moveType & MoveType::Running )
|
||||
{
|
||||
unk1 = 0x7F;
|
||||
unk2 = 0x00;
|
||||
unk4 = 0x3C;
|
||||
}
|
||||
|
||||
if( moveType & MoveType::Strafing )
|
||||
{
|
||||
unk2 = 0x40;
|
||||
if( IPC_OP_019A.strafeRight == 1 )
|
||||
unk1 = 0xbf;
|
||||
else
|
||||
unk1 = 0x5f;
|
||||
unk1 = 0x7F;
|
||||
//if( IPC_OP_019A.strafeRight == 1 )
|
||||
// unk1 = 0xbf;
|
||||
//else
|
||||
// unk1 = 0x5f;
|
||||
unk4 = 0x3C;
|
||||
}
|
||||
|
||||
|
@ -206,22 +214,16 @@ void Core::Network::GameConnection::updatePositionHandler( const Core::Network::
|
|||
unk1 = 0x7F;
|
||||
unk2 = 0x02;
|
||||
unk3 = 0x00;
|
||||
unk4 = 0x0518;
|
||||
unk4 = 0x18;
|
||||
}
|
||||
|
||||
if( moveType & MoveType::BackWalk )
|
||||
if( moveType & MoveType::Walking && moveType & MoveType::Strafing )
|
||||
{
|
||||
unk2 = 0x06;
|
||||
unk1 = 0xFF;
|
||||
unk4 = 0x18;
|
||||
}
|
||||
|
||||
if( moveType & MoveType::Running )
|
||||
{
|
||||
unk1 = 0x7F;
|
||||
unk4 = 0x3C;
|
||||
}
|
||||
|
||||
if( moveType & MoveType::Jumping )
|
||||
{
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue