allow farm dirt further from water

This commit is contained in:
darkrose 2015-08-13 22:34:07 +10:00
parent f9bcfa15ab
commit 34636c84ae
2 changed files with 3 additions and 3 deletions

View File

@ -1095,7 +1095,7 @@ void ServerEnvironment::step(float dtime)
case CONTENT_FARM_DIRT:
{
if (n.envticks%4 == 0) { // with this plants take around 10 minutes to grow
s16 max_d = 1;
s16 max_d = 3;
v3s16 temp_p = p;
v3s16 test_p;
MapNode testnode;

View File

@ -3167,8 +3167,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
testnode = m_env.getMap().getNodeNoEx(test_p);
bool is_farm_swap = false;
if (testnode.getContent() == CONTENT_AIR) {
for(s16 z=-1; !is_farm_swap && z<=1; z++) {
for(s16 x=-1; !is_farm_swap && x<=1; x++)
for(s16 z=-3; !is_farm_swap && z<=3; z++) {
for(s16 x=-3; !is_farm_swap && x<=3; x++)
{
test_p = temp_p + v3s16(x,0,z);
testnode = m_env.getMap().getNodeNoEx(test_p);