summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Pawn.cpp2
-rw-r--r--src/Entities/Player.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index 760c9c0e6..361450349 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -320,7 +320,7 @@ void cPawn::HandleFalling(void)
With this in mind, we first check the block at the player's feet, then the one below that (because fences),
and decide which behaviour we want to go with.
*/
- BLOCKTYPE BlockAtFoot = (cChunkDef::IsValidHeight(POSY_TOINT)) ? GetWorld()->GetBlock(POS_TOINT) : E_BLOCK_AIR;
+ BLOCKTYPE BlockAtFoot = (cChunkDef::IsValidHeight(POSY_TOINT)) ? GetWorld()->GetBlock(POS_TOINT) : static_cast<BLOCKTYPE>(E_BLOCK_AIR);
/* We initialize these with what the foot is really IN, because for sampling we will move down with the epsilon above */
bool IsFootInWater = IsBlockWater(BlockAtFoot);
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 3fd2aac48..c2c3b51ea 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2377,8 +2377,8 @@ bool cPlayer::DoesPlacingBlocksIntersectEntity(const std::initializer_list<sSetB
cBoundingBox BlockBox = cBlockHandler::For(blk.m_BlockType).GetPlacementCollisionBox(
m_World->GetBlock({ x - 1, y, z }),
m_World->GetBlock({ x + 1, y, z }),
- (y == 0) ? E_BLOCK_AIR : m_World->GetBlock({ x, y - 1, z }),
- (y == cChunkDef::Height - 1) ? E_BLOCK_AIR : m_World->GetBlock({ x, y + 1, z }),
+ (y == 0) ? static_cast<BLOCKTYPE>(E_BLOCK_AIR) : m_World->GetBlock({ x, y - 1, z }),
+ (y == cChunkDef::Height - 1) ? static_cast<BLOCKTYPE>(E_BLOCK_AIR) : m_World->GetBlock({ x, y + 1, z }),
m_World->GetBlock({ x, y, z - 1 }),
m_World->GetBlock({ x, y, z + 1 })
);