summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FloodyFluidSimulator.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-10 17:53:46 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-10 17:53:46 +0100
commit5d2311bcff631bcb9849754318b3469af6f7e4fe (patch)
tree79cb23ac444cb09a4b7b69858651d453dc6ac1a8 /src/Simulator/FloodyFluidSimulator.cpp
parentmoved deafult action into deafult clause at src/Generating/DistortedHeightmap.cpp line 741 (diff)
parentMerge pull request #412 from mc-server/fixes (diff)
downloadcuberite-5d2311bcff631bcb9849754318b3469af6f7e4fe.tar
cuberite-5d2311bcff631bcb9849754318b3469af6f7e4fe.tar.gz
cuberite-5d2311bcff631bcb9849754318b3469af6f7e4fe.tar.bz2
cuberite-5d2311bcff631bcb9849754318b3469af6f7e4fe.tar.lz
cuberite-5d2311bcff631bcb9849754318b3469af6f7e4fe.tar.xz
cuberite-5d2311bcff631bcb9849754318b3469af6f7e4fe.tar.zst
cuberite-5d2311bcff631bcb9849754318b3469af6f7e4fe.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;
}
}