From 55cfb232db9d7bf15dfa0d2e0816b4651331e2fd Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 2 Feb 2014 19:10:22 +0000 Subject: Possibly fixed #618 --- src/World.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/World.cpp b/src/World.cpp index 2571a6782..acfcf8e48 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -1639,7 +1639,7 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_FlyAwaySpeed /= 100; // Pre-divide, so that we don't have to divide each time inside the loop for (cItems::const_iterator itr = a_Pickups.begin(); itr != a_Pickups.end(); ++itr) { - if (!IsValidItem(itr->m_ItemType)) + if (!IsValidItem(itr->m_ItemType) || itr->m_ItemType == E_BLOCK_AIR) { // Don't spawn pickup if item isn't even valid; should prevent client crashing too continue; @@ -1665,7 +1665,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) { - if (!IsValidItem(itr->m_ItemType)) + if (!IsValidItem(itr->m_ItemType) || itr->m_ItemType == E_BLOCK_AIR) { continue; } -- cgit v1.2.3