Index: Chunk.cpp
===================================================================
--- Chunk.cpp	(revision 1592)
+++ Chunk.cpp	(working copy)
@@ -2478,6 +2478,18 @@
 
 
 
+void cChunk::BroadcastExperienceOrb(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, short a_Amount)
+{
+	for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr )
+	{
+		(*itr)->SendExperienceOrb(a_Entity, a_RelX, a_RelY, a_RelZ, a_Amount);
+	}  // for itr - LoadedByClient[]
+}
+
+
+
+
+
 void cChunk::BroadcastEntVelocity(const cEntity & a_Entity, const cClientHandle * a_Exclude)
 {
 	for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr )
Index: Chunk.h
===================================================================
--- Chunk.h	(revision 1592)
+++ Chunk.h	(working copy)
@@ -235,6 +235,7 @@
 	void BroadcastAttachEntity       (const cEntity & a_Entity, const cEntity * a_Vehicle);
 	void BroadcastPlayerAnimation    (const cPlayer & a_Player, char a_Animation, const cClientHandle * a_Exclude = NULL);
 	void BroadcastEntityEquipment    (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item, const cClientHandle * a_Exclude = NULL);
+	void BroadcastExperienceOrb      (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, short a_Amount);
 	void BroadcastEntVelocity        (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
 	void BroadcastEntRelMoveLook     (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude = NULL);
 	void BroadcastEntRelMove         (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude = NULL);
Index: ChunkMap.cpp
===================================================================
--- ChunkMap.cpp	(revision 1592)
+++ ChunkMap.cpp	(working copy)
@@ -385,7 +385,8 @@
 
 
 
-void cChunkMap::BroadcastEntRelMoveLook(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude)
+
+void cChunkMap::BroadcastExperienceOrb(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, short a_Amount)
 {
 	cCSLock Lock(m_CSLayers);
 	cChunkPtr Chunk = GetChunkNoGen(a_Entity.GetChunkX(), ZERO_CHUNK_Y, a_Entity.GetChunkZ());
@@ -394,7 +395,7 @@
 		return;
 	}
 	// It's perfectly legal to broadcast packets even to invalid chunks!
-	Chunk->BroadcastEntRelMoveLook(a_Entity, a_RelX, a_RelY, a_RelZ, a_Exclude);
+	Chunk->BroadcastExperienceOrb(a_Entity, a_RelX, a_RelY, a_RelZ, a_Amount);
 }
 
 
Index: ChunkMap.h
===================================================================
--- ChunkMap.h	(revision 1592)
+++ ChunkMap.h	(working copy)
@@ -58,6 +58,9 @@
 	void BroadcastEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item, const cClientHandle * a_Exclude = NULL);
 	
 	/// Broadcasts a EntVelocity packet to all clients in the chunk where a_Entity is. Velocity is measured in blocks/second
+	void BroadcastExperienceOrb(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, short a_Amount);
+
+	/// Broadcasts a EntVelocity packet to all clients in the chunk where a_Entity is. Velocity is measured in blocks/second
 	void BroadcastEntVelocity(const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
 
 	/// Broadcasts a RelEntMoveLook packet to all clients in the chunk where a_Entity is
Index: ClientHandle.cpp
===================================================================
--- ClientHandle.cpp	(revision 1592)
+++ ClientHandle.cpp	(working copy)
@@ -1473,6 +1473,15 @@
 
 
 
+void cClientHandle::SendExperienceOrb(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount)
+{	
+	m_Protocol->SendExperienceOrb(a_Entity, a_BlockX, a_BlockY, a_BlockZ, a_Amount);
+}
+
+
+
+
+
 void cClientHandle::SendEntHeadLook(const cEntity & a_Entity)
 {
 	ASSERT(a_Entity.GetUniqueID() != m_Player->GetUniqueID());  // Must not send for self
Index: ClientHandle.h
===================================================================
--- ClientHandle.h	(revision 1592)
+++ ClientHandle.h	(working copy)
@@ -93,6 +93,7 @@
 	void SendDisconnect         (const AString & a_Reason);
 	void SendEntHeadLook        (const cEntity & a_Entity);
 	void SendEntLook            (const cEntity & a_Entity);
+	void SendExperienceOrb      (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount);
 	void SendEntVelocity        (const cEntity & a_Entity);
 	void SendEntRelMove         (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ);
 	void SendEntRelMoveLook     (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ);
Index: Player.cpp
===================================================================
--- Player.cpp	(revision 1592)
+++ Player.cpp	(working copy)
@@ -901,8 +901,9 @@
 		/* Add player to all the necessary parts of the new world */
 		SetWorld( World );
 		GetWorld()->AddPlayer(this);
-		GetClientHandle()->StreamChunks();
 
+		m_ClientHandle->HandleRespawn();
+		m_ClientHandle->StreamChunks();
 		return true;
 	}
 
@@ -913,6 +914,17 @@
 
 
 
+void cPlayer::SetOnFire( float a_FireDamageInterval, float a_BurnPeriod)
+{
+	SetMetaData(BURNING);
+	m_BurnPeriod = a_BurnPeriod;
+	m_FireDamageInterval = a_FireDamageInterval;
+}
+
+
+
+
+
 void cPlayer::LoadPermissionsFromDisk()
 {
 	m_Groups.clear();
Index: Player.h
===================================================================
--- Player.h	(revision 1592)
+++ Player.h	(working copy)
@@ -103,6 +103,7 @@
 
 	void SendMessage(const AString & a_Message);
 
+	void SetOnFire( float a_FireDamageInterval, float a_BurnPeriod); // tolua_export
 	const AString & GetName(void) const { return m_PlayerName; }
 	void SetName(const AString & a_Name) { m_PlayerName = a_Name; }
 	
@@ -228,7 +229,6 @@
 	
 	bool m_IsCrouched;
 
-
 	virtual void Destroyed(void);
 
 	/// Filters out damage for creative mode
Index: Protocol/Protocol.h
===================================================================
--- Protocol/Protocol.h	(revision 1592)
+++ Protocol/Protocol.h	(working copy)
@@ -67,6 +67,7 @@
 	virtual void SendEntRelMoveLook     (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) = 0;
 	virtual void SendEntityEquipment    (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item) = 0;
 	virtual void SendEntityStatus       (const cEntity & a_Entity, char a_Status) = 0;
+	virtual void SendExperienceOrb      (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount) = 0;
 	virtual void SendExplosion          (double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, cVector3iArray a_BlocksAffected, const Vector3d & a_PlayerMotion) = 0;
 	virtual void SendGameMode           (eGameMode a_GameMode) = 0;
 	virtual void SendHealth             (void) = 0;
Index: Protocol/Protocol125.cpp
===================================================================
--- Protocol/Protocol125.cpp	(revision 1592)
+++ Protocol/Protocol125.cpp	(working copy)
@@ -55,6 +55,7 @@
 	PACKET_COLLECT_PICKUP            = 0x16,
 	PACKET_SPAWN_OBJECT              = 0x17,
 	PACKET_SPAWN_MOB                 = 0x18,
+	PACKET_SPAWN_EXPERIENCE_ORB      = 0x1a,
 	PACKET_ENTITY_VELOCITY           = 0x1c,
 	PACKET_DESTROY_ENTITY            = 0x1d,
 	PACKET_ENTITY                    = 0x1e,
@@ -277,6 +278,22 @@
 
 
 
+
+void cProtocol125::SendExperienceOrb(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount)
+{
+	cCSLock Lock(m_CSPacket);
+	WriteByte(PACKET_SPAWN_EXPERIENCE_ORB);
+	WriteInt(a_Entity.GetUniqueID());
+	WriteInt(a_BlockX);
+	WriteInt(a_BlockY);
+	WriteInt(a_BlockZ);
+	WriteInt(a_Amount);
+	Flush();
+}
+
+
+
+
 void cProtocol125::SendEntVelocity(const cEntity & a_Entity)
 {
 	ASSERT(a_Entity.GetUniqueID() != m_Client->GetPlayer()->GetUniqueID());  // Must not send for self
Index: Protocol/Protocol125.h
===================================================================
--- Protocol/Protocol125.h	(revision 1592)
+++ Protocol/Protocol125.h	(working copy)
@@ -39,6 +39,7 @@
 	virtual void SendDisconnect         (const AString & a_Reason) override;
 	virtual void SendEntHeadLook        (const cEntity & a_Entity) override;
 	virtual void SendEntLook            (const cEntity & a_Entity) override;
+	virtual void SendExperienceOrb      (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount);
 	virtual void SendEntVelocity        (const cEntity & a_Entity) override;
 	virtual void SendEntRelMove         (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
 	virtual void SendEntRelMoveLook     (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
Index: Protocol/ProtocolRecognizer.cpp
===================================================================
--- Protocol/ProtocolRecognizer.cpp	(revision 1592)
+++ Protocol/ProtocolRecognizer.cpp	(working copy)
@@ -198,6 +198,15 @@
 
 
 
+void cProtocolRecognizer::SendExperienceOrb(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount)
+{
+	ASSERT(m_Protocol != NULL);
+	m_Protocol->SendExperienceOrb(a_Entity, a_BlockX, a_BlockY, a_BlockZ, a_Amount);
+}
+
+
+
+
 void cProtocolRecognizer::SendEntVelocity(const cEntity & a_Entity)
 {
 	ASSERT(m_Protocol != NULL);
Index: Protocol/ProtocolRecognizer.h
===================================================================
--- Protocol/ProtocolRecognizer.h	(revision 1592)
+++ Protocol/ProtocolRecognizer.h	(working copy)
@@ -67,6 +67,7 @@
 	virtual void SendDisconnect         (const AString & a_Reason) override;
 	virtual void SendEntHeadLook        (const cEntity & a_Entity) override;
 	virtual void SendEntLook            (const cEntity & a_Entity) override;
+	virtual void SendExperienceOrb      (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount);
 	virtual void SendEntVelocity        (const cEntity & a_Entity) override;
 	virtual void SendEntRelMove         (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
 	virtual void SendEntRelMoveLook     (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ) override;
Index: World.cpp
===================================================================
--- World.cpp	(revision 1592)
+++ World.cpp	(working copy)
@@ -1450,9 +1450,10 @@
 
 
 
-void cWorld::BroadcastEntRelMove(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude)
+
+void cWorld::BroadcastExperienceOrb(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount)
 {
-	m_ChunkMap->BroadcastEntRelMove(a_Entity, a_RelX, a_RelY, a_RelZ, a_Exclude);
+	m_ChunkMap->BroadcastExperienceOrb(a_Entity, a_BlockX, a_BlockY, a_BlockZ, a_Amount);
 }
 
 
Index: World.h
===================================================================
--- World.h	(revision 1592)
+++ World.h	(working copy)
@@ -131,6 +131,7 @@
 	void BroadcastChat               (const AString & a_Message, const cClientHandle * a_Exclude = NULL);
 	void BroadcastPlayerAnimation    (const cPlayer & a_Player, char a_Animation, const cClientHandle * a_Exclude = NULL);
 	void BroadcastEntityEquipment    (const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item, const cClientHandle * a_Exclude = NULL);
+	void BroadcastExperienceOrb      (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ, short a_Amount);
 	void BroadcastEntVelocity        (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
 	void BroadcastTeleportEntity     (const cEntity & a_Entity, const cClientHandle * a_Exclude = NULL);
 	void BroadcastEntRelMoveLook     (const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude = NULL);
