summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-10 01:29:59 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-10 01:29:59 +0100
commit0905369fc721fe0057e9e140777dc93f938646c6 (patch)
tree2ceccf847afa2dbe82f8c62882bcbd796c47e40d /src
parentAdded repeater delays (diff)
downloadcuberite-0905369fc721fe0057e9e140777dc93f938646c6.tar
cuberite-0905369fc721fe0057e9e140777dc93f938646c6.tar.gz
cuberite-0905369fc721fe0057e9e140777dc93f938646c6.tar.bz2
cuberite-0905369fc721fe0057e9e140777dc93f938646c6.tar.lz
cuberite-0905369fc721fe0057e9e140777dc93f938646c6.tar.xz
cuberite-0905369fc721fe0057e9e140777dc93f938646c6.tar.zst
cuberite-0905369fc721fe0057e9e140777dc93f938646c6.zip
Diffstat (limited to 'src')
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp
index d204a1f8b..58e5d614b 100644
--- a/src/Simulator/FloodyFluidSimulator.cpp
+++ b/src/Simulator/FloodyFluidSimulator.cpp
@@ -224,7 +224,14 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i
ItemTypeToString(NewBlock).c_str()
);
a_NearChunk->UnboundedRelSetBlock(a_RelX, a_RelY, a_RelZ, NewBlock, 0);
- m_World.BroadcastSoundEffect("random.fizz", a_RelX * 8, a_RelY * 8, a_RelZ * 8, 0.5f, 1.5f);
+
+ int BaseX = a_NearChunk->GetPosX() * cChunkDef::Width;
+ int BaseZ = a_NearChunk->GetPosZ() * cChunkDef::Width;
+
+ BaseX += a_RelX;
+ BaseZ += a_RelZ;
+
+ a_NearChunk->BroadcastSoundEffect("random.fizz", BaseX * 8, a_RelY * 8, BaseZ * 8, 0.5f, 1.5f);
return;
}
}
@@ -238,7 +245,14 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i
a_RelX, a_RelY, a_RelZ, ItemTypeToString(NewBlock).c_str()
);
a_NearChunk->UnboundedRelSetBlock(a_RelX, a_RelY, a_RelZ, NewBlock, 0);
- m_World.BroadcastSoundEffect("random.fizz", a_RelX * 8, a_RelY * 8, a_RelZ * 8, 0.5f, 1.5f);
+
+ int BaseX = a_NearChunk->GetPosX() * cChunkDef::Width;
+ int BaseZ = a_NearChunk->GetPosZ() * cChunkDef::Width;
+
+ BaseX += a_RelX;
+ BaseZ += a_RelZ;
+
+ a_NearChunk->BroadcastSoundEffect("random.fizz", BaseX * 8, a_RelY * 8, BaseZ * 8, 0.5f, 1.5f);
return;
}
}