diff options
author | madmaxoft <github@xoft.cz> | 2013-11-13 11:08:51 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-11-13 11:08:51 +0100 |
commit | 293051eca89351181f11443e1785617ab58459c8 (patch) | |
tree | 50c637b3c2ac3f1848610623156ce96be1b91be5 /source/World.cpp | |
parent | cWindow: Fixed item dupe glitch with painting (#278) (diff) | |
parent | Bundled fixes [SEE DESC] (diff) | |
download | cuberite-293051eca89351181f11443e1785617ab58459c8.tar cuberite-293051eca89351181f11443e1785617ab58459c8.tar.gz cuberite-293051eca89351181f11443e1785617ab58459c8.tar.bz2 cuberite-293051eca89351181f11443e1785617ab58459c8.tar.lz cuberite-293051eca89351181f11443e1785617ab58459c8.tar.xz cuberite-293051eca89351181f11443e1785617ab58459c8.tar.zst cuberite-293051eca89351181f11443e1785617ab58459c8.zip |
Diffstat (limited to 'source/World.cpp')
-rw-r--r-- | source/World.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/World.cpp b/source/World.cpp index c6bc47be5..0f9df8a62 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -1512,7 +1512,7 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double for (cItems::const_iterator itr = a_Pickups.begin(); itr != a_Pickups.end(); ++itr) { float SpeedX = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500)); - float SpeedY = 1; + float SpeedY = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500)); float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500)); cPickup * Pickup = new cPickup( @@ -2563,15 +2563,16 @@ bool cWorld::IsBlockDirectlyWatered(int a_BlockX, int a_BlockY, int a_BlockZ) int cWorld::SpawnMob(double a_PosX, double a_PosY, double a_PosZ, cMonster::eType a_MonsterType) { cMonster * Monster = NULL; - - int ShColor = GetTickRandomNumber(15); // 0 .. 15 - Sheep - bool SkType = GetDimension() == dimNether ; // Skeleton Monster = cMonster::NewMonsterFromType(a_MonsterType); if (Monster != NULL) { Monster->SetPosition(a_PosX, a_PosY, a_PosZ); } + + // Because it's logical that ALL mob spawns need spawn effects, not just spawners + BroadcastSoundParticleEffect(2004, (int)a_PosX, (int)a_PosY, (int)a_PosZ, 0); + return SpawnMobFinalize(Monster); } |