1
0

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.
This commit is contained in:
DaPorkchop_
2019-04-18 15:54:55 +02:00
committed by peterbell10
parent 7d512f2191
commit 10b60971f5
2 changed files with 4 additions and 4 deletions

View File

@@ -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