2011-10-03 18:41:19 +00:00
|
|
|
#include "cWaterSimulator.h"
|
2011-12-24 01:36:15 +00:00
|
|
|
#include "Defines.h"
|
2011-10-03 18:41:19 +00:00
|
|
|
|
|
|
|
|
2011-12-25 16:20:06 +00:00
|
|
|
cWaterSimulator::cWaterSimulator(cWorld *a_World)
|
|
|
|
: cFluidSimulator(a_World)
|
2011-10-03 18:41:19 +00:00
|
|
|
{
|
2011-12-25 16:20:06 +00:00
|
|
|
m_FluidBlock = E_BLOCK_WATER;
|
|
|
|
m_MaxHeight = 7;
|
|
|
|
m_FlowReduction = 1;
|
2011-10-03 18:41:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-12-25 16:20:06 +00:00
|
|
|
bool cWaterSimulator::IsAllowedBlock(char a_BlockID)
|
2011-10-03 18:41:19 +00:00
|
|
|
{
|
2011-12-25 16:20:06 +00:00
|
|
|
return IsBlockWater(a_BlockID);
|
2011-10-03 18:41:19 +00:00
|
|
|
}
|
|
|
|
|
2011-12-24 01:36:15 +00:00
|
|
|
|
2011-12-25 16:20:06 +00:00
|
|
|
bool cWaterSimulator::IsPassableForFluid(char a_BlockID)
|
2011-12-24 01:36:15 +00:00
|
|
|
{
|
2011-12-25 16:20:06 +00:00
|
|
|
return ( a_BlockID == E_BLOCK_AIR || IsAllowedBlock(a_BlockID) );
|
2011-10-03 18:41:19 +00:00
|
|
|
}
|