From 907ba15fe208f6a8ad37f35652ae3ceac6bb39e9 Mon Sep 17 00:00:00 2001 From: "admin@omencraft.com" Date: Mon, 7 Nov 2011 18:19:38 +0000 Subject: Added Sebi's changes to pistons and item drops. git-svn-id: http://mc-server.googlecode.com/svn/trunk@72 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorld.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'source/cWorld.cpp') diff --git a/source/cWorld.cpp b/source/cWorld.cpp index 0601746e8..c80ccbe9f 100644 --- a/source/cWorld.cpp +++ b/source/cWorld.cpp @@ -56,6 +56,7 @@ char g_BlockLightValue[128]; char g_BlockSpreadLightFalloff[128]; bool g_BlockTransparent[128]; bool g_BlockOneHitDig[128]; +bool g_BlockPistonBreakable[128]; #define RECI_RAND_MAX (1.f/RAND_MAX) inline float fRadRand( float a_Radius ) @@ -197,6 +198,7 @@ cWorld::cWorld( const char* a_WorldName ) memset( g_BlockSpreadLightFalloff, 0xf, 128 ); // 0xf means total falloff memset( g_BlockTransparent, 0x0, 128 ); memset( g_BlockOneHitDig, 0x0, 128 ); + memset( g_BlockPistonBreakable, 0x0, 128 ); // Emissive blocks g_BlockLightValue[ E_BLOCK_TORCH ] = 14; @@ -246,6 +248,42 @@ cWorld::cWorld( const char* a_WorldName ) g_BlockOneHitDig[ E_BLOCK_REDSTONE_REPEATER_ON ] = true; g_BlockOneHitDig[ E_BLOCK_LOCKED_CHEST ] = true; + // Blocks that breaks when pushed by piston + g_BlockPistonBreakable[ E_BLOCK_AIR ] = true; + g_BlockPistonBreakable[ E_BLOCK_STATIONARY_WATER ] = true; + g_BlockPistonBreakable[ E_BLOCK_WATER ] = true; + g_BlockPistonBreakable[ E_BLOCK_STATIONARY_LAVA ] = true; + g_BlockPistonBreakable[ E_BLOCK_LAVA ] = true; + g_BlockPistonBreakable[ E_BLOCK_BED ] = true; + g_BlockPistonBreakable[ E_BLOCK_COBWEB ] = true; + g_BlockPistonBreakable[ E_BLOCK_TALL_GRASS ] = true; + g_BlockPistonBreakable[ E_BLOCK_YELLOW_FLOWER ] = true; + g_BlockPistonBreakable[ E_BLOCK_BROWN_MUSHROOM ] = true; + g_BlockPistonBreakable[ E_BLOCK_RED_ROSE ] = true; + g_BlockPistonBreakable[ E_BLOCK_RED_MUSHROOM ] = true; + g_BlockPistonBreakable[ E_BLOCK_DEAD_BUSH ] = true; + g_BlockPistonBreakable[ E_BLOCK_TORCH ] = true; + g_BlockPistonBreakable[ E_BLOCK_FIRE ] = true; + g_BlockPistonBreakable[ E_BLOCK_REDSTONE_WIRE ] = true; + g_BlockPistonBreakable[ E_BLOCK_CROPS ] = true; + g_BlockPistonBreakable[ E_BLOCK_LADDER ] = true; + g_BlockPistonBreakable[ E_BLOCK_WOODEN_DOOR ] = true; + g_BlockPistonBreakable[ E_BLOCK_IRON_DOOR ] = true; + g_BlockPistonBreakable[ E_BLOCK_LEVER ] = true; + g_BlockPistonBreakable[ E_BLOCK_STONE_BUTTON ] = true; + g_BlockPistonBreakable[ E_BLOCK_REDSTONE_TORCH_ON ] = true; + g_BlockPistonBreakable[ E_BLOCK_REDSTONE_TORCH_OFF ]= true; + g_BlockPistonBreakable[ E_BLOCK_SNOW ] = true; + g_BlockPistonBreakable[ E_BLOCK_REEDS ] = true; + g_BlockPistonBreakable[ E_BLOCK_PUMPKIN_STEM ] = true; + g_BlockPistonBreakable[ E_BLOCK_MELON_STEM ] = true; + g_BlockPistonBreakable[ E_BLOCK_MELON ] = true; + g_BlockPistonBreakable[ E_BLOCK_PUMPKIN ] = true; + g_BlockPistonBreakable[ E_BLOCK_JACK_O_LANTERN ] = true; + g_BlockPistonBreakable[ E_BLOCK_VINES ] = true; + g_BlockPistonBreakable[ E_BLOCK_STONE_PRESSURE_PLATE ] = true; + g_BlockPistonBreakable[ E_BLOCK_WOODEN_PRESSURE_PLATE ] = true; + } void cWorld::InitializeSpawn() -- cgit v1.2.3