diff options
author | luksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-26 11:03:34 +0100 |
---|---|---|
committer | luksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-26 11:03:34 +0100 |
commit | eb7131bd126b06c348313de6ab07d5d59f7c79c0 (patch) | |
tree | 87516638a71e7105b318fd17c15b2be143f622c0 | |
parent | CryptoPP patches from xcb567 (diff) | |
download | cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.gz cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.bz2 cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.lz cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.xz cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.tar.zst cuberite-eb7131bd126b06c348313de6ab07d5d59f7c79c0.zip |
-rw-r--r-- | VC2008/MCServer.vcproj | 4 | ||||
-rw-r--r-- | source/Blocks/BlockGlass.h | 26 | ||||
-rw-r--r-- | source/Blocks/BlockHandler.cpp | 2 | ||||
-rw-r--r-- | source/Blocks/BlockOre.h | 2 | ||||
-rw-r--r-- | source/Blocks/BlockRail.h | 3 | ||||
-rw-r--r-- | source/Defines.h | 4 | ||||
-rw-r--r-- | source/Player.cpp | 2 |
7 files changed, 38 insertions, 5 deletions
diff --git a/VC2008/MCServer.vcproj b/VC2008/MCServer.vcproj index 6d7054b1b..9f9132cb4 100644 --- a/VC2008/MCServer.vcproj +++ b/VC2008/MCServer.vcproj @@ -1819,6 +1819,10 @@ >
</File>
<File
+ RelativePath="..\source\Blocks\BlockGlass.h"
+ >
+ </File>
+ <File
RelativePath="..\source\blocks\BlockGlowstone.h"
>
</File>
diff --git a/source/Blocks/BlockGlass.h b/source/Blocks/BlockGlass.h new file mode 100644 index 000000000..d5147af96 --- /dev/null +++ b/source/Blocks/BlockGlass.h @@ -0,0 +1,26 @@ +
+#pragma once
+
+#include "BlockHandler.h"
+
+
+
+
+
+class cBlockGlassHandler :
+ public cBlockHandler
+{
+public:
+ cBlockGlassHandler(BLOCKTYPE a_BlockType)
+ : cBlockHandler(a_BlockType)
+ {
+ }
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ }
+} ;
+
+
+
+
diff --git a/source/Blocks/BlockHandler.cpp b/source/Blocks/BlockHandler.cpp index 53e9c4a06..3f63de89f 100644 --- a/source/Blocks/BlockHandler.cpp +++ b/source/Blocks/BlockHandler.cpp @@ -46,6 +46,7 @@ #include "BlockFarmland.h"
#include "BlockMycelium.h"
#include "BlockRail.h"
+#include "BlockGlass.h"
@@ -104,6 +105,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) case E_BLOCK_FURNACE: return new cBlockFurnaceHandler (a_BlockType);
case E_BLOCK_GLOWSTONE: return new cBlockGlowstoneHandler (a_BlockType);
case E_BLOCK_GOLD_ORE: return new cBlockOreHandler (a_BlockType);
+ case E_BLOCK_GLASS: return new cBlockGlassHandler (a_BlockType);
case E_BLOCK_GRASS: return new cBlockDirtHandler (a_BlockType);
case E_BLOCK_GRAVEL: return new cBlockGravelHandler (a_BlockType);
case E_BLOCK_ICE: return new cBlockIceHandler (a_BlockType);
diff --git a/source/Blocks/BlockOre.h b/source/Blocks/BlockOre.h index 50f5a88e2..1bfd8d17c 100644 --- a/source/Blocks/BlockOre.h +++ b/source/Blocks/BlockOre.h @@ -20,7 +20,7 @@ public: virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
- short ItemType = E_ITEM_EMPTY;
+ short ItemType = m_BlockType;
char Count = 1;
short Meta = 0;
diff --git a/source/Blocks/BlockRail.h b/source/Blocks/BlockRail.h index fb2000884..24947c0bc 100644 --- a/source/Blocks/BlockRail.h +++ b/source/Blocks/BlockRail.h @@ -58,7 +58,8 @@ public: virtual void OnNeighborChanged(cWorld *a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override
{
- if(IsUnstable(a_World, a_BlockX, a_BlockY, a_BlockZ))
+ char Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
+ if(IsUnstable(a_World, a_BlockX, a_BlockY, a_BlockZ) && Meta != FindMeta(a_World, a_BlockX, a_BlockY, a_BlockZ))
a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, FindMeta(a_World, a_BlockX, a_BlockY, a_BlockZ));
}
diff --git a/source/Defines.h b/source/Defines.h index 1844d7872..18d495a53 100644 --- a/source/Defines.h +++ b/source/Defines.h @@ -47,7 +47,7 @@ enum inline bool IsValidBlock( int a_BlockType ) //tolua_export { //tolua_export if( a_BlockType > -1 && - a_BlockType <= 126 && //items to 109 are valid for Beta1.8.1.. 1.2.5 is up to 126 + a_BlockType <= 145 && //items to 109 are valid for Beta1.8.1.. 1.2.5 is up to 126 //a_BlockType != 29 && allow pistons //a_BlockType != 33 && allow pistons a_BlockType != 34 && @@ -66,7 +66,7 @@ inline bool IsValidBlock( int a_BlockType ) //tolua_export // Changed to fit the style ;) inline bool IsValidItem( int a_ItemID ) //tolua_export { //tolua_export - if( (a_ItemID >= 256 && a_ItemID <= 388) + if( (a_ItemID >= 256 && a_ItemID <= 400) || (a_ItemID >= 2256 && a_ItemID <= 2267) ) { return true; diff --git a/source/Player.cpp b/source/Player.cpp index cf9e4be99..cd4c6d11c 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -290,7 +290,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround) if (m_bTouchGround) { float Dist = (float)(m_LastGroundHeight - m_Pos.y); - int Damage = (int)(Dist - 4.f); + int Damage = (int)(Dist - 3.f); if (Damage > 0) { TakeDamage(Damage, 0); |