Fixes #57
This commit is contained in:
parent
0ac24a98e4
commit
9ec248eaa0
@ -122,6 +122,14 @@ void cPiston::ExtendPiston( int pistx, int pisty, int pistz )
|
||||
|
||||
AddDir(extx, exty, extz, pistonMeta & 7, 1)
|
||||
|
||||
#ifdef _WIN32 // Pause for 0.1 seconds to allow client animation to run
|
||||
#include <windows.h>
|
||||
Sleep(100);
|
||||
#else
|
||||
#include <unistd.h>
|
||||
usleep(100 * 1000); // takes microseconds
|
||||
#endif
|
||||
|
||||
m_World->SetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, isSticky + pistonMeta & 7);
|
||||
}
|
||||
|
||||
@ -166,11 +174,27 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz )
|
||||
// These cannot be moved by the sticky piston, bail out
|
||||
return;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
Sleep(100);
|
||||
#else
|
||||
#include <unistd.h>
|
||||
usleep(100 * 1000); // takes microseconds
|
||||
#endif
|
||||
|
||||
m_World->SetBlock(pistx, pisty, pistz, tempblock, tempmeta);
|
||||
m_World->SetBlock(tempx, tempy, tempz, E_BLOCK_AIR, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
Sleep(100);
|
||||
#else
|
||||
#include <unistd.h>
|
||||
usleep(100 * 1000); // takes microseconds
|
||||
#endif
|
||||
|
||||
m_World->SetBlock(pistx, pisty, pistz, E_BLOCK_AIR, 0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user