From 10b60971f520e5fa1f07626040f0013757091b44 Mon Sep 17 00:00:00 2001 From: DaPorkchop_ Date: Thu, 18 Apr 2019 15:54:55 +0200 Subject: Make Nether portals spawn the player inside of them (#4325) Currently the player is spawned immediately in front of them. Simply changing `cNetherPortalScanner::OutOffset` to 0.5 wasn't enough, as the player would always be spawned on top of the portal, however checking for non-solid blocks instead of air fixes this. --- src/Entities/Player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 044b802b7..07962fec8 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -386,8 +386,8 @@ void cPlayer::TickFreezeCode() { // If we find a position with enough space for the player if ( - (Chunk->GetBlock(Rel.x, NewY, Rel.z) == E_BLOCK_AIR) && - (Chunk->GetBlock(Rel.x, NewY + 1, Rel.z) == E_BLOCK_AIR) + !cBlockInfo::IsSolid(Chunk->GetBlock(Rel.x, NewY, Rel.z)) && + !cBlockInfo::IsSolid(Chunk->GetBlock(Rel.x, NewY + 1, Rel.z)) ) { // If the found position is not the same as the original -- cgit v1.2.3