summaryrefslogtreecommitdiffstats
path: root/source/Piston.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-14 12:44:02 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-14 12:44:02 +0200
commit303b1a9c45cb74a656c9a099d669c89b92e74098 (patch)
tree06e472545ade2601edd300d8160dce1900b0084f /source/Piston.cpp
parentYET ANOTHER ERROR >:( (diff)
downloadcuberite-303b1a9c45cb74a656c9a099d669c89b92e74098.tar
cuberite-303b1a9c45cb74a656c9a099d669c89b92e74098.tar.gz
cuberite-303b1a9c45cb74a656c9a099d669c89b92e74098.tar.bz2
cuberite-303b1a9c45cb74a656c9a099d669c89b92e74098.tar.lz
cuberite-303b1a9c45cb74a656c9a099d669c89b92e74098.tar.xz
cuberite-303b1a9c45cb74a656c9a099d669c89b92e74098.tar.zst
cuberite-303b1a9c45cb74a656c9a099d669c89b92e74098.zip
Diffstat (limited to 'source/Piston.cpp')
-rw-r--r--source/Piston.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp
index 161f2b38c..d75cd4989 100644
--- a/source/Piston.cpp
+++ b/source/Piston.cpp
@@ -12,11 +12,13 @@
#include "Server.h"
#include "Blocks/BlockHandler.h"
+/*
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
+*/
//Athar from http://www.cplusplus.com/forum/unices/60161/ helped with the sleep code.
@@ -128,11 +130,13 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz )
AddDir(extx, exty, extz, pistonMeta & 7, 1)
+ /*
#ifdef _WIN32
Sleep(100);
#else
usleep(static_cast<useconds_t>(100)*1000);
#endif
+ */
m_World->SetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, isSticky + pistonMeta & 7);
}
@@ -178,22 +182,26 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz )
// These cannot be moved by the sticky piston, bail out
return;
}
+ /*
#ifdef _WIN32
Sleep(100);
#else
usleep(static_cast<useconds_t>(100)*1000);
#endif
+ */
m_World->SetBlock(pistx, pisty, pistz, tempblock, tempmeta);
m_World->SetBlock(tempx, tempy, tempz, E_BLOCK_AIR, 0);
}
else
{
+ /*
#ifdef _WIN32
Sleep(100);
#else
usleep(static_cast<useconds_t>(100)*1000);
#endif
+ */
m_World->SetBlock(pistx, pisty, pistz, E_BLOCK_AIR, 0);
}