1
0

Implemented vanilla-like fluid simulator

This commit is contained in:
andrew
2014-03-05 15:54:38 +02:00
parent d25e4d4179
commit 1ea17c0a75
6 changed files with 238 additions and 17 deletions

View File

@@ -0,0 +1,42 @@
// VanillaFluidSimulator.h
#pragma once
#include "FloodyFluidSimulator.h"
// fwd:
class cBlockArea;
class cVanillaFluidSimulator :
public cFloodyFluidSimulator
{
typedef cFloodyFluidSimulator super;
public:
cVanillaFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, NIBBLETYPE a_Falloff, int a_TickDelay, int a_NumNeighborsForSource);
protected:
// cFloodyFluidSimulator overrides:
virtual void Spread(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_NewMeta) override;
/** Recursively calculates the minimum number of blocks needed to descend a level. */
int CalculateFlowCost(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, Direction a_Dir, unsigned a_Iteration = 0);
} ;