diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-01 20:05:41 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-01 20:05:41 +0200 |
commit | 1406d80b2b8410b1d31d75d07430433915440a42 (patch) | |
tree | d0b54c1d27ae60376808eb84864207cfec1acf36 /source/Pawn.cpp | |
parent | ListenThread: Fixed socket-querying, might have crashed some linux versions. (diff) | |
download | cuberite-1406d80b2b8410b1d31d75d07430433915440a42.tar cuberite-1406d80b2b8410b1d31d75d07430433915440a42.tar.gz cuberite-1406d80b2b8410b1d31d75d07430433915440a42.tar.bz2 cuberite-1406d80b2b8410b1d31d75d07430433915440a42.tar.lz cuberite-1406d80b2b8410b1d31d75d07430433915440a42.tar.xz cuberite-1406d80b2b8410b1d31d75d07430433915440a42.tar.zst cuberite-1406d80b2b8410b1d31d75d07430433915440a42.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Pawn.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/Pawn.cpp b/source/Pawn.cpp index c1b8d6683..960f95de3 100644 --- a/source/Pawn.cpp +++ b/source/Pawn.cpp @@ -315,8 +315,14 @@ void cPawn::SetMetaData(MetaData a_MetaData) //----Change Entity MetaData -void cPawn::CheckMetaDataBurn() +void cPawn::CheckMetaDataBurn(void) { + if ((GetPosY() < 1) || (GetPosY() >= 254)) + { + // Y coord out of range + return; + } + BLOCKTYPE Block = GetWorld()->GetBlock((int) GetPosX(), (int) GetPosY(), (int) GetPosZ()); BLOCKTYPE BlockAbove = GetWorld()->GetBlock((int) GetPosX(), (int) GetPosY() + 1, (int) GetPosZ()); BLOCKTYPE BlockBelow = GetWorld()->GetBlock((int) GetPosX(), (int) GetPosY() - 1, (int) GetPosZ()); |