summaryrefslogtreecommitdiffstats
path: root/source/cPickup.cpp
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-29 03:44:21 +0100
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-29 03:44:21 +0100
commit2ca40c819ecb7b77879c62b2465345a5e6428bd5 (patch)
treea5be4ab8ed7ecac9b6b222c0dd330e8c0bb6c3db /source/cPickup.cpp
parent- water slacks fire now (diff)
downloadcuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.gz
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.bz2
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.lz
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.xz
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.zst
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.zip
Diffstat (limited to 'source/cPickup.cpp')
-rw-r--r--source/cPickup.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/cPickup.cpp b/source/cPickup.cpp
index 7b6e9e1d1..c665577f0 100644
--- a/source/cPickup.cpp
+++ b/source/cPickup.cpp
@@ -169,13 +169,17 @@ void cPickup::HandlePhysics(float a_Dt)
{
m_bOnGround = false;
}
- char block = World->GetBlock( BlockX, (int)m_Pos->y - (int)m_bOnGround, BlockZ );
- if( block == E_BLOCK_STATIONARY_LAVA || block == E_BLOCK_LAVA ) {
+ char Block = World->GetBlock( BlockX, (int)m_Pos->y - (int)m_bOnGround, BlockZ );
+ char BlockIn = World->GetBlock( BlockX, (int)m_Pos->y, BlockZ );
+
+ if( IsBlockLava(Block) || Block == E_BLOCK_FIRE
+ || IsBlockLava(BlockIn) || BlockIn == E_BLOCK_FIRE)
+ {
m_bCollected = true;
m_Timer = 0;
return;
}
- char BlockIn = World->GetBlock( BlockX, (int)m_Pos->y, BlockZ );
+
if( BlockIn != E_BLOCK_AIR && !IsBlockWater(BlockIn) ) // If in ground itself, push it out
{
m_bOnGround = true;