Attempt three
This is extremely embarrassing...
This commit is contained in:
parent
a322bb275f
commit
dd6450c2a9
@ -12,7 +12,11 @@
|
|||||||
#include "Server.h"
|
#include "Server.h"
|
||||||
#include "Blocks/BlockHandler.h"
|
#include "Blocks/BlockHandler.h"
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -122,12 +126,10 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz )
|
|||||||
|
|
||||||
AddDir(extx, exty, extz, pistonMeta & 7, 1)
|
AddDir(extx, exty, extz, pistonMeta & 7, 1)
|
||||||
|
|
||||||
#ifdef _WIN32 // Pause for 0.1 seconds to allow client animation to run
|
#ifdef __WIN32__
|
||||||
#include <windows.h>
|
Sleep(100);
|
||||||
Sleep(100);
|
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
usleep(static_cast<useconds_t>(100)*1000); //or use nanosleep on platforms where it's needed
|
||||||
sleep(0.1);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_World->SetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, isSticky + pistonMeta & 7);
|
m_World->SetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, isSticky + pistonMeta & 7);
|
||||||
@ -174,12 +176,10 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz )
|
|||||||
// These cannot be moved by the sticky piston, bail out
|
// These cannot be moved by the sticky piston, bail out
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef _WIN32
|
#ifdef __WIN32__
|
||||||
#include <windows.h>
|
Sleep(100);
|
||||||
Sleep(100);
|
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
usleep(static_cast<useconds_t>(100)*1000); //or use nanosleep on platforms where it's needed
|
||||||
sleep(0.1);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_World->SetBlock(pistx, pisty, pistz, tempblock, tempmeta);
|
m_World->SetBlock(pistx, pisty, pistz, tempblock, tempmeta);
|
||||||
@ -187,12 +187,10 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef __WIN32__
|
||||||
#include <windows.h>
|
Sleep(100);
|
||||||
Sleep(100);
|
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
usleep(static_cast<useconds_t>(100)*1000); //or use nanosleep on platforms where it's needed
|
||||||
sleep(0.1);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_World->SetBlock(pistx, pisty, pistz, E_BLOCK_AIR, 0);
|
m_World->SetBlock(pistx, pisty, pistz, E_BLOCK_AIR, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user