forked from oerkki/voxelands
less likely to destroy dropped stuff
This commit is contained in:
parent
1bfaf70f3b
commit
623a11e24a
|
@ -900,15 +900,19 @@ bool ServerEnvironment::dropToParcel(v3s16 pos, InventoryItem *item)
|
||||||
// if underground, go up to first air_equivalent and buildable_to
|
// if underground, go up to first air_equivalent and buildable_to
|
||||||
if (!content_features(m_map->getNodeNoEx(pos).getContent()).air_equivalent) {
|
if (!content_features(m_map->getNodeNoEx(pos).getContent()).air_equivalent) {
|
||||||
if (!getCollidedPosition(pos,v3s16(0,1,0),&ppos)) {
|
if (!getCollidedPosition(pos,v3s16(0,1,0),&ppos)) {
|
||||||
delete item;
|
if (!searchNear(pos,v3s16(2,0,2),CONTENT_AIR,&ppos)) {
|
||||||
return false;
|
delete item;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pos = ppos;
|
pos = ppos;
|
||||||
// otherwise go down to first non-air_equivalent and buildable_to
|
// otherwise go down to first non-air_equivalent and buildable_to
|
||||||
}else{
|
}else{
|
||||||
if (!getCollidedPosition(pos,v3s16(0,-1,0),&ppos)) {
|
if (!getCollidedPosition(pos,v3s16(0,-1,0),&ppos)) {
|
||||||
delete item;
|
if (!searchNear(pos,v3s16(2,0,2),CONTENT_AIR,&ppos)) {
|
||||||
return false;
|
delete item;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pos = ppos;
|
pos = ppos;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue