1
0

Spawn eggs use IsGameMode()

Possible fix for #316.
This commit is contained in:
Tiger Wang 2013-12-06 20:00:49 +00:00
parent 44d5fd1e87
commit 6c7de446ae

View File

@ -28,14 +28,14 @@ public:
AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
if (a_BlockFace == BLOCK_FACE_BOTTOM) if (a_BlockFace == BLOCK_FACE_YM)
{ {
a_BlockY--; a_BlockY--;
} }
if (a_World->SpawnMob(a_BlockX + 0.5, a_BlockY, a_BlockZ + 0.5, (cMonster::eType)(a_Item.m_ItemDamage)) >= 0) if (a_World->SpawnMob(a_BlockX + 0.5, a_BlockY, a_BlockZ + 0.5, (cMonster::eType)(a_Item.m_ItemDamage)) >= 0)
{ {
if (a_Player->GetGameMode() != 1) if (!a_Player->IsGameModeCreative())
{ {
// The mob was spawned, "use" the item: // The mob was spawned, "use" the item:
a_Player->GetInventory().RemoveOneEquippedItem(); a_Player->GetInventory().RemoveOneEquippedItem();