Fixed piston sound effect (when unable to extend)
This commit is contained in:
parent
ced076c561
commit
78f45e0bd1
@ -71,9 +71,6 @@ void cPiston::ExtendPiston(int pistx, int pisty, int pistz)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_World->BroadcastBlockAction(pistx, pisty, pistz, 0, pistonMeta, pistonBlock);
|
|
||||||
m_World->BroadcastSoundEffect("tile.piston.out", pistx * 8, pisty * 8, pistz * 8, 0.5f, 0.7f);
|
|
||||||
|
|
||||||
int dist = FirstPassthroughBlock(pistx, pisty, pistz, pistonMeta);
|
int dist = FirstPassthroughBlock(pistx, pisty, pistz, pistonMeta);
|
||||||
if (dist < 0)
|
if (dist < 0)
|
||||||
{
|
{
|
||||||
@ -81,6 +78,9 @@ void cPiston::ExtendPiston(int pistx, int pisty, int pistz)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_World->BroadcastBlockAction(pistx, pisty, pistz, 0, pistonMeta, pistonBlock);
|
||||||
|
m_World->BroadcastSoundEffect("tile.piston.out", pistx * 8, pisty * 8, pistz * 8, 0.5f, 0.7f);
|
||||||
|
|
||||||
// Drop the breakable block in the line, if appropriate:
|
// Drop the breakable block in the line, if appropriate:
|
||||||
AddDir(pistx, pisty, pistz, pistonMeta, dist + 1); // "pist" now at the breakable / empty block
|
AddDir(pistx, pisty, pistz, pistonMeta, dist + 1); // "pist" now at the breakable / empty block
|
||||||
BLOCKTYPE currBlock;
|
BLOCKTYPE currBlock;
|
||||||
|
Loading…
Reference in New Issue
Block a user