Water now floods small holes

This commit is contained in:
CobaltXII
2019-01-01 21:35:45 -05:00
parent f2681cb134
commit c613faae80

View File

@@ -687,10 +687,24 @@ int main(int argc, char** argv)
}
else
{
if (the_world->get_id(px, py, pz) != id_water)
if (the_world->get_id_safe(px, py, pz) != id_water)
{
the_accessor->set_id_safe(px, py, pz, id_air);
if
(
the_world->get_id_safe(px + 1, py, pz) == id_water ||
the_world->get_id_safe(px - 1, py, pz) == id_water ||
the_world->get_id_safe(px, py, pz + 1) == id_water ||
the_world->get_id_safe(px, py, pz - 1) == id_water ||
the_world->get_id_safe(px, py - 1, pz) == id_water
)
{
the_accessor->set_id_safe(px, py, pz, id_water);
}
block_timer = 10;
break;