diff options
author | hle0 <91701075+hle0@users.noreply.github.com> | 2024-11-08 00:05:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 00:05:47 +0100 |
commit | 33b9c5dc6dae42fb6fc33283ded888a8001e5394 (patch) | |
tree | 136bb3e02c25e49feb00a06857e4145a54b6c339 /src/Entities/Player.cpp | |
parent | Remove simple template-id from constructors for Vector3 template. (#5586) (diff) | |
download | cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.gz cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.bz2 cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.lz cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.xz cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.tar.zst cuberite-33b9c5dc6dae42fb6fc33283ded888a8001e5394.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index de99a299d..50fd034a5 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -2594,9 +2594,10 @@ bool cPlayer::IsInsideWater() BLOCKTYPE Block; NIBBLETYPE Meta; - m_World->GetBlockTypeMeta(EyePos, Block, Meta); - - if ((Block != E_BLOCK_WATER) && (Block != E_BLOCK_STATIONARY_WATER)) + if ( + !m_World->GetBlockTypeMeta(GetEyePosition().Floor(), Block, Meta) || + ((Block != E_BLOCK_WATER) && (Block != E_BLOCK_STATIONARY_WATER)) + ) { return false; } |