diff options
Diffstat (limited to 'src/BlockEntities/DispenserEntity.cpp')
-rw-r--r-- | src/BlockEntities/DispenserEntity.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp index c02c68afa..aea854dc2 100644 --- a/src/BlockEntities/DispenserEntity.cpp +++ b/src/BlockEntities/DispenserEntity.cpp @@ -2,13 +2,10 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "DispenserEntity.h" -#include "../Entities/Player.h" #include "../Simulator/FluidSimulator.h" #include "../Chunk.h" #include "../World.h" -#include "../Entities/ArrowEntity.h" -#include "../Entities/FireChargeEntity.h" #include "../Entities/ProjectileEntity.h" @@ -17,7 +14,6 @@ cDispenserEntity::cDispenserEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World) : super(E_BLOCK_DISPENSER, a_BlockX, a_BlockY, a_BlockZ, a_World) { - SetBlockEntity(this); // cBlockEntityWindowOwner } @@ -109,7 +105,7 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum) { double MobX = 0.5 + (DispX + DispChunk->GetPosX() * cChunkDef::Width); double MobZ = 0.5 + (DispZ + DispChunk->GetPosZ() * cChunkDef::Width); - if (m_World->SpawnMob(MobX, DispY, MobZ, (cMonster::eType)m_Contents.GetSlot(a_SlotNum).m_ItemDamage) >= 0) + if (m_World->SpawnMob(MobX, DispY, MobZ, (eMonsterType)m_Contents.GetSlot(a_SlotNum).m_ItemDamage) >= 0) { m_Contents.ChangeSlotCount(a_SlotNum, -1); } @@ -203,7 +199,7 @@ void cDispenserEntity::SpawnProjectileFromDispenser(int a_BlockX, int a_BlockY, Vector3d cDispenserEntity::GetShootVector(NIBBLETYPE a_Meta) { - switch (a_Meta) + switch (a_Meta & 0x7) { case E_META_DROPSPENSER_FACING_YP: return Vector3d( 0, 1, 0); case E_META_DROPSPENSER_FACING_YM: return Vector3d( 0, -1, 0); |