summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-09-19 16:12:54 +0200
committerpeterbell10 <peterbell10@live.co.uk>2017-09-19 16:12:54 +0200
commit30c8470a524f5d09f157d5c1c59eb72c205d5085 (patch)
tree38547152d6e7f4c3c9c2a5c1165f7d8bda52b8c8 /src/Blocks
parentcRoot: Make PollPeriod representation 32 bit (#4030) (diff)
downloadcuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.gz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.bz2
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.lz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.xz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.zst
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockButton.h4
-rw-r--r--src/Blocks/BlockFence.h2
-rw-r--r--src/Blocks/BlockLever.h2
-rw-r--r--src/Blocks/BlockPiston.cpp8
-rw-r--r--src/Blocks/BroadcastInterface.h2
5 files changed, 9 insertions, 9 deletions
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h
index 808c271b3..079f461ab 100644
--- a/src/Blocks/BlockButton.h
+++ b/src/Blocks/BlockButton.h
@@ -35,7 +35,7 @@ public:
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta, false);
a_WorldInterface.WakeUpSimulators({a_BlockX, a_BlockY, a_BlockZ});
- a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("block.stone_button.click_on", x, y, z, 0.5f, 0.6f);
+ a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("block.stone_button.click_on", {x, y, z}, 0.5f, 0.6f);
// Queue a button reset (unpress)
auto TickDelay = (m_BlockType == E_BLOCK_STONE_BUTTON) ? 20 : 30;
@@ -46,7 +46,7 @@ public:
// Block hasn't change in the meantime; set its meta
a_World.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_World.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) & 0x07, false);
a_World.WakeUpSimulators({a_BlockX, a_BlockY, a_BlockZ});
- a_World.BroadcastSoundEffect("block.stone_button.click_off", x, y, z, 0.5f, 0.5f);
+ a_World.BroadcastSoundEffect("block.stone_button.click_off", {x, y, z}, 0.5f, 0.5f);
}
}
);
diff --git a/src/Blocks/BlockFence.h b/src/Blocks/BlockFence.h
index 63390cd37..1cccaa710 100644
--- a/src/Blocks/BlockFence.h
+++ b/src/Blocks/BlockFence.h
@@ -101,7 +101,7 @@ public:
{
return false;
}
- a_Player.GetWorld()->BroadcastSoundEffect("entity.leashknot.place", a_Player.GetPosX(), a_Player.GetPosY(), a_Player.GetPosZ(), 1, 1);
+ a_Player.GetWorld()->BroadcastSoundEffect("entity.leashknot.place", a_Player.GetPosition(), 1, 1);
}
else
{
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index 7d6a1bc8b..1ec58c534 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -24,7 +24,7 @@ public:
a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
a_WorldInterface.WakeUpSimulators({a_BlockX, a_BlockY, a_BlockZ});
- a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("block.lever.click", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
+ a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect("block.lever.click", Vector3d(a_BlockX, a_BlockY, a_BlockZ), 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
return true;
}
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp
index 56d335044..c88263d9c 100644
--- a/src/Blocks/BlockPiston.cpp
+++ b/src/Blocks/BlockPiston.cpp
@@ -233,8 +233,8 @@ void cBlockPistonHandler::ExtendPiston(Vector3i a_BlockPos, cWorld & a_World)
return;
}
- a_World.BroadcastBlockAction(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 0, pistonMeta, pistonBlock);
- a_World.BroadcastSoundEffect("block.piston.extend", a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 0.5f, 0.7f);
+ a_World.BroadcastBlockAction(a_BlockPos, 0, pistonMeta, pistonBlock);
+ a_World.BroadcastSoundEffect("block.piston.extend", a_BlockPos, 0.5f, 0.7f);
PushBlocks(blocksPushed, a_World, pushDir);
@@ -277,8 +277,8 @@ void cBlockPistonHandler::RetractPiston(Vector3i a_BlockPos, cWorld & a_World)
a_World.SetBlock(extensionPos.x, extensionPos.y, extensionPos.z, E_BLOCK_AIR, 0);
a_World.SetBlock(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, pistonBlock, pistonMeta & ~(8));
- a_World.BroadcastBlockAction(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 1, pistonMeta & ~(8), pistonBlock);
- a_World.BroadcastSoundEffect("block.piston.contract", a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, 0.5f, 0.7f);
+ a_World.BroadcastBlockAction(a_BlockPos, 1, pistonMeta & ~(8), pistonBlock);
+ a_World.BroadcastSoundEffect("block.piston.contract", a_BlockPos, 0.5f, 0.7f);
if (!IsSticky(pistonBlock))
{
diff --git a/src/Blocks/BroadcastInterface.h b/src/Blocks/BroadcastInterface.h
index e813be2a5..6943d5030 100644
--- a/src/Blocks/BroadcastInterface.h
+++ b/src/Blocks/BroadcastInterface.h
@@ -13,7 +13,7 @@ public:
virtual ~cBroadcastInterface() {}
virtual void BroadcastUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
- virtual void BroadcastSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = nullptr) = 0;
+ virtual void BroadcastSoundEffect(const AString & a_SoundName, Vector3d a_Position, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = nullptr) = 0;
virtual void BroadcastEntityAnimation(const cEntity & a_Entity, char a_Animation, const cClientHandle * a_Exclude = nullptr) = 0;
virtual void BroadcastSoundParticleEffect(const EffectID a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data, const cClientHandle * a_Exclude = nullptr) = 0;
};