diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-13 18:44:01 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-13 18:44:01 +0200 |
commit | 27b400adf8457d2bed2b492ef01f9e6f68463a9d (patch) | |
tree | f049869bc254c1cfb486d6551f50e0dada7a6946 | |
parent | Attempt three (diff) | |
download | cuberite-27b400adf8457d2bed2b492ef01f9e6f68463a9d.tar cuberite-27b400adf8457d2bed2b492ef01f9e6f68463a9d.tar.gz cuberite-27b400adf8457d2bed2b492ef01f9e6f68463a9d.tar.bz2 cuberite-27b400adf8457d2bed2b492ef01f9e6f68463a9d.tar.lz cuberite-27b400adf8457d2bed2b492ef01f9e6f68463a9d.tar.xz cuberite-27b400adf8457d2bed2b492ef01f9e6f68463a9d.tar.zst cuberite-27b400adf8457d2bed2b492ef01f9e6f68463a9d.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Piston.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp index 0d436924c..0ebebfc9b 100644 --- a/source/Piston.cpp +++ b/source/Piston.cpp @@ -19,6 +19,8 @@ #endif +//Athar from http://www.cplusplus.com/forum/unices/60161/ helped with the sleep code. + extern bool g_BlockPistonBreakable[]; @@ -129,7 +131,7 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz ) #ifdef __WIN32__ Sleep(100); #else - usleep(static_cast<useconds_t>(100)*1000); //or use nanosleep on platforms where it's needed + usleep(static_cast<useconds_t>(100)*1000); #endif m_World->SetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, isSticky + pistonMeta & 7); @@ -179,7 +181,7 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz ) #ifdef __WIN32__ Sleep(100); #else - usleep(static_cast<useconds_t>(100)*1000); //or use nanosleep on platforms where it's needed + usleep(static_cast<useconds_t>(100)*1000); #endif m_World->SetBlock(pistx, pisty, pistz, tempblock, tempmeta); @@ -190,7 +192,7 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz ) #ifdef __WIN32__ Sleep(100); #else - usleep(static_cast<useconds_t>(100)*1000); //or use nanosleep on platforms where it's needed + usleep(static_cast<useconds_t>(100)*1000); #endif m_World->SetBlock(pistx, pisty, pistz, E_BLOCK_AIR, 0); |