summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--VC2013/CryptoPP.vcxproj.filters6
-rw-r--r--VC2013/MCServer.vcxproj17
-rw-r--r--VC2013/MCServer.vcxproj.filters105
-rw-r--r--VC2013/ToLua.vcxproj11
-rw-r--r--VC2013/ToLua.vcxproj.filters3
-rw-r--r--src/Blocks/BlockHandler.cpp5
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp18
-rw-r--r--src/Simulator/RedstoneSimulator.cpp69
-rw-r--r--src/Simulator/RedstoneSimulator.h9
-rw-r--r--src/World.cpp8
10 files changed, 159 insertions, 92 deletions
diff --git a/VC2013/CryptoPP.vcxproj.filters b/VC2013/CryptoPP.vcxproj.filters
index bc8e51b81..d9d18befa 100644
--- a/VC2013/CryptoPP.vcxproj.filters
+++ b/VC2013/CryptoPP.vcxproj.filters
@@ -2,15 +2,15 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
- <UniqueIdentifier>{9cc4f7b9-4c1a-4f43-ba70-d1780e59b9af}</UniqueIdentifier>
+ <UniqueIdentifier>{de7b3b89-9cfa-4441-97a1-a41eb499d273}</UniqueIdentifier>
<Extensions>.cpp</Extensions>
</Filter>
<Filter Include="Header Files">
- <UniqueIdentifier>{4570686f-18a1-4d38-a53b-062a4c223d4d}</UniqueIdentifier>
+ <UniqueIdentifier>{1ddea6e2-83c2-4c5f-962a-7ad7f117cc85}</UniqueIdentifier>
<Extensions>.;.h</Extensions>
</Filter>
<Filter Include="Miscellaneous">
- <UniqueIdentifier>{6c599481-412e-461e-b3b3-949c4f43474a}</UniqueIdentifier>
+ <UniqueIdentifier>{41edc228-f641-4aea-ad4b-14a4918be0a3}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
diff --git a/VC2013/MCServer.vcxproj b/VC2013/MCServer.vcxproj
index 56fbdc165..334aa875c 100644
--- a/VC2013/MCServer.vcxproj
+++ b/VC2013/MCServer.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug profiled|Win32">
@@ -224,8 +224,6 @@
<ResourceCompile Include="MCServer.rc" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\src\BlockEntities\EnderChestEntity.h" />
- <ClInclude Include="..\src\Blocks\BlockRedstoneLamp.h" />
<ClInclude Include="resource_MCServer.h" />
<ClInclude Include="..\src\Authenticator.h" />
<ClInclude Include="..\src\BlockArea.h" />
@@ -365,16 +363,15 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release profiled|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuild>
- <ClInclude Include="..\src\Bindings.h" />
- <ClInclude Include="..\src\LuaFunctions.h" />
+ <ClInclude Include="..\src\Bindings\Bindings.h" />
+ <ClInclude Include="..\src\Bindings\LuaFunctions.h" />
<ClInclude Include="..\src\Bindings\LuaState.h" />
<ClInclude Include="..\src\Bindings\LuaWindow.h" />
<ClInclude Include="..\src\Bindings\ManualBindings.h" />
<ClInclude Include="..\src\Bindings\Plugin.h" />
<ClInclude Include="..\src\Bindings\PluginLua.h" />
<ClInclude Include="..\src\Bindings\PluginManager.h" />
- <ClInclude Include="..\src\tolua++.h" />
- <ClInclude Include="..\src\tolua_base.h" />
+ <ClInclude Include="..\src\Bindings\tolua_base.h" />
<ClInclude Include="..\src\Bindings\WebPlugin.h" />
<ClInclude Include="..\lib\inifile\iniFile.h" />
<ClInclude Include="..\lib\md5\md5.h" />
@@ -506,6 +503,7 @@
<ClInclude Include="..\src\BlockEntities\DispenserEntity.h" />
<ClInclude Include="..\src\BlockEntities\DropperEntity.h" />
<ClInclude Include="..\src\BlockEntities\DropSpenserEntity.h" />
+ <ClInclude Include="..\src\BlockEntities\EnderChestEntity.h" />
<ClInclude Include="..\src\BlockEntities\FurnaceEntity.h" />
<ClInclude Include="..\src\BlockEntities\HopperEntity.h" />
<ClInclude Include="..\src\BlockEntities\JukeboxEntity.h" />
@@ -535,7 +533,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release profiled|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</CustomBuild>
- <CustomBuild Include="..\src\AllToLua.pkg">
+ <CustomBuild Include="..\src\Bindings\AllToLua.pkg">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug profiled|Win32'">true</ExcludedFromBuild>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug profiled|Win32'">GenerateBindings.cmd
</Command>
@@ -617,7 +615,6 @@
<ItemGroup>
<ClCompile Include="..\src\Authenticator.cpp" />
<ClCompile Include="..\src\BlockArea.cpp" />
- <ClCompile Include="..\src\BlockEntities\EnderChestEntity.cpp" />
<ClCompile Include="..\src\BlockID.cpp" />
<ClCompile Include="..\src\BoundingBox.cpp" />
<ClCompile Include="..\src\ByteBuffer.cpp" />
@@ -919,6 +916,7 @@
<ClCompile Include="..\src\BlockEntities\DispenserEntity.cpp" />
<ClCompile Include="..\src\BlockEntities\DropperEntity.cpp" />
<ClCompile Include="..\src\BlockEntities\DropSpenserEntity.cpp" />
+ <ClCompile Include="..\src\BlockEntities\EnderChestEntity.cpp" />
<ClCompile Include="..\src\BlockEntities\FurnaceEntity.cpp" />
<ClCompile Include="..\src\BlockEntities\HopperEntity.cpp" />
<ClCompile Include="..\src\BlockEntities\JukeboxEntity.cpp" />
@@ -933,7 +931,6 @@
<ClCompile Include="..\src\HTTPServer\NameValueParser.cpp" />
</ItemGroup>
<ItemGroup>
- <Text Include="..\MCServer\API.txt" />
<Text Include="..\lib\sqlite\urls.txt" />
<Text Include="..\MCServer\crafting.txt" />
<Text Include="..\MCServer\furnace.txt" />
diff --git a/VC2013/MCServer.vcxproj.filters b/VC2013/MCServer.vcxproj.filters
index 2f0794e85..724e1866d 100644
--- a/VC2013/MCServer.vcxproj.filters
+++ b/VC2013/MCServer.vcxproj.filters
@@ -10,73 +10,73 @@
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Source Files\Mobs">
- <UniqueIdentifier>{52f3d533-108a-4cd8-8be2-19c799667e26}</UniqueIdentifier>
+ <UniqueIdentifier>{977716f7-b383-498a-950f-49afc6d551f6}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Entities">
- <UniqueIdentifier>{727392f6-6dc8-4c0f-8380-2affc45d20d4}</UniqueIdentifier>
+ <UniqueIdentifier>{14ac2998-63d0-4bb3-97e3-1bd0007ffc74}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\UI">
- <UniqueIdentifier>{169eedf6-1244-49d1-9a74-79002dee80a7}</UniqueIdentifier>
+ <UniqueIdentifier>{272cba2d-aa26-4c69-b6fa-94465078e351}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Simulator">
- <UniqueIdentifier>{78798af4-7e8b-4f86-8175-c34995b71a7f}</UniqueIdentifier>
+ <UniqueIdentifier>{1fabcea5-dba3-4265-b691-5795c69c4471}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\OSSupport">
- <UniqueIdentifier>{a9d6163b-75c5-47ef-8ebd-192c0053d987}</UniqueIdentifier>
+ <UniqueIdentifier>{c29beffd-33f6-44eb-8310-3e0462cdddf9}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\OSSupport\Android Specific">
- <UniqueIdentifier>{4e664e9b-8741-4701-9f32-60dcc29f6463}</UniqueIdentifier>
+ <UniqueIdentifier>{430cae6d-cfb2-49a2-9fb2-614fde244868}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Bindings">
- <UniqueIdentifier>{5496fc08-0db0-4de0-adff-760fa67a8a78}</UniqueIdentifier>
+ <UniqueIdentifier>{87060076-8ef4-4535-88ee-7a609e4391ae}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\External">
- <UniqueIdentifier>{0162bb1a-bed1-4e87-9ab7-c3da55911060}</UniqueIdentifier>
+ <UniqueIdentifier>{4e33e863-d055-4476-bb95-efd5ebc115d3}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\WorldStorage">
- <UniqueIdentifier>{82c6a5ba-3211-4c01-a643-9cdf2983630f}</UniqueIdentifier>
+ <UniqueIdentifier>{ae97007e-0940-4f87-9786-8ed1d201e52c}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Generating">
- <UniqueIdentifier>{fc99053a-c609-4646-ad85-9cbaccbcf1c5}</UniqueIdentifier>
+ <UniqueIdentifier>{99483c91-c76c-47c7-838d-ba25c2066c79}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Blocks">
- <UniqueIdentifier>{83b41e57-43fe-4bfc-8ca5-d0d460834d59}</UniqueIdentifier>
+ <UniqueIdentifier>{51b8f5f3-83b3-4068-8825-503f19b42542}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Items">
- <UniqueIdentifier>{d53d761d-7d28-41dd-9623-6b489fbba65a}</UniqueIdentifier>
+ <UniqueIdentifier>{959da118-757d-44c1-a4bd-d3345cfeb637}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Protocol">
- <UniqueIdentifier>{d3534b5b-4684-4857-befa-b78b9198eed8}</UniqueIdentifier>
+ <UniqueIdentifier>{be413233-b7df-4ef1-9eb3-8aa1de96bf3e}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\SQLite">
- <UniqueIdentifier>{96831397-1e56-4d07-9a3f-d97b9caa3f64}</UniqueIdentifier>
+ <UniqueIdentifier>{224e8323-4bcc-4d7e-bdba-09fa22f42d66}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\LuaExpat">
- <UniqueIdentifier>{6c6cceb3-545c-4698-a5c9-c01497e80022}</UniqueIdentifier>
+ <UniqueIdentifier>{f9ad84f7-9199-45d1-a609-128f60baa996}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\BlockEntities">
- <UniqueIdentifier>{7491cc4f-d735-4546-8aad-24d11a7396b0}</UniqueIdentifier>
+ <UniqueIdentifier>{74088e2e-f7dc-478a-ae7f-bcfcb1a13dcc}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\HTTPServer">
- <UniqueIdentifier>{201c626a-b869-407a-9c2a-e06cf8c8e127}</UniqueIdentifier>
+ <UniqueIdentifier>{5e5eae6e-3154-4f85-868e-2682d072a5b2}</UniqueIdentifier>
</Filter>
<Filter Include="Config files">
- <UniqueIdentifier>{cd93064b-e465-4562-a09b-de2363d0fab4}</UniqueIdentifier>
+ <UniqueIdentifier>{124dfea0-3dcd-45c0-a196-ec9bd6e00b6a}</UniqueIdentifier>
</Filter>
<Filter Include="Plugins">
- <UniqueIdentifier>{8947d9a2-b1dc-4c3e-8c27-05ca5260843d}</UniqueIdentifier>
+ <UniqueIdentifier>{bc156df0-b3f8-4bf2-a434-59e63f5eafcc}</UniqueIdentifier>
</Filter>
<Filter Include="Plugins\Core">
- <UniqueIdentifier>{26e14e8c-ffde-4f83-b3a0-e0001d590e7a}</UniqueIdentifier>
+ <UniqueIdentifier>{2bbb71f4-860a-4fc4-b9d9-ac05f806fea1}</UniqueIdentifier>
</Filter>
<Filter Include="Plugins\ChatLog">
- <UniqueIdentifier>{44ae2ab1-5552-4e84-b8b5-f28a59af0c4f}</UniqueIdentifier>
+ <UniqueIdentifier>{05facd8b-76e8-4bc5-9135-831b49ac5c65}</UniqueIdentifier>
</Filter>
<Filter Include="Plugins\Debuggers">
- <UniqueIdentifier>{ac8a4c54-36f2-4505-a0dc-66f2817ccfa7}</UniqueIdentifier>
+ <UniqueIdentifier>{6b70646e-a784-4617-8b26-941de4f8fd20}</UniqueIdentifier>
</Filter>
<Filter Include="Plugins\APIDump">
- <UniqueIdentifier>{3e58b3c7-097f-4688-a619-2771353180fe}</UniqueIdentifier>
+ <UniqueIdentifier>{a2b234d1-1013-47c0-8a44-f3b294d83d19}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@@ -486,37 +486,34 @@
<ClInclude Include="..\src\OSSupport\Timer.h">
<Filter>Source Files\OSSupport</Filter>
</ClInclude>
- <ClInclude Include="..\src\Bindings.h">
+ <ClInclude Include="..\src\Bindings\Bindings.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\LuaFunctions.h">
+ <ClInclude Include="..\src\Bindings\LuaFunctions.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\LuaState.h">
+ <ClInclude Include="..\src\Bindings\LuaState.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\LuaWindow.h">
+ <ClInclude Include="..\src\Bindings\LuaWindow.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\ManualBindings.h">
+ <ClInclude Include="..\src\Bindings\ManualBindings.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\Plugin.h">
+ <ClInclude Include="..\src\Bindings\Plugin.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\PluginLua.h">
+ <ClInclude Include="..\src\Bindings\PluginLua.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\PluginManager.h">
+ <ClInclude Include="..\src\Bindings\PluginManager.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\tolua++.h">
+ <ClInclude Include="..\src\Bindings\tolua_base.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
- <ClInclude Include="..\src\tolua_base.h">
- <Filter>Source Files\Bindings</Filter>
- </ClInclude>
- <ClInclude Include="..\src\WebPlugin.h">
+ <ClInclude Include="..\src\Bindings\WebPlugin.h">
<Filter>Source Files\Bindings</Filter>
</ClInclude>
<ClInclude Include="..\lib\inifile\iniFile.h">
@@ -909,6 +906,9 @@
<ClInclude Include="..\src\BlockEntities\DropSpenserEntity.h">
<Filter>Source Files\BlockEntities</Filter>
</ClInclude>
+ <ClInclude Include="..\src\BlockEntities\EnderChestEntity.h">
+ <Filter>Source Files\BlockEntities</Filter>
+ </ClInclude>
<ClInclude Include="..\src\BlockEntities\FurnaceEntity.h">
<Filter>Source Files\BlockEntities</Filter>
</ClInclude>
@@ -945,12 +945,6 @@
<ClInclude Include="..\src\HTTPServer\NameValueParser.h">
<Filter>Source Files\HTTPServer</Filter>
</ClInclude>
- <ClInclude Include="..\src\BlockEntities\EnderChestEntity.h">
- <Filter>Source Files\BlockEntities</Filter>
- </ClInclude>
- <ClInclude Include="..\src\Blocks\BlockRedstoneLamp.h">
- <Filter>Source Files\Blocks</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\webadmin\template.html">
@@ -1471,28 +1465,28 @@
<ClCompile Include="..\Android\jni\ToJava.cpp">
<Filter>Source Files\OSSupport\Android Specific</Filter>
</ClCompile>
- <ClCompile Include="..\src\Bindings.cpp">
+ <ClCompile Include="..\src\Bindings\Bindings.cpp">
<Filter>Source Files\Bindings</Filter>
</ClCompile>
- <ClCompile Include="..\src\LuaState.cpp">
+ <ClCompile Include="..\src\Bindings\LuaState.cpp">
<Filter>Source Files\Bindings</Filter>
</ClCompile>
- <ClCompile Include="..\src\LuaWindow.cpp">
+ <ClCompile Include="..\src\Bindings\LuaWindow.cpp">
<Filter>Source Files\Bindings</Filter>
</ClCompile>
- <ClCompile Include="..\src\ManualBindings.cpp">
+ <ClCompile Include="..\src\Bindings\ManualBindings.cpp">
<Filter>Source Files\Bindings</Filter>
</ClCompile>
- <ClCompile Include="..\src\Plugin.cpp">
+ <ClCompile Include="..\src\Bindings\Plugin.cpp">
<Filter>Source Files\Bindings</Filter>
</ClCompile>
- <ClCompile Include="..\src\PluginLua.cpp">
+ <ClCompile Include="..\src\Bindings\PluginLua.cpp">
<Filter>Source Files\Bindings</Filter>
</ClCompile>
- <ClCompile Include="..\src\PluginManager.cpp">
+ <ClCompile Include="..\src\Bindings\PluginManager.cpp">
<Filter>Source Files\Bindings</Filter>
</ClCompile>
- <ClCompile Include="..\src\WebPlugin.cpp">
+ <ClCompile Include="..\src\Bindings\WebPlugin.cpp">
<Filter>Source Files\Bindings</Filter>
</ClCompile>
<ClCompile Include="..\lib\inifile\iniFile.cpp">
@@ -1624,6 +1618,9 @@
<ClCompile Include="..\src\BlockEntities\DropSpenserEntity.cpp">
<Filter>Source Files\BlockEntities</Filter>
</ClCompile>
+ <ClCompile Include="..\src\BlockEntities\EnderChestEntity.cpp">
+ <Filter>Source Files\BlockEntities</Filter>
+ </ClCompile>
<ClCompile Include="..\src\BlockEntities\FurnaceEntity.cpp">
<Filter>Source Files\BlockEntities</Filter>
</ClCompile>
@@ -1660,14 +1657,8 @@
<ClCompile Include="..\src\HTTPServer\NameValueParser.cpp">
<Filter>Source Files\HTTPServer</Filter>
</ClCompile>
- <ClCompile Include="..\src\BlockEntities\EnderChestEntity.cpp">
- <Filter>Source Files\BlockEntities</Filter>
- </ClCompile>
</ItemGroup>
<ItemGroup>
- <Text Include="..\MCServer\API.txt">
- <Filter>Source Files\Bindings</Filter>
- </Text>
<Text Include="..\lib\sqlite\urls.txt">
<Filter>Source Files\SQLite</Filter>
</Text>
@@ -1688,7 +1679,7 @@
<CustomBuild Include="..\Android\jni\ToJava.h">
<Filter>Source Files\OSSupport\Android Specific</Filter>
</CustomBuild>
- <CustomBuild Include="..\src\AllToLua.pkg">
+ <CustomBuild Include="..\src\Bindings\AllToLua.pkg">
<Filter>Source Files\Bindings</Filter>
</CustomBuild>
</ItemGroup>
diff --git a/VC2013/ToLua.vcxproj b/VC2013/ToLua.vcxproj
index 4895f0a61..86f80d691 100644
--- a/VC2013/ToLua.vcxproj
+++ b/VC2013/ToLua.vcxproj
@@ -100,7 +100,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../lib/tolua++/include;../lib/lua/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../lib/jsoncpp/include;../lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -114,7 +114,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>../lib/tolua++/include;../lib/lua/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../lib/jsoncpp/include;../lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -127,7 +127,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>../lib/tolua++/include;../lib/lua/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../lib/jsoncpp/include;../lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
@@ -139,7 +139,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug profiled|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../lib/tolua++/include;../lib/lua/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../lib/jsoncpp/include;../lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -152,7 +152,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LuaStatic|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../lib/tolua++/include;../lib/lua/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../lib/jsoncpp/include;../lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -163,7 +163,6 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\lib\tolua++\src\bin\tolua.c" />
<ClCompile Include="..\lib\tolua++\src\lib\tolua_event.c" />
<ClCompile Include="..\lib\tolua++\src\lib\tolua_is.c" />
<ClCompile Include="..\lib\tolua++\src\lib\tolua_map.c" />
diff --git a/VC2013/ToLua.vcxproj.filters b/VC2013/ToLua.vcxproj.filters
index 5d104d7d0..095111dc8 100644
--- a/VC2013/ToLua.vcxproj.filters
+++ b/VC2013/ToLua.vcxproj.filters
@@ -7,9 +7,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\lib\tolua++\src\bin\tolua.c">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\lib\tolua++\src\lib\tolua_event.c">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index 99559ed02..fde6bd803 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -376,9 +376,8 @@ void cBlockHandler::DropBlock(cWorld * a_World, cEntity * a_Digger, int a_BlockX
MicroZ = a_BlockZ + 0.5;
// Add random offset second (this causes pickups to spawn inside blocks most times, it's a little buggy)
- //MicroX += (int)(r1.randInt(16) + r1.randInt(16) - 16);
- //MicroY += (int)(r1.randInt(16) + r1.randInt(16) - 16);
- //MicroZ += (int)(r1.randInt(16) + r1.randInt(16) - 16);
+ MicroX += r1.rand(1) - 0.5;
+ MicroZ += r1.rand(1) - 0.5;
a_World->SpawnItemPickups(Pickups, MicroX, MicroY, MicroZ);
}
diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp
index d204a1f8b..58e5d614b 100644
--- a/src/Simulator/FloodyFluidSimulator.cpp
+++ b/src/Simulator/FloodyFluidSimulator.cpp
@@ -224,7 +224,14 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i
ItemTypeToString(NewBlock).c_str()
);
a_NearChunk->UnboundedRelSetBlock(a_RelX, a_RelY, a_RelZ, NewBlock, 0);
- m_World.BroadcastSoundEffect("random.fizz", a_RelX * 8, a_RelY * 8, a_RelZ * 8, 0.5f, 1.5f);
+
+ int BaseX = a_NearChunk->GetPosX() * cChunkDef::Width;
+ int BaseZ = a_NearChunk->GetPosZ() * cChunkDef::Width;
+
+ BaseX += a_RelX;
+ BaseZ += a_RelZ;
+
+ a_NearChunk->BroadcastSoundEffect("random.fizz", BaseX * 8, a_RelY * 8, BaseZ * 8, 0.5f, 1.5f);
return;
}
}
@@ -238,7 +245,14 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i
a_RelX, a_RelY, a_RelZ, ItemTypeToString(NewBlock).c_str()
);
a_NearChunk->UnboundedRelSetBlock(a_RelX, a_RelY, a_RelZ, NewBlock, 0);
- m_World.BroadcastSoundEffect("random.fizz", a_RelX * 8, a_RelY * 8, a_RelZ * 8, 0.5f, 1.5f);
+
+ int BaseX = a_NearChunk->GetPosX() * cChunkDef::Width;
+ int BaseZ = a_NearChunk->GetPosZ() * cChunkDef::Width;
+
+ BaseX += a_RelX;
+ BaseZ += a_RelZ;
+
+ a_NearChunk->BroadcastSoundEffect("random.fizz", BaseX * 8, a_RelY * 8, BaseZ * 8, 0.5f, 1.5f);
return;
}
}
diff --git a/src/Simulator/RedstoneSimulator.cpp b/src/Simulator/RedstoneSimulator.cpp
index 63e4f04a8..9328b9fcb 100644
--- a/src/Simulator/RedstoneSimulator.cpp
+++ b/src/Simulator/RedstoneSimulator.cpp
@@ -285,7 +285,7 @@ void cRedstoneSimulator::HandleRedstoneTorch(int a_BlockX, int a_BlockY, int a_B
if (AreCoordsPowered(X, Y, Z))
{
// There was a match, torch goes off
- m_World.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_TORCH_OFF, m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ));
+ m_World.SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_TORCH_OFF, m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ));
return;
}
@@ -335,7 +335,7 @@ void cRedstoneSimulator::HandleRedstoneTorch(int a_BlockX, int a_BlockY, int a_B
}
// Block torch on not powered, can be turned on again!
- m_World.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_TORCH_ON, m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ));
+ m_World.SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_TORCH_ON, m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ));
}
}
@@ -420,6 +420,7 @@ void cRedstoneSimulator::HandleRedstoneWire(int a_BlockX, int a_BlockY, int a_Bl
}
else
{
+ NIBBLETYPE MetaToSet = 0;
NIBBLETYPE MyMeta = m_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
int TimesMetaSmaller = 0, TimesFoundAWire = 0;
@@ -439,7 +440,7 @@ void cRedstoneSimulator::HandleRedstoneWire(int a_BlockX, int a_BlockY, int a_Bl
// >= to fix a bug where wires bordering each other with the same power level will appear (in terms of meta) to power each other, when they aren't actually in the powered list
if (SurroundMeta >= MyMeta)
{
- m_World.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, SurroundMeta - 1);
+ MetaToSet = SurroundMeta - 1; // To improve performance
}
}
@@ -459,6 +460,10 @@ void cRedstoneSimulator::HandleRedstoneWire(int a_BlockX, int a_BlockY, int a_Bl
m_World.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, 0);
return; // No need to process block power sets because self not powered
}
+ else
+ {
+ m_World.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, MetaToSet);
+ }
SetBlockPowered(a_BlockX, a_BlockY - 1, a_BlockZ, a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_WIRE); // Power block beneath
}
@@ -538,6 +543,37 @@ void cRedstoneSimulator::HandleRedstoneRepeater(int a_BlockX, int a_BlockY, int
{
if (!IsOn)
{
+ bool ShouldCreate = true;
+ // If repeater is not on already (and is POWERED), see if it is in repeater list, or has reached delay time
+ for (RepeatersDelayList::iterator itr = m_RepeatersDelayList.begin(); itr != m_RepeatersDelayList.end(); itr++)
+ {
+ if (itr->a_BlockPos.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ)))
+ {
+ if (itr->a_DelayTicks <= itr->a_ElapsedTicks) // Shouldn't need <=; just in case something happens
+ {
+ m_RepeatersDelayList.erase(itr);
+ ShouldCreate = false;
+ break; // Delay time reached, break straight out, and into the powering code
+ }
+ else
+ {
+ itr->a_ElapsedTicks++; // Increment elapsed ticks and quit
+ return;
+ }
+ }
+ }
+
+ if (ShouldCreate)
+ {
+ // Self not in list, add self to list
+ sRepeatersDelayList RC;
+ RC.a_BlockPos = Vector3i(a_BlockX, a_BlockY, a_BlockZ);
+ RC.a_DelayTicks = ((a_Meta & 0xC) >> 0x2) + 1; // Gets the top two bits (delay time), shifts them into the lower two bits, and adds one (meta 0 = 1 tick; 1 = 2 etc.)
+ RC.a_ElapsedTicks = 0;
+ m_RepeatersDelayList.push_back(RC);
+ return;
+ }
+
m_World.SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_REPEATER_ON, a_Meta); // Only set if not on; SetBlock otherwise server doesn't set it in time for SimulateChunk's invalidation
}
switch (a_Meta & 0x3) // We only want the direction (bottom) bits
@@ -572,7 +608,32 @@ void cRedstoneSimulator::HandleRedstoneRepeater(int a_BlockX, int a_BlockY, int
{
if (IsOn)
{
- m_World.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_REPEATER_OFF, a_Meta);
+ // If repeater is not off already (and is NOT POWERED), see if it is in repeater list, or has reached delay time
+ for (RepeatersDelayList::iterator itr = m_RepeatersDelayList.begin(); itr != m_RepeatersDelayList.end(); itr++)
+ {
+ if (itr->a_BlockPos.Equals(Vector3i(a_BlockX, a_BlockY, a_BlockZ)))
+ {
+ if (itr->a_DelayTicks <= itr->a_ElapsedTicks) // Shouldn't need <=; just in case something happens
+ {
+ m_RepeatersDelayList.erase(itr);
+ m_World.SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_REDSTONE_REPEATER_OFF, a_Meta);
+ return;
+ }
+ else
+ {
+ itr->a_ElapsedTicks++; // Increment elapsed ticks and quit
+ return;
+ }
+ }
+ }
+
+ // Self not in list, add self to list
+ sRepeatersDelayList RC;
+ RC.a_BlockPos = Vector3i(a_BlockX, a_BlockY, a_BlockZ);
+ RC.a_DelayTicks = ((a_Meta & 0xC) >> 0x2) + 1;
+ RC.a_ElapsedTicks = 0;
+ m_RepeatersDelayList.push_back(RC);
+ return;
}
}
}
diff --git a/src/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h
index e094150e8..1d85c0634 100644
--- a/src/Simulator/RedstoneSimulator.h
+++ b/src/Simulator/RedstoneSimulator.h
@@ -56,14 +56,23 @@ private:
Vector3i a_BlockPos;
bool WasLastStatePowered;
};
+
+ struct sRepeatersDelayList
+ {
+ Vector3i a_BlockPos;
+ short a_DelayTicks;
+ short a_ElapsedTicks;
+ };
typedef std::vector <sPoweredBlocks> PoweredBlocksList;
typedef std::vector <sLinkedPoweredBlocks> LinkedBlocksList;
typedef std::vector <sSimulatedPlayerToggleableList> SimulatedPlayerToggleableList;
+ typedef std::vector <sRepeatersDelayList> RepeatersDelayList;
PoweredBlocksList m_PoweredBlocks;
LinkedBlocksList m_LinkedPoweredBlocks;
SimulatedPlayerToggleableList m_SimulatedPlayerToggleableBlocks;
+ RepeatersDelayList m_RepeatersDelayList;
virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override;
diff --git a/src/World.cpp b/src/World.cpp
index eecd02027..564905d33 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1588,7 +1588,7 @@ bool cWorld::WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlock
void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_FlyAwaySpeed, bool IsPlayerCreated)
{
MTRand r1;
- a_FlyAwaySpeed /= 1000; // Pre-divide, so that we don't have to divide each time inside the loop
+ a_FlyAwaySpeed /= 100; // Pre-divide, so that we don't have to divide each time inside the loop
for (cItems::const_iterator itr = a_Pickups.begin(); itr != a_Pickups.end(); ++itr)
{
if (!IsValidItem(itr->m_ItemType))
@@ -1597,9 +1597,9 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
continue;
}
- float SpeedX = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500));
- float SpeedY = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500));
- float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500));
+ float SpeedX = (float)(a_FlyAwaySpeed * (r1.randInt(10) - 5));
+ float SpeedY = (float)(a_FlyAwaySpeed * r1.randInt(50));
+ float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(10) - 5));
cPickup * Pickup = new cPickup(
a_BlockX, a_BlockY, a_BlockZ,