diff options
author | Dave Tucker <dave@dtucker.co.uk> | 2015-11-24 00:39:19 +0100 |
---|---|---|
committer | Dave Tucker <dave@dtucker.co.uk> | 2015-11-24 14:21:40 +0100 |
commit | 83870f9fc0e19da646f408a2d6636adfe4b5c002 (patch) | |
tree | d63858a16962f83d68620bc55c8efeed126874a6 /src/BlockEntities/DropSpenserEntity.cpp | |
parent | Merge pull request #2645 from Gargaj/followedarray (diff) | |
download | cuberite-83870f9fc0e19da646f408a2d6636adfe4b5c002.tar cuberite-83870f9fc0e19da646f408a2d6636adfe4b5c002.tar.gz cuberite-83870f9fc0e19da646f408a2d6636adfe4b5c002.tar.bz2 cuberite-83870f9fc0e19da646f408a2d6636adfe4b5c002.tar.lz cuberite-83870f9fc0e19da646f408a2d6636adfe4b5c002.tar.xz cuberite-83870f9fc0e19da646f408a2d6636adfe4b5c002.tar.zst cuberite-83870f9fc0e19da646f408a2d6636adfe4b5c002.zip |
Diffstat (limited to '')
-rw-r--r-- | src/BlockEntities/DropSpenserEntity.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/BlockEntities/DropSpenserEntity.cpp b/src/BlockEntities/DropSpenserEntity.cpp index 3a93e85a1..211bf8662 100644 --- a/src/BlockEntities/DropSpenserEntity.cpp +++ b/src/BlockEntities/DropSpenserEntity.cpp @@ -6,6 +6,7 @@ #include "Globals.h" #include "DropSpenserEntity.h" +#include "../EffectID.h" #include "../Entities/Player.h" #include "../Chunk.h" #include "../UI/DropSpenserWindow.h" @@ -89,14 +90,14 @@ void cDropSpenserEntity::DropSpense(cChunk & a_Chunk) int SmokeDir = 0; switch (Meta) { - case E_META_DROPSPENSER_FACING_YP: SmokeDir = 4; break; // YP & YM don't have associated smoke dirs, just do 4 (centre of block) - case E_META_DROPSPENSER_FACING_YM: SmokeDir = 4; break; - case E_META_DROPSPENSER_FACING_XM: SmokeDir = 3; break; - case E_META_DROPSPENSER_FACING_XP: SmokeDir = 5; break; - case E_META_DROPSPENSER_FACING_ZM: SmokeDir = 1; break; - case E_META_DROPSPENSER_FACING_ZP: SmokeDir = 7; break; + case E_META_DROPSPENSER_FACING_YP: SmokeDir = static_cast<int>(SmokeDirection::CENTRE); break; // YP & YM don't have associated smoke dirs, just do 4 (centre of block) + case E_META_DROPSPENSER_FACING_YM: SmokeDir = static_cast<int>(SmokeDirection::CENTRE); break; + case E_META_DROPSPENSER_FACING_XM: SmokeDir = static_cast<int>(SmokeDirection::EAST); break; + case E_META_DROPSPENSER_FACING_XP: SmokeDir = static_cast<int>(SmokeDirection::WEST); break; + case E_META_DROPSPENSER_FACING_ZM: SmokeDir = static_cast<int>(SmokeDirection::SOUTH); break; + case E_META_DROPSPENSER_FACING_ZP: SmokeDir = static_cast<int>(SmokeDirection::NORTH); break; } - m_World->BroadcastSoundParticleEffect(2000, m_PosX, m_PosY, m_PosZ, SmokeDir); + m_World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, m_PosX, m_PosY, m_PosZ, SmokeDir); m_World->BroadcastSoundEffect("random.click", static_cast<double>(m_PosX), static_cast<double>(m_PosY), static_cast<double>(m_PosZ), 1.0f, 1.0f); } |