summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-11-24 15:43:05 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-24 15:43:05 +0100
commit412e5155a24339aa2a86f36e0ae5a9c5a0ff758d (patch)
treed63858a16962f83d68620bc55c8efeed126874a6 /src/Mobs
parentMerge pull request #2645 from Gargaj/followedarray (diff)
parentAdd enum for Sound and Particle Effects (diff)
downloadcuberite-412e5155a24339aa2a86f36e0ae5a9c5a0ff758d.tar
cuberite-412e5155a24339aa2a86f36e0ae5a9c5a0ff758d.tar.gz
cuberite-412e5155a24339aa2a86f36e0ae5a9c5a0ff758d.tar.bz2
cuberite-412e5155a24339aa2a86f36e0ae5a9c5a0ff758d.tar.lz
cuberite-412e5155a24339aa2a86f36e0ae5a9c5a0ff758d.tar.xz
cuberite-412e5155a24339aa2a86f36e0ae5a9c5a0ff758d.tar.zst
cuberite-412e5155a24339aa2a86f36e0ae5a9c5a0ff758d.zip
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/Horse.cpp9
-rw-r--r--src/Mobs/Monster.cpp3
-rw-r--r--src/Mobs/Sheep.cpp3
3 files changed, 9 insertions, 6 deletions
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index ce3bd65eb..8b76d7c50 100644
--- a/src/Mobs/Horse.cpp
+++ b/src/Mobs/Horse.cpp
@@ -2,6 +2,7 @@
#include "Horse.h"
#include "../World.h"
+#include "../EffectID.h"
#include "../Entities/Player.h"
@@ -55,10 +56,10 @@ void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
if (m_World->GetTickRandomNumber(50) == 25)
{
- m_World->BroadcastSoundParticleEffect(2000, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), 0);
- m_World->BroadcastSoundParticleEffect(2000, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), 2);
- m_World->BroadcastSoundParticleEffect(2000, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), 6);
- m_World->BroadcastSoundParticleEffect(2000, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), 8);
+ m_World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), int(SmokeDirection::SOUTH_EAST));
+ m_World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), int(SmokeDirection::SOUTH_WEST));
+ m_World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), int(SmokeDirection::NORTH_EAST));
+ m_World->BroadcastSoundParticleEffect(EffectID::PARTICLE_SMOKE, FloorC(GetPosX()), FloorC(GetPosY()), FloorC(GetPosZ()), int(SmokeDirection::NORTH_WEST));
m_Attachee->Detach();
m_bIsRearing = true;
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 99909aa66..060b934ec 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -6,6 +6,7 @@
#include "../Server.h"
#include "../ClientHandle.h"
#include "../World.h"
+#include "../EffectID.h"
#include "../Entities/Player.h"
#include "../Entities/ExpOrb.h"
#include "../MonsterConfig.h"
@@ -573,7 +574,7 @@ void cMonster::HandleFalling()
TakeDamage(dtFalling, nullptr, Damage, Damage, 0);
// Fall particles
- GetWorld()->BroadcastSoundParticleEffect(2006, POSX_TOINT, POSY_TOINT - 1, POSZ_TOINT, Damage /* Used as particle effect speed modifier */);
+ GetWorld()->BroadcastSoundParticleEffect(EffectID::PARTICLE_FALL_PARTICLES, POSX_TOINT, POSY_TOINT - 1, POSZ_TOINT, Damage /* Used as particle effect speed modifier */);
}
m_LastGroundHeight = POSY_TOINT;
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp
index dcfef8135..5f763508b 100644
--- a/src/Mobs/Sheep.cpp
+++ b/src/Mobs/Sheep.cpp
@@ -5,6 +5,7 @@
#include "../BlockID.h"
#include "../Entities/Player.h"
#include "../World.h"
+#include "../EffectID.h"
#include "FastRandom.h"
@@ -107,7 +108,7 @@ void cSheep::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
// The sheep ate the grass so we change it to dirt
m_World->SetBlock(PosX, PosY, PosZ, E_BLOCK_DIRT, 0);
- GetWorld()->BroadcastSoundParticleEffect(2001, PosX, PosY, PosX, E_BLOCK_GRASS);
+ GetWorld()->BroadcastSoundParticleEffect(EffectID::PARTICLE_BLOCK_BREAK, PosX, PosY, PosX, E_BLOCK_GRASS);
m_IsSheared = false;
m_World->BroadcastEntityMetadata(*this);
}