summaryrefslogtreecommitdiffstats
path: root/source/Piston.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-06 22:04:58 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-06 22:04:58 +0200
commit28332c656712cc692ca8355a4f5e8c0c5012c60c (patch)
tree0e4bcf6ba99be50731d64b5add9c63bd8b1dec1a /source/Piston.cpp
parentRemoved a few debugging messages from the release builds. (diff)
downloadcuberite-28332c656712cc692ca8355a4f5e8c0c5012c60c.tar
cuberite-28332c656712cc692ca8355a4f5e8c0c5012c60c.tar.gz
cuberite-28332c656712cc692ca8355a4f5e8c0c5012c60c.tar.bz2
cuberite-28332c656712cc692ca8355a4f5e8c0c5012c60c.tar.lz
cuberite-28332c656712cc692ca8355a4f5e8c0c5012c60c.tar.xz
cuberite-28332c656712cc692ca8355a4f5e8c0c5012c60c.tar.zst
cuberite-28332c656712cc692ca8355a4f5e8c0c5012c60c.zip
Diffstat (limited to 'source/Piston.cpp')
-rw-r--r--source/Piston.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp
index a235da879..9aa09a56e 100644
--- a/source/Piston.cpp
+++ b/source/Piston.cpp
@@ -2,7 +2,6 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Piston.h"
-#include "Redstone.h"
#include "ChunkDef.h"
#include "Pickup.h"
#include "Item.h"
@@ -52,10 +51,9 @@ unsigned short cPiston::FirstPassthroughBlock( int pistonX, int pistonY, int pis
void cPiston::ExtendPiston( int pistx, int pisty, int pistz )
{
- char pistonBlock = m_World->GetBlock( pistx, pisty, pistz );
- char pistonMeta = m_World->GetBlockMeta( pistx, pisty, pistz );
+ BLOCKTYPE pistonBlock = m_World->GetBlock( pistx, pisty, pistz );
+ NIBBLETYPE pistonMeta = m_World->GetBlockMeta( pistx, pisty, pistz );
char isSticky = (char)(pistonBlock == E_BLOCK_STICKY_PISTON) * 8;
- bool recalc = false;
if ( (pistonMeta & 0x8) == 0x0 ) // only extend if piston is not already extended
{
unsigned short dist = FirstPassthroughBlock(pistx, pisty, pistz, pistonMeta);
@@ -71,7 +69,6 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz )
{
Handler->DropBlock(m_World, pistx, pisty, pistz);
}
- recalc = true;
}
int oldx = pistx, oldy = pisty, oldz = pistz;
char currBlockMeta;
@@ -95,13 +92,6 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz )
AddDir(extx, exty, extz, pistonMeta & 7, 1)
m_World->SetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, isSticky + pistonMeta & 7);
-
- if (recalc)
- {
- cRedstone Redstone(m_World);
- Redstone.ChangeRedstone(extx, exty, extz, false); // recalculate redstone around current device
- Redstone.ChangeRedstone(pistx, pisty, pistz, false); // recalculate redstone around current device
- }
}
}