Possibly fixed #618
This commit is contained in:
parent
b89419f603
commit
55cfb232db
@ -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
|
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)
|
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
|
// Don't spawn pickup if item isn't even valid; should prevent client crashing too
|
||||||
continue;
|
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)
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user