diff options
Diffstat (limited to '')
-rw-r--r-- | source/cPiston.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/cPiston.cpp b/source/cPiston.cpp index cc6d48ca9..9c4363eeb 100644 --- a/source/cPiston.cpp +++ b/source/cPiston.cpp @@ -88,9 +88,7 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz ) { Action.m_Byte1 = 0;
Action.m_Byte2 = pistonMeta;
-
- cChunkPtr Chunk = m_World->GetChunkOfBlock(pistx, pisty, pistz);
- Chunk->Broadcast( Action );
+ m_World->BroadcastToChunkOfBlock(pistx, pisty, pistz, &Action);
m_World->FastSetBlock( pistx, pisty, pistz, pistonBlock, pistonMeta | 8 );
int extx = pistx;
@@ -106,9 +104,7 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz ) { Redstone.ChangeRedstone( extx, exty, extz, false ); //recalculate redstone around current device.
Redstone.ChangeRedstone( pistx, pisty, pistz, false ); //recalculate redstone around current device.
}
-
}
-
}
@@ -131,8 +127,7 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz ) Action.m_PosZ = (int)pistz;
Action.m_Byte1 = 1;
Action.m_Byte2 = pistonMeta & ~(8);
- cChunkPtr Chunk = m_World->GetChunkOfBlock(pistx, pisty, pistz);
- Chunk->Broadcast( Action );
+ m_World->BroadcastToChunkOfBlock(pistx, pisty, pistz, &Action );
m_World->FastSetBlock( pistx, pisty, pistz, pistonBlock, pistonMeta & ~(8) );
AddDir( pistx, pisty, pistz, pistonMeta & 7, 1 )
@@ -160,4 +155,8 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz ) m_World->SetBlock( pistx, pisty, pistz, E_BLOCK_AIR, 0 );
}
}
-}
\ No newline at end of file +}
+
+
+
+
|