1
0

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
This commit is contained in:
madmaxoft@gmail.com
2012-10-13 09:53:28 +00:00
parent 7bca7f3cb9
commit f7da7c2536
28 changed files with 356 additions and 884 deletions

View File

@@ -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)