From 27b400adf8457d2bed2b492ef01f9e6f68463a9d Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 13 Aug 2013 17:44:01 +0100 Subject: Credits --- source/Piston.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/Piston.cpp') 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(100)*1000); //or use nanosleep on platforms where it's needed + usleep(static_cast(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(100)*1000); //or use nanosleep on platforms where it's needed + usleep(static_cast(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(100)*1000); //or use nanosleep on platforms where it's needed + usleep(static_cast(100)*1000); #endif m_World->SetBlock(pistx, pisty, pistz, E_BLOCK_AIR, 0); -- cgit v1.2.3