summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/NoteEntity.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2016-02-06 11:37:34 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2016-02-06 11:37:34 +0100
commit6fdd7194c81be7234a126bdc3b48f0291fce3567 (patch)
tree7d5ac74b7385ce4ebf77588d80549c884c2b993c /src/BlockEntities/NoteEntity.cpp
parentMerge pull request #2958 from LogicParrot/fence (diff)
parentBulk clearing of whitespace (diff)
downloadcuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.gz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.bz2
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.lz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.xz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.zst
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.zip
Diffstat (limited to 'src/BlockEntities/NoteEntity.cpp')
-rw-r--r--src/BlockEntities/NoteEntity.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/BlockEntities/NoteEntity.cpp b/src/BlockEntities/NoteEntity.cpp
index 0eef633dc..a1e1d931d 100644
--- a/src/BlockEntities/NoteEntity.cpp
+++ b/src/BlockEntities/NoteEntity.cpp
@@ -35,7 +35,7 @@ void cNoteEntity::MakeSound(void)
{
char instrument;
AString sampleName;
-
+
switch (m_World->GetBlock(m_PosX, m_PosY - 1, m_PosZ))
{
case E_BLOCK_PLANKS:
@@ -47,7 +47,7 @@ void cNoteEntity::MakeSound(void)
sampleName = "note.bassattack";
break;
}
-
+
case E_BLOCK_SAND:
case E_BLOCK_GRAVEL:
case E_BLOCK_SOULSAND:
@@ -56,7 +56,7 @@ void cNoteEntity::MakeSound(void)
sampleName = "note.snare";
break;
}
-
+
case E_BLOCK_GLASS:
case E_BLOCK_GLASS_PANE:
case E_BLOCK_GLOWSTONE:
@@ -89,7 +89,7 @@ void cNoteEntity::MakeSound(void)
}
m_World->BroadcastBlockAction(m_PosX, m_PosY, m_PosZ, static_cast<Byte>(instrument), static_cast<Byte>(m_Pitch), E_BLOCK_NOTE_BLOCK);
-
+
// TODO: instead of calculating the power function over and over, make a precalculated table - there's only 24 pitches after all
float calcPitch = static_cast<float>(pow(2.0f, static_cast<float>(m_Pitch - 12.0f) / 12.0f));
m_World->BroadcastSoundEffect(