From 9f77572fb0d045229556314ba9d7aa0f52ad5635 Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Mon, 26 Dec 2011 20:57:12 +0000 Subject: - improved Simulator system -> Manager handles all ticks -> advantage: Much easier to add new simulators, because you only have to register them in the manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - moved sand and gravel simulation to a Simulator-class (cSandSimulator) - Made Squid a little bit more funny and realistic, because it dies now when it´s not in water -Escaping mobs run now faster than normal (They just walked away before :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@125 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cFluidSimulator.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/cFluidSimulator.h') diff --git a/source/cFluidSimulator.h b/source/cFluidSimulator.h index 758bfc022..1b4cd0d55 100644 --- a/source/cFluidSimulator.h +++ b/source/cFluidSimulator.h @@ -1,5 +1,7 @@ #pragma once +#include "cSimulator.h" + //TODO This definitly needs a better naming :D but how? enum Direction @@ -15,14 +17,13 @@ enum Direction class Vector3i; class cWorld; -class cFluidSimulator +class cFluidSimulator : public cSimulator { public: cFluidSimulator( cWorld* a_World ); ~cFluidSimulator(); virtual void Simulate( float a_Dt ); - void WakeUp( int a_X, int a_Y, int a_Z ); //Gets the flowing direction. if a_Over is true also the block over the current block affects the direction (standard) Direction GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a_Over = true); @@ -31,12 +32,11 @@ public: virtual inline bool IsPassableForFluid( char a_BlockID ) = 0; protected: - void AddBlock( int a_X, int a_Y, int a_Z); + virtual void AddBlock( int a_X, int a_Y, int a_Z); char GetHighestLevelAround( int a_X, int a_Y, int a_Z ); float m_Timer; - cWorld* m_World; class FluidData; FluidData* m_Data; -- cgit v1.2.3