Portals animate and delay correctly
This commit is contained in:
@@ -833,23 +833,23 @@ void cProtocol125::SendRemoveEntityEffect(const cEntity & a_Entity, int a_Effect
|
||||
|
||||
|
||||
|
||||
void cProtocol125::SendRespawn(const cWorld & a_World)
|
||||
void cProtocol125::SendRespawn(eDimension a_Dimension)
|
||||
{
|
||||
cCSLock Lock(m_CSPacket);
|
||||
if (m_LastSentDimension == a_World.GetDimension())
|
||||
if (m_LastSentDimension == a_Dimension)
|
||||
{
|
||||
// Must not send a respawn for the world with the same dimension, the client goes cuckoo if we do
|
||||
return;
|
||||
}
|
||||
cPlayer * Player = m_Client->GetPlayer();
|
||||
WriteByte (PACKET_RESPAWN);
|
||||
WriteInt ((int)(a_World.GetDimension()));
|
||||
WriteInt ((int)(a_Dimension));
|
||||
WriteByte (2); // TODO: Difficulty; 2 = Normal
|
||||
WriteChar ((char)Player->GetGameMode());
|
||||
WriteShort (256); // Current world height
|
||||
WriteString("default");
|
||||
Flush();
|
||||
m_LastSentDimension = a_World.GetDimension();
|
||||
m_LastSentDimension = a_Dimension;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user