summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 637cc3710..f673813af 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -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);
}