summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/BlockID.cpp9
-rw-r--r--source/Blocks/BlockFluid.h6
-rw-r--r--source/Blocks/BlockIce.h2
-rw-r--r--source/Generating/ComposableGenerator.cpp6
-rw-r--r--source/Piston.cpp34
-rw-r--r--source/World.cpp2
6 files changed, 44 insertions, 15 deletions
diff --git a/source/BlockID.cpp b/source/BlockID.cpp
index ad96cfa72..05506777c 100644
--- a/source/BlockID.cpp
+++ b/source/BlockID.cpp
@@ -655,7 +655,7 @@ public:
g_BlockPistonBreakable[E_BLOCK_IRON_DOOR] = true;
g_BlockPistonBreakable[E_BLOCK_JACK_O_LANTERN] = true;
g_BlockPistonBreakable[E_BLOCK_LADDER] = true;
- g_BlockPistonBreakable[E_BLOCK_LAVA] = false;
+ g_BlockPistonBreakable[E_BLOCK_LAVA] = true;
g_BlockPistonBreakable[E_BLOCK_LEVER] = true;
g_BlockPistonBreakable[E_BLOCK_MELON] = true;
g_BlockPistonBreakable[E_BLOCK_MELON_STEM] = true;
@@ -668,18 +668,19 @@ public:
g_BlockPistonBreakable[E_BLOCK_RED_ROSE] = true;
g_BlockPistonBreakable[E_BLOCK_REEDS] = true;
g_BlockPistonBreakable[E_BLOCK_SNOW] = true;
- g_BlockPistonBreakable[E_BLOCK_STATIONARY_LAVA] = false;
- g_BlockPistonBreakable[E_BLOCK_STATIONARY_WATER] = false; //This gave pistons the ability to drop water :D
+ g_BlockPistonBreakable[E_BLOCK_STATIONARY_LAVA] = true;
+ g_BlockPistonBreakable[E_BLOCK_STATIONARY_WATER] = true;
g_BlockPistonBreakable[E_BLOCK_STONE_BUTTON] = true;
g_BlockPistonBreakable[E_BLOCK_STONE_PRESSURE_PLATE] = true;
g_BlockPistonBreakable[E_BLOCK_TALL_GRASS] = true;
g_BlockPistonBreakable[E_BLOCK_TORCH] = true;
g_BlockPistonBreakable[E_BLOCK_VINES] = true;
- g_BlockPistonBreakable[E_BLOCK_WATER] = false;
+ g_BlockPistonBreakable[E_BLOCK_WATER] = true;
g_BlockPistonBreakable[E_BLOCK_WOODEN_DOOR] = true;
g_BlockPistonBreakable[E_BLOCK_WOODEN_PRESSURE_PLATE] = true;
g_BlockPistonBreakable[E_BLOCK_YELLOW_FLOWER] = true;
+
// Blocks that can be snowed over:
g_BlockIsSnowable[E_BLOCK_AIR] = false;
g_BlockIsSnowable[E_BLOCK_BROWN_MUSHROOM] = false;
diff --git a/source/Blocks/BlockFluid.h b/source/Blocks/BlockFluid.h
index 696bfb3ce..0db2f60c4 100644
--- a/source/Blocks/BlockFluid.h
+++ b/source/Blocks/BlockFluid.h
@@ -17,6 +17,12 @@ public:
: cBlockHandler(a_BlockType)
{
+ }
+
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ // No pickups
}
diff --git a/source/Blocks/BlockIce.h b/source/Blocks/BlockIce.h
index 11fe425f3..af4961114 100644
--- a/source/Blocks/BlockIce.h
+++ b/source/Blocks/BlockIce.h
@@ -27,7 +27,7 @@ public:
virtual void OnDestroyed(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override
{
// TODO: Ice destroyed with air below it should turn into air instead of water
- a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_STATIONARY_WATER, 8);
+ a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_WATER, 0);
// This is called later than the real destroying of this ice block
}
} ;
diff --git a/source/Generating/ComposableGenerator.cpp b/source/Generating/ComposableGenerator.cpp
index 8763e2809..94f822420 100644
--- a/source/Generating/ComposableGenerator.cpp
+++ b/source/Generating/ComposableGenerator.cpp
@@ -147,7 +147,7 @@ void cComposableGenerator::DoGenerate(int a_ChunkX, int a_ChunkZ, cChunkDesc & a
void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
{
- AString BiomeGenName = a_IniFile.GetValueSet("Generator", "BiomeGen", "");
+ AString BiomeGenName = a_IniFile.GetValueSet("Generator", "BiomeGen", "MultiStepMap");
if (BiomeGenName.empty())
{
LOGWARN("[Generator]::BiomeGen value not found in world.ini, using \"MultiStepMap\".");
@@ -220,7 +220,7 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
void cComposableGenerator::InitHeightGen(cIniFile & a_IniFile)
{
- AString HeightGenName = a_IniFile.GetValueSet("Generator", "HeightGen", "");
+ AString HeightGenName = a_IniFile.GetValueSet("Generator", "HeightGen", "Biomal");
if (HeightGenName.empty())
{
LOGWARN("[Generator]::HeightGen value not found in world.ini, using \"Biomal\".");
@@ -306,7 +306,7 @@ void cComposableGenerator::InitHeightGen(cIniFile & a_IniFile)
void cComposableGenerator::InitCompositionGen(cIniFile & a_IniFile)
{
- AString CompoGenName = a_IniFile.GetValueSet("Generator", "CompositionGen", "");
+ AString CompoGenName = a_IniFile.GetValueSet("Generator", "CompositionGen", "Biomal");
if (CompoGenName.empty())
{
LOGWARN("[Generator]::CompositionGen value not found in world.ini, using \"Biomal\".");
diff --git a/source/Piston.cpp b/source/Piston.cpp
index 91b1aaa93..8729287de 100644
--- a/source/Piston.cpp
+++ b/source/Piston.cpp
@@ -12,6 +12,13 @@
#include "Server.h"
#include "Blocks/BlockHandler.h"
+/*
+#ifdef _WIN32
+#include <windows.h>
+#else
+#include <unistd.h>
+#endif
+*/
@@ -126,11 +133,16 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz )
AddDir(extx, exty, extz, pistonMeta & 7, 1)
- // TODO: This code needs replacing
+ /*
+ #ifdef _WIN32
// Sleeping here will play the piston animation on the client; however, it will block the entire server
// for the 100 ms, effectively dropping 2 game ticks per piston. This is very bad
// This needs to be handled using delayed scheduled tasks instead
- cSleep::MilliSleep(100);
+ Sleep(100);
+ #else
+ usleep(static_cast<useconds_t>(100)*1000);
+ #endif
+ */
m_World->SetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, isSticky + pistonMeta & 7);
}
@@ -176,23 +188,33 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz )
// These cannot be moved by the sticky piston, bail out
return;
}
-
+ /*
+ #ifdef _WIN32
// TODO: This code needs replacing
// Sleeping here will play the piston animation on the client; however, it will block the entire server
// for the 100 ms, effectively dropping 2 game ticks per piston. This is very bad
// This needs to be handled using delayed scheduled tasks instead
- cSleep::MilliSleep(100);
+ Sleep(100);
+ #else
+ usleep(static_cast<useconds_t>(100)*1000);
+ #endif
+ */
m_World->SetBlock(pistx, pisty, pistz, tempblock, tempmeta);
m_World->SetBlock(tempx, tempy, tempz, E_BLOCK_AIR, 0);
}
else
{
- // TODO: This code needs replacing
+ /*
+ #ifdef _WIN32
// Sleeping here will play the piston animation on the client; however, it will block the entire server
// for the 100 ms, effectively dropping 2 game ticks per piston. This is very bad
// This needs to be handled using delayed scheduled tasks instead
- cSleep::MilliSleep(100);
+ Sleep(100);
+ #else
+ usleep(static_cast<useconds_t>(100)*1000);
+ #endif
+ */
m_World->SetBlock(pistx, pisty, pistz, E_BLOCK_AIR, 0);
}
diff --git a/source/World.cpp b/source/World.cpp
index 3955b6136..77bfc0e2f 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -2476,7 +2476,7 @@ cFluidSimulator * cWorld::InitializeFluidSimulator(cIniFile & a_IniFile, const c
Printf(SimulatorNameKey, "%sSimulator", a_FluidName);
AString SimulatorSectionName;
Printf(SimulatorSectionName, "%sSimulator", a_FluidName);
- AString SimulatorName = a_IniFile.GetValueSet("Physics", SimulatorNameKey, "");
+ AString SimulatorName = a_IniFile.GetValueSet("Physics", SimulatorNameKey, "Floody");
if (SimulatorName.empty())
{
LOGWARNING("%s [Physics]:%s not present or empty, using the default of \"Floody\".", GetIniFileName().c_str(), SimulatorNameKey.c_str());