summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-13 02:08:02 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-13 02:08:02 +0200
commitd529971e279609ae928d9077404b95bd595b5e52 (patch)
tree34aeac132b9cb73b7b68a1285815c168506e247c /src/Items
parentOnly one instance of server can be started (diff)
downloadcuberite-d529971e279609ae928d9077404b95bd595b5e52.tar
cuberite-d529971e279609ae928d9077404b95bd595b5e52.tar.gz
cuberite-d529971e279609ae928d9077404b95bd595b5e52.tar.bz2
cuberite-d529971e279609ae928d9077404b95bd595b5e52.tar.lz
cuberite-d529971e279609ae928d9077404b95bd595b5e52.tar.xz
cuberite-d529971e279609ae928d9077404b95bd595b5e52.tar.zst
cuberite-d529971e279609ae928d9077404b95bd595b5e52.zip
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemBow.h2
-rw-r--r--src/Items/ItemLighter.h6
-rw-r--r--src/Items/ItemThrowable.h9
3 files changed, 5 insertions, 12 deletions
diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h
index 185f17fee..e7a77dcbc 100644
--- a/src/Items/ItemBow.h
+++ b/src/Items/ItemBow.h
@@ -70,7 +70,7 @@ public:
return;
}
- a_Player->GetWorld()->BroadcastSoundEffect("random.bow", (int)a_Player->GetPosX() * 8, (int)a_Player->GetPosY() * 8, (int)a_Player->GetPosZ() * 8, 0.5, (float)Force);
+ a_Player->GetWorld()->BroadcastSoundEffect("random.bow", a_Player->GetPosX(), a_Player->GetPosY(), a_Player->GetPosZ(), 0.5, (float)Force);
if (!a_Player->IsGameModeCreative())
{
a_Player->UseEquippedItem();
diff --git a/src/Items/ItemLighter.h b/src/Items/ItemLighter.h
index 32f49cab6..9f98bf85f 100644
--- a/src/Items/ItemLighter.h
+++ b/src/Items/ItemLighter.h
@@ -52,8 +52,8 @@ public:
case E_BLOCK_TNT:
{
// Activate the TNT:
- a_World->BroadcastSoundEffect("game.tnt.primed", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 1.0f, 1.0f);
- a_World->SetBlock(a_BlockX,a_BlockY,a_BlockZ, E_BLOCK_AIR, 0);
+ a_World->BroadcastSoundEffect("game.tnt.primed", (double)a_BlockX, (double)a_BlockY, (double)a_BlockZ, 1.0f, 1.0f);
+ a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0);
a_World->SpawnPrimedTNT(a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5); // 80 ticks to boom
break;
}
@@ -68,7 +68,7 @@ public:
if (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_AIR)
{
a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FIRE, 0);
- a_World->BroadcastSoundEffect("fire.ignite", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 1.0F, 1.04F);
+ a_World->BroadcastSoundEffect("fire.ignite", (double)a_BlockX, (double)a_BlockY, (double)a_BlockZ, 1.0F, 1.04F);
break;
}
}
diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h
index 25935a1bc..fde7b8e67 100644
--- a/src/Items/ItemThrowable.h
+++ b/src/Items/ItemThrowable.h
@@ -33,14 +33,7 @@ public:
// Play sound
cFastRandom Random;
- a_World->BroadcastSoundEffect(
- "random.bow",
- (int)std::floor(a_Player->GetPosX() * 8.0),
- (int)std::floor((a_Player->GetPosY() - a_Player->GetHeight()) * 8.0),
- (int)std::floor(a_Player->GetPosZ() * 8.0),
- 0.5F,
- 0.4F / (Random.NextFloat(1.0F) * 0.4F + 0.8F)
- );
+ a_World->BroadcastSoundEffect("random.bow", a_Player->GetPosX(), a_Player->GetPosY() - a_Player->GetHeight(), a_Player->GetPosZ(), 0.5f, 0.4f / (Random.NextFloat(1.0f) * 0.4f + 0.8f));
if (a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, a_Player->GetEquippedItem(), &Speed) < 0)
{