1
0

Added m_IsFlying and m_CanFly. Both have a Get and Set function. Added cClientHandle::SendPlayerAbilities() function

This commit is contained in:
STRWarrior
2013-12-15 14:48:17 +01:00
parent 4f92f18a8d
commit b10d0b95cb
5 changed files with 90 additions and 3 deletions

View File

@@ -490,6 +490,30 @@ void cClientHandle::HandleCreativeInventory(short a_SlotNum, const cItem & a_Hel
void cClientHandle::HandlePlayerAbilities(int Flags, float FlyingSpeed, float WalkingSpeed)
{
if ((Flags & 2) != 0)
{
m_Player->SetFlying(true);
}
else
{
m_Player->SetFlying(false);
}
if ((Flags & 4) != 0)
{
m_Player->SetCanFly(true);
}
else
{
m_Player->SetCanFly(false);
}
}
void cClientHandle::HandlePlayerPos(double a_PosX, double a_PosY, double a_PosZ, double a_Stance, bool a_IsOnGround)
{
if ((m_Player == NULL) || (m_State != csPlaying))
@@ -1831,6 +1855,15 @@ void cClientHandle::SendEntityAnimation(const cEntity & a_Entity, char a_Animati
void cClientHandle::SendPlayerAbilities()
{
m_Protocol->SendPlayerAbilities();
}
void cClientHandle::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline)
{
m_Protocol->SendPlayerListItem(a_Player, a_IsOnline);