summaryrefslogtreecommitdiffstats
path: root/source/cRedstone.h
diff options
context:
space:
mode:
authoradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-04 06:17:46 +0100
committeradmin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-04 06:17:46 +0100
commitdf976c359054ade18a6235787c72ab4b521b703d (patch)
tree537fd9a958546455655d52653440fafb808b3f1a /source/cRedstone.h
parentAdded (Probably incorrectly) a cRedstone class. Also, palcing a redstone torch will recursively light any redstone wire it's connected to. Removing a torch from an active wire will unlight the entire length. Class needs to be updated to make use of non deprecated function. Current deprecated function warning drastically slows redstone performance. (diff)
downloadcuberite-df976c359054ade18a6235787c72ab4b521b703d.tar
cuberite-df976c359054ade18a6235787c72ab4b521b703d.tar.gz
cuberite-df976c359054ade18a6235787c72ab4b521b703d.tar.bz2
cuberite-df976c359054ade18a6235787c72ab4b521b703d.tar.lz
cuberite-df976c359054ade18a6235787c72ab4b521b703d.tar.xz
cuberite-df976c359054ade18a6235787c72ab4b521b703d.tar.zst
cuberite-df976c359054ade18a6235787c72ab4b521b703d.zip
Diffstat (limited to 'source/cRedstone.h')
-rw-r--r--source/cRedstone.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/source/cRedstone.h b/source/cRedstone.h
index abfc5f2aa..b4f8e7eed 100644
--- a/source/cRedstone.h
+++ b/source/cRedstone.h
@@ -29,80 +29,3 @@ void ChangeRedstoneTorch( int, int, int, bool );
cWorld* m_World;
};
-/*
-cRedstone::cRedstone( cWorld* a_World )
- :m_World ( a_World )
-{
-
-}
-
-void cRedstone::ChangeRedstoneTorch( int fillx, int filly, int fillz, bool added )
-{
- char metadata = 0;
- if (added) {
- metadata = 15;
- } else {
- metadata = 0;
- }
- if ( ( m_World->GetWorld()->GetBlock( fillx+1, filly, fillz ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx+1, filly, fillz, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx-1, filly, fillz ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx-1, filly, fillz, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx, filly, fillz+1 ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx, filly, fillz+1, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx, filly, fillz-1 ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx, filly, fillz-1, metadata );
- }
-
- if ( ((int)m_World->GetWorld()->GetBlock( fillx+1, filly, fillz ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx+1, filly-1, fillz, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx-1, filly, fillz ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx-1, filly-1, fillz, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx, filly, fillz+1 ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx, filly-1, fillz+1, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx, filly, fillz-1 ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx, filly-1, fillz-1, metadata );
- }
-
- if ( ((int)m_World->GetWorld()->GetBlock( fillx+1, filly, fillz ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx+1, filly+1, fillz, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx-1, filly, fillz ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx-1, filly+1, fillz, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx, filly, fillz+1 ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx, filly+1, fillz+1, metadata );
- }
- if ( ((int)m_World->GetWorld()->GetBlock( fillx, filly, fillz-1 ) == E_BLOCK_REDSTONE_WIRE) ) {
- LightRedstone( fillx, filly+1, fillz-1, metadata );
- }
-}
-
-void cRedstone::LightRedstone( int fillx, int filly, int fillz, char metadata)
-{
- if ( ( (int)m_World->GetWorld()->GetBlock( fillx, filly, fillz ) == E_BLOCK_REDSTONE_WIRE) && ( (int)m_World->GetWorld()->GetBlockMeta( fillx, filly, fillz) != metadata ) ) {
- m_World->GetWorld()->SetBlock( fillx, filly, fillz, (char)E_BLOCK_REDSTONE_WIRE, metadata );
- LightRedstone(fillx-1,filly,fillz,metadata);
- LightRedstone(fillx+1,filly,fillz,metadata);
- LightRedstone(fillx,filly,fillz-1,metadata);
- LightRedstone(fillx,filly,fillz+1,metadata);
-
- LightRedstone(fillx-1,filly-1,fillz,metadata);
- LightRedstone(fillx+1,filly-1,fillz,metadata);
- LightRedstone(fillx,filly-1,fillz-1,metadata);
- LightRedstone(fillx,filly-1,fillz+1,metadata);
-
- LightRedstone(fillx-1,filly+1,fillz,metadata);
- LightRedstone(fillx+1,filly+1,fillz,metadata);
- LightRedstone(fillx,filly+1,fillz-1,metadata);
- LightRedstone(fillx,filly+1,fillz+1,metadata);
- }
-
-}
-*/