shouldn't that be g->m.ter(x, y) != t_floor ?