Add new flow direction calculating algorithm (#4160)

This commit is contained in:
bionext03
2018-07-27 10:01:53 +01:00
committed by peterbell10
parent cdd8e42587
commit 90d552a702
3 changed files with 80 additions and 133 deletions
+4 -4
View File
@@ -28,7 +28,7 @@ class cFluidSimulatorData
{
public:
virtual ~cFluidSimulatorData() {}
} ;
};
@@ -45,8 +45,8 @@ public:
// cSimulator overrides:
virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override;
/** 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);
/** Returns a unit vector in the direction the fluid is flowing or a zero-vector if not flowing. */
virtual Vector3f GetFlowingDirection(int a_X, int a_Y, int a_Z);
/** Creates a ChunkData object for the simulator to use. The simulator returns the correct object type. */
virtual cFluidSimulatorData * CreateChunkData(void) { return nullptr; }
@@ -66,7 +66,7 @@ public:
protected:
BLOCKTYPE m_FluidBlock; // The fluid block type that needs simulating
BLOCKTYPE m_StationaryFluidBlock; // The fluid block type that indicates no simulation is needed
} ;
};