summaryrefslogtreecommitdiffstats
path: root/source/cPickup.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;