30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
diff --git a/botcraft/src/Game/Entities/entities/player/PlayerEntity.cpp b/botcraft/src/Game/Entities/entities/player/PlayerEntity.cpp
|
|
index c62026d6..f7f4760a 100644
|
|
--- a/botcraft/src/Game/Entities/entities/player/PlayerEntity.cpp
|
|
+++ b/botcraft/src/Game/Entities/entities/player/PlayerEntity.cpp
|
|
@@ -376,16 +376,21 @@ namespace Botcraft
|
|
double PlayerEntity::GetEyeHeightImpl() const
|
|
{
|
|
#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
|
|
+#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
|
|
+ const double scale = attributes.at(EntityAttribute::Type::Scale).GetValue();
|
|
+#else
|
|
+ constexpr double scale = 1.0;
|
|
+#endif
|
|
switch (GetDataPoseImpl())
|
|
{
|
|
case Pose::Swimming:
|
|
case Pose::FallFlying:
|
|
case Pose::SpinAttack:
|
|
- return 0.4;
|
|
+ return 0.4 * scale;
|
|
case Pose::Crouching:
|
|
- return 1.27;
|
|
+ return 1.27 * scale;
|
|
default:
|
|
- return 1.62;
|
|
+ return 1.62 * scale;
|
|
}
|
|
#else
|
|
return 1.62;
|