From 0905369fc721fe0057e9e140777dc93f938646c6 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 10 Dec 2013 00:29:59 +0000 Subject: [PATCH] Fixed Floody lava to stone fizzle --- ...ayerAnimation.lua => OnEntityAnimation.lua} | 0 src/Simulator/FloodyFluidSimulator.cpp | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) rename MCServer/Plugins/APIDump/Hooks/{OnPlayerAnimation.lua => OnEntityAnimation.lua} (100%) diff --git a/MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua b/MCServer/Plugins/APIDump/Hooks/OnEntityAnimation.lua similarity index 100% rename from MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua rename to MCServer/Plugins/APIDump/Hooks/OnEntityAnimation.lua 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; } }