From 28332c656712cc692ca8355a4f5e8c0c5012c60c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 6 Oct 2012 20:04:58 +0000 Subject: Completely removed the old (buggy) redstone simulator. git-svn-id: http://mc-server.googlecode.com/svn/trunk@937 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Piston.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'source/Piston.cpp') 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 - } } } -- cgit v1.2.3