From 9f38c219e2851324b8b2694315abed4d3138fca2 Mon Sep 17 00:00:00 2001 From: faketruth Date: Tue, 14 Feb 2012 13:37:13 +0000 Subject: Updated fluid simulators with geser's patch file! Fluids should behave more like Minecraft's fluids, and lava+water creates stone/cobble/obsidian! git-svn-id: http://mc-server.googlecode.com/svn/trunk@257 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cFluidSimulator.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/cFluidSimulator.h') diff --git a/source/cFluidSimulator.h b/source/cFluidSimulator.h index d4379623d..afacea5f7 100644 --- a/source/cFluidSimulator.h +++ b/source/cFluidSimulator.h @@ -1,6 +1,7 @@ #pragma once #include "cSimulator.h" +#include "Vector3i.h" //TODO This definitly needs a better naming :D but how? @@ -29,12 +30,16 @@ public: Direction GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a_Over = true); virtual bool IsAllowedBlock( char a_BlockID ) = 0; + virtual bool IsStationaryBlock( char a_BlockID); virtual bool IsPassableForFluid( char a_BlockID ); bool CanWashAway( char a_BlockID ); + bool IsSolidBlock(char a_BlockID); protected: virtual void AddBlock( int a_X, int a_Y, int a_Z); char GetHighestLevelAround( int a_X, int a_Y, int a_Z ); + bool UniqueSituation(Vector3i a_Pos); //Applys special for this fluid rules like generation of water betwin sources, returns false if it is necessary to apply general rules + void ApplyUniqueToNearest(Vector3i a_Pos); float m_Timer; @@ -43,6 +48,7 @@ protected: //Customize char m_FluidBlock; + char m_StationaryFluidBlock; char m_MaxHeight; char m_FlowReduction; -- cgit v1.2.3