summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FloodyFluidSimulator.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-12-10 15:19:38 +0100
committerMattes D <github@xoft.cz>2013-12-10 15:19:38 +0100
commit9cfd8f69105b57495028bc8441ad6075f43401c7 (patch)
treee0bc682ffb03d53a513e5a0243c488f0461d0b9a /src/Simulator/FloodyFluidSimulator.cpp
parentupdate d the contrib file. (diff)
parentReadded initial line (diff)
downloadcuberite-9cfd8f69105b57495028bc8441ad6075f43401c7.tar
cuberite-9cfd8f69105b57495028bc8441ad6075f43401c7.tar.gz
cuberite-9cfd8f69105b57495028bc8441ad6075f43401c7.tar.bz2
cuberite-9cfd8f69105b57495028bc8441ad6075f43401c7.tar.lz
cuberite-9cfd8f69105b57495028bc8441ad6075f43401c7.tar.xz
cuberite-9cfd8f69105b57495028bc8441ad6075f43401c7.tar.zst
cuberite-9cfd8f69105b57495028bc8441ad6075f43401c7.zip
Diffstat (limited to 'src/Simulator/FloodyFluidSimulator.cpp')
-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;
}
}