1
0
Fork 0

Fixed Flint and Steel, reverted Minecart change, renamed a parameter name

This commit is contained in:
jfhumann 2014-04-19 20:51:52 +02:00
parent 4dd7610381
commit f48d43f050
4 changed files with 10 additions and 9 deletions

View File

@ -128,11 +128,11 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
if (DispChunk->GetBlock(DispX, DispY, DispZ) == E_BLOCK_AIR)
{
DispChunk->SetBlock(DispX, DispY, DispZ, E_BLOCK_FIRE, 0);
const cItem& slot = m_Contents.GetSlot(a_SlotNum);
m_Contents.SetSlot(a_SlotNum, slot.m_ItemType, slot.m_ItemCount, slot.m_ItemDamage + 1);
// If the durability has run out destroy the item.
if (m_Contents.GetSlot(a_SlotNum).m_ItemDamage > 64)
{
bool ItemBroke = m_Contents.DamageItem(a_SlotNum, 1);
if (ItemBroke)
{
m_Contents.ChangeSlotCount(a_SlotNum, -1);
}
}

View File

@ -796,7 +796,8 @@ bool cMinecart::TestBlockCollision(NIBBLETYPE a_RailMeta)
BLOCKTYPE BlockXM = m_World->GetBlock(POSX_TOINT - 1, POSY_TOINT, POSZ_TOINT);
BLOCKTYPE BlockXP = m_World->GetBlock(POSX_TOINT + 1, POSY_TOINT, POSZ_TOINT);
BLOCKTYPE BlockZM = m_World->GetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT - 1);
BLOCKTYPE BlockZP = m_World->GetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT + 1);
// FIXME: Should the next line be POSZ_TOINT + 1? Else add some documenttation why - 1
BLOCKTYPE BlockZP = m_World->GetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT - 1);
if (
(!IsBlockRail(BlockXM) && cBlockInfo::IsSolid(BlockXM)) ||
(!IsBlockRail(BlockXP) && cBlockInfo::IsSolid(BlockXP)) ||

View File

@ -1166,9 +1166,9 @@ Vector3d cPlayer::GetThrowSpeed(double a_SpeedCoeff) const
void cPlayer::ForceSetSpeed(const Vector3d & a_Direction)
void cPlayer::ForceSetSpeed(const Vector3d & a_Speed)
{
SetSpeed(a_Direction);
SetSpeed(a_Speed);
m_ClientHandle->SendEntityVelocity(*this);
}

View File

@ -181,7 +181,7 @@ public:
void LoginSetGameMode(eGameMode a_GameMode);
/** Forces the player to move in the given direction. */
void ForceSetSpeed(const Vector3d & a_Direction); // tolua_export
void ForceSetSpeed(const Vector3d & a_Speed); // tolua_export
/** Tries to move to a new position, with attachment-related checks (y == -999) */
void MoveTo(const Vector3d & a_NewPos); // tolua_export