1
0

Manual merge of #4498.

Credit to @MeMuXin

Closes #4498
This commit is contained in:
Alexander Harkness
2020-03-23 12:18:12 +00:00
parent 7d05e4402f
commit 0a68994f48
10 changed files with 50 additions and 11 deletions

View File

@@ -863,12 +863,17 @@ void cPlayer::SetFlyingMaxSpeed(double a_Speed)
void cPlayer::SetCrouch(bool a_IsCrouched)
{
// Set the crouch status, broadcast to all visible players
if (a_IsCrouched == m_IsCrouched)
{
// No change
return;
}
if (a_IsCrouched)
{
cRoot::Get()->GetPluginManager()->CallHookPlayerCrouched(*this);
}
m_IsCrouched = a_IsCrouched;
m_World->BroadcastEntityMetadata(*this);
}