diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-02 16:44:31 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-02 16:44:31 +0100 |
commit | 66670f5d5ccabb3b560c2342d79d0cb1e8550899 (patch) | |
tree | 8699a9d7ba78f7525b16f896d07525b7cabb3849 /source/Simulator/FluidSimulator.h | |
parent | Core: Updated with new features (contributed by STR_Warrior) (diff) | |
download | cuberite-66670f5d5ccabb3b560c2342d79d0cb1e8550899.tar cuberite-66670f5d5ccabb3b560c2342d79d0cb1e8550899.tar.gz cuberite-66670f5d5ccabb3b560c2342d79d0cb1e8550899.tar.bz2 cuberite-66670f5d5ccabb3b560c2342d79d0cb1e8550899.tar.lz cuberite-66670f5d5ccabb3b560c2342d79d0cb1e8550899.tar.xz cuberite-66670f5d5ccabb3b560c2342d79d0cb1e8550899.tar.zst cuberite-66670f5d5ccabb3b560c2342d79d0cb1e8550899.zip |
Diffstat (limited to 'source/Simulator/FluidSimulator.h')
-rw-r--r-- | source/Simulator/FluidSimulator.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/Simulator/FluidSimulator.h b/source/Simulator/FluidSimulator.h index fce18522f..672b740a2 100644 --- a/source/Simulator/FluidSimulator.h +++ b/source/Simulator/FluidSimulator.h @@ -22,6 +22,19 @@ enum Direction +/** This is a base class for all fluid simulator data classes. +Needed so that cChunk can properly delete instances of fluid simulator data, no matter what simulator it's using +*/ +class cFluidSimulatorData +{ +public: + virtual ~cFluidSimulatorData() {} +} ; + + + + + class cFluidSimulator : public cSimulator { @@ -36,6 +49,9 @@ public: /// Gets the flowing direction. If a_Over is true also the block over the current block affects the direction (standard) virtual Direction GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a_Over = true); + /// Creates a ChunkData object for the simulator to use. The simulator returns the correct object type. + virtual cFluidSimulatorData * CreateChunkData(void) { return NULL; } + bool IsFluidBlock (BLOCKTYPE a_BlockType) const { return (a_BlockType == m_FluidBlock); } bool IsStationaryFluidBlock(BLOCKTYPE a_BlockType) const { return (a_BlockType == m_StationaryFluidBlock); } bool IsAnyFluidBlock (BLOCKTYPE a_BlockType) const { return ((a_BlockType == m_FluidBlock) || (a_BlockType == m_StationaryFluidBlock)); } |