summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-02 20:10:22 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-02 20:10:22 +0100
commit55cfb232db9d7bf15dfa0d2e0816b4651331e2fd (patch)
treebb9b97d6b8a14327860d5e5a1d15d5ef957b4141
parentCreative players take Plugin damage (diff)
downloadcuberite-55cfb232db9d7bf15dfa0d2e0816b4651331e2fd.tar
cuberite-55cfb232db9d7bf15dfa0d2e0816b4651331e2fd.tar.gz
cuberite-55cfb232db9d7bf15dfa0d2e0816b4651331e2fd.tar.bz2
cuberite-55cfb232db9d7bf15dfa0d2e0816b4651331e2fd.tar.lz
cuberite-55cfb232db9d7bf15dfa0d2e0816b4651331e2fd.tar.xz
cuberite-55cfb232db9d7bf15dfa0d2e0816b4651331e2fd.tar.zst
cuberite-55cfb232db9d7bf15dfa0d2e0816b4651331e2fd.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}