1
0

cPlayer empty-handed spawn fix

git-svn-id: http://mc-server.googlecode.com/svn/trunk@275 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-02-16 15:51:40 +00:00
parent bb396c8cc0
commit cd2bb55176

View File

@ -148,7 +148,8 @@ cPacket * cPlayer::GetSpawnPacket(void) const
SpawnPacket->m_PosZ = (int)(m_Pos.z * 32);
SpawnPacket->m_Rotation = (char)((m_Rot.x / 360.f) * 256);
SpawnPacket->m_Pitch = (char)((m_Rot.y / 360.f) * 256);
SpawnPacket->m_CurrentItem = (short)m_Inventory->GetEquippedItem().m_ItemID;
short ItemID = (short)m_Inventory->GetEquippedItem().m_ItemID;
SpawnPacket->m_CurrentItem = (ItemID > 0) ? ItemID : 0; // Unlike -1 in inventory, the named entity packet uses 0 for "none"
return SpawnPacket;
}