From f7da7c2536b438db92bc28b88c4139d9af15e44f Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 13 Oct 2012 09:53:28 +0000 Subject: Preparation for multiple fluid simulators. Moved all simulators into a subfolder. Replaced cWaterSimulator and cLavaSimulator with a generic cFluidSimulator. Moved original fluid simulation into cClassicFluidSimulator. Fluid simulator parameters (MaxHeight, Falloff) are read from the world.ini file (can have nether-like lava with lower falloff) git-svn-id: http://mc-server.googlecode.com/svn/trunk@956 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Pickup.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/Pickup.cpp') diff --git a/source/Pickup.cpp b/source/Pickup.cpp index 8a32a328b..ea1f603a4 100644 --- a/source/Pickup.cpp +++ b/source/Pickup.cpp @@ -9,7 +9,7 @@ #include "ClientHandle.h" #include "Inventory.h" #include "World.h" -#include "WaterSimulator.h" +#include "Simulator/FluidSimulator.h" #include "Server.h" #include "Player.h" #include "PluginManager.h" @@ -157,11 +157,9 @@ void cPickup::HandlePhysics(float a_Dt) if( fabs(m_Speed.z) < 0.05 ) m_Speed.z = 0; } - - //get flowing direction + // get flowing direction Direction WaterDir = World->GetWaterSimulator()->GetFlowingDirection((int) m_Pos.x - 1, (int) m_Pos.y, (int) m_Pos.z - 1); - m_WaterSpeed *= 0.9f; //Keep old speed but lower it switch(WaterDir) -- cgit v1.2.3