parent
3c631fc0f9
commit
b9d4431f6f
@ -2397,9 +2397,9 @@ void cClientHandle::SendRemoveEntityEffect(const cEntity & a_Entity, int a_Effec
|
||||
|
||||
|
||||
|
||||
void cClientHandle::SendRespawn(const cWorld & a_World)
|
||||
void cClientHandle::SendRespawn(const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks)
|
||||
{
|
||||
m_Protocol->SendRespawn(a_World);
|
||||
m_Protocol->SendRespawn(a_World, a_ShouldIgnoreDimensionChecks);
|
||||
}
|
||||
|
||||
|
||||
|
@ -156,7 +156,7 @@ public:
|
||||
void SendPlayerSpawn (const cPlayer & a_Player);
|
||||
void SendPluginMessage (const AString & a_Channel, const AString & a_Message); // Exported in ManualBindings.cpp
|
||||
void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID);
|
||||
void SendRespawn (const cWorld & a_World);
|
||||
void SendRespawn (const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks = false);
|
||||
void SendExperience (void);
|
||||
void SendExperienceOrb (const cExpOrb & a_ExpOrb);
|
||||
void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode);
|
||||
|
@ -976,7 +976,7 @@ void cPlayer::Respawn(void)
|
||||
m_LifetimeTotalXp = 0;
|
||||
// ToDo: send score to client? How?
|
||||
|
||||
m_ClientHandle->SendRespawn(*m_World);
|
||||
m_ClientHandle->SendRespawn(*m_World, true);
|
||||
|
||||
// Extinguish the fire:
|
||||
StopBurning();
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) = 0;
|
||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) = 0;
|
||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) = 0;
|
||||
virtual void SendRespawn (const cWorld & a_World) = 0;
|
||||
virtual void SendRespawn (const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks = false) = 0;
|
||||
virtual void SendExperience (void) = 0;
|
||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) = 0;
|
||||
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) = 0;
|
||||
|
@ -833,12 +833,12 @@ void cProtocol125::SendRemoveEntityEffect(const cEntity & a_Entity, int a_Effect
|
||||
|
||||
|
||||
|
||||
void cProtocol125::SendRespawn(const cWorld & a_World)
|
||||
void cProtocol125::SendRespawn(const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks)
|
||||
{
|
||||
cCSLock Lock(m_CSPacket);
|
||||
if (m_LastSentDimension == a_World.GetDimension())
|
||||
if ((m_LastSentDimension == a_World.GetDimension()) && !a_ShouldIgnoreDimensionChecks)
|
||||
{
|
||||
// Must not send a respawn for the world with the same dimension, the client goes cuckoo if we do
|
||||
// Must not send a respawn for the world with the same dimension, the client goes cuckoo if we do (unless we are respawning from death)
|
||||
return;
|
||||
}
|
||||
cPlayer * Player = m_Client->GetPlayer();
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||
virtual void SendRespawn (const cWorld & a_World) override;
|
||||
virtual void SendRespawn (const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks = false) override;
|
||||
virtual void SendExperience (void) override;
|
||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
||||
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
||||
|
@ -158,10 +158,10 @@ void cProtocol161::SendPlayerMaxSpeed(void)
|
||||
|
||||
|
||||
|
||||
void cProtocol161::SendRespawn(const cWorld & a_World)
|
||||
void cProtocol161::SendRespawn(const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks)
|
||||
{
|
||||
// Besides sending the respawn, we need to also send the player max speed, otherwise the client reverts to super-fast
|
||||
super::SendRespawn(a_World);
|
||||
super::SendRespawn(a_World, a_ShouldIgnoreDimensionChecks);
|
||||
SendPlayerMaxSpeed();
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ protected:
|
||||
virtual void SendGameMode (eGameMode a_GameMode) override;
|
||||
virtual void SendHealth (void) override;
|
||||
virtual void SendPlayerMaxSpeed(void) override;
|
||||
virtual void SendRespawn (const cWorld & a_World) override;
|
||||
virtual void SendRespawn (const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks = false) override;
|
||||
virtual void SendWindowOpen (const cWindow & a_Window) override;
|
||||
|
||||
virtual int ParseEntityAction (void) override;
|
||||
|
@ -986,11 +986,11 @@ void cProtocol172::SendRemoveEntityEffect(const cEntity & a_Entity, int a_Effect
|
||||
|
||||
|
||||
|
||||
void cProtocol172::SendRespawn(const cWorld & a_World)
|
||||
void cProtocol172::SendRespawn(const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks)
|
||||
{
|
||||
if (m_LastSentDimension == a_World.GetDimension())
|
||||
if ((m_LastSentDimension == a_World.GetDimension()) && !a_ShouldIgnoreDimensionChecks)
|
||||
{
|
||||
// Must not send a respawn for the world with the same dimension, the client goes cuckoo if we do
|
||||
// Must not send a respawn for the world with the same dimension, the client goes cuckoo if we do (unless we are respawning from death)
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ public:
|
||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||
virtual void SendRespawn (const cWorld & a_World) override;
|
||||
virtual void SendRespawn (const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks = false) override;
|
||||
virtual void SendSoundEffect (const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) override; // a_Src coords are Block * 8
|
||||
virtual void SendExperience (void) override;
|
||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
||||
|
@ -556,10 +556,10 @@ void cProtocolRecognizer::SendRemoveEntityEffect(const cEntity & a_Entity, int a
|
||||
|
||||
|
||||
|
||||
void cProtocolRecognizer::SendRespawn(const cWorld & a_World)
|
||||
void cProtocolRecognizer::SendRespawn(const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks)
|
||||
{
|
||||
ASSERT(m_Protocol != NULL);
|
||||
m_Protocol->SendRespawn(a_World);
|
||||
m_Protocol->SendRespawn(a_World, a_ShouldIgnoreDimensionChecks);
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
|
||||
virtual void SendPluginMessage (const AString & a_Channel, const AString & a_Message) override;
|
||||
virtual void SendRemoveEntityEffect (const cEntity & a_Entity, int a_EffectID) override;
|
||||
virtual void SendRespawn (const cWorld & a_World) override;
|
||||
virtual void SendRespawn (const cWorld & a_World, bool a_ShouldIgnoreDimensionChecks = false) override;
|
||||
virtual void SendExperience (void) override;
|
||||
virtual void SendExperienceOrb (const cExpOrb & a_ExpOrb) override;
|
||||
virtual void SendScoreboardObjective (const AString & a_Name, const AString & a_DisplayName, Byte a_Mode) override;
|
||||
|
Loading…
Reference in New Issue
Block a user