summaryrefslogtreecommitdiffstats
path: root/src/Items
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/Items
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/Items/ItemBow.h4
-rw-r--r--src/Items/ItemHoe.h2
-rw-r--r--src/Items/ItemLighter.h4
-rw-r--r--src/Items/ItemThrowable.h2
4 files changed, 5 insertions, 7 deletions
diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h
index 71f5bc378..241df0c3c 100644
--- a/src/Items/ItemBow.h
+++ b/src/Items/ItemBow.h
@@ -77,9 +77,7 @@ public:
}
a_Player->GetWorld()->BroadcastSoundEffect(
"entity.arrow.shoot",
- a_Player->GetPosX(),
- a_Player->GetPosY(),
- a_Player->GetPosZ(),
+ a_Player->GetPosition(),
0.5,
static_cast<float>(Force)
);
diff --git a/src/Items/ItemHoe.h b/src/Items/ItemHoe.h
index 9a9a2cc64..0bf2d4c4b 100644
--- a/src/Items/ItemHoe.h
+++ b/src/Items/ItemHoe.h
@@ -58,7 +58,7 @@ public:
}
a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, NewBlock, 0);
- a_World->BroadcastSoundEffect("item.hoe.till", a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5, 1.0f, 0.8f);
+ a_World->BroadcastSoundEffect("item.hoe.till", {a_BlockX + 0.5, a_BlockY + 0.5, a_BlockZ + 0.5}, 1.0f, 0.8f);
a_Player->UseEquippedItem();
return true;
}
diff --git a/src/Items/ItemLighter.h b/src/Items/ItemLighter.h
index 8b46ba011..5acc5551e 100644
--- a/src/Items/ItemLighter.h
+++ b/src/Items/ItemLighter.h
@@ -56,7 +56,7 @@ public:
case E_BLOCK_TNT:
{
// Activate the TNT:
- a_World->BroadcastSoundEffect("entity.tnt.primed", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 1.0f, 1.0f);
+ a_World->BroadcastSoundEffect("entity.tnt.primed", Vector3d(a_BlockX, a_BlockY, 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;
@@ -72,7 +72,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("item.flintandsteel.use", static_cast<double>(a_BlockX), static_cast<double>(a_BlockY), static_cast<double>(a_BlockZ), 1.0F, 1.04F);
+ a_World->BroadcastSoundEffect("item.flintandsteel.use", Vector3d(a_BlockX, a_BlockY, a_BlockZ), 1.0F, 1.04F);
break;
}
}
diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h
index 7bdba17cc..18dd9e801 100644
--- a/src/Items/ItemThrowable.h
+++ b/src/Items/ItemThrowable.h
@@ -36,7 +36,7 @@ public:
Vector3d Speed = a_Player->GetLookVector() * m_SpeedCoeff;
// Play sound
- a_World->BroadcastSoundEffect("entity.arrow.shoot", a_Player->GetPosX(), a_Player->GetPosY() - a_Player->GetHeight(), a_Player->GetPosZ(), 0.5f, 0.4f / GetRandomProvider().RandReal(0.8f, 1.2f));
+ a_World->BroadcastSoundEffect("entity.arrow.shoot", a_Player->GetPosition() - Vector3d(0, a_Player->GetHeight(), 0), 0.5f, 0.4f / GetRandomProvider().RandReal(0.8f, 1.2f));
if (a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, &a_Player->GetEquippedItem(), &Speed) == cEntity::INVALID_ID)
{