Fixed a crash when fluid would try to go below the world (y = -1)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@442 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
091d958b0c
commit
64f8549604
@ -350,10 +350,12 @@ void cFluidSimulator::Simulate( float a_Dt )
|
|||||||
cPickup* Pickup = new cPickup( pos.x * 32 + 16, (pos.y-1) * 32 + 16, pos.z * 32 + 16, cItem( (ENUM_ITEM_ID)DownID, 1, m_World->GetBlockMeta( pos.x, pos.y-1, pos.z ) ) );
|
cPickup* Pickup = new cPickup( pos.x * 32 + 16, (pos.y-1) * 32 + 16, pos.z * 32 + 16, cItem( (ENUM_ITEM_ID)DownID, 1, m_World->GetBlockMeta( pos.x, pos.y-1, pos.z ) ) );
|
||||||
Pickup->Initialize( m_World );
|
Pickup->Initialize( m_World );
|
||||||
}
|
}
|
||||||
|
if( pos.y > 0 )
|
||||||
m_World->FastSetBlock( pos.x, pos.y-1, pos.z, m_FluidBlock, 8 ); // falling
|
{
|
||||||
AddBlock( pos.x, pos.y-1, pos.z );
|
m_World->FastSetBlock( pos.x, pos.y-1, pos.z, m_FluidBlock, 8 ); // falling
|
||||||
ApplyUniqueToNearest(pos - Vector3i(0, 1, 0));
|
AddBlock( pos.x, pos.y-1, pos.z );
|
||||||
|
ApplyUniqueToNearest(pos - Vector3i(0, 1, 0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(IsSolidBlock(DownID)||( BlockID == m_StationaryFluidBlock)) // Not falling
|
if(IsSolidBlock(DownID)||( BlockID == m_StationaryFluidBlock)) // Not falling
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user