Browse Source

Fix gridmap disappearing after editing after bake, closes #14868

Juan Linietsky 7 years ago
parent
commit
360449a094
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gridmap/grid_map.cpp

+ 1 - 1
modules/gridmap/grid_map.cpp

@@ -475,7 +475,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
 		xform.basis.set_orthogonal_index(c.rot);
 		xform.basis.set_orthogonal_index(c.rot);
 		xform.set_origin(cellpos * cell_size + ofs);
 		xform.set_origin(cellpos * cell_size + ofs);
 		xform.basis.scale(Vector3(cell_scale, cell_scale, cell_scale));
 		xform.basis.scale(Vector3(cell_scale, cell_scale, cell_scale));
-		if (baked_meshes.size()) {
+		if (baked_meshes.size() == 0) {
 			if (theme->get_item_mesh(c.item).is_valid()) {
 			if (theme->get_item_mesh(c.item).is_valid()) {
 				if (!multimesh_items.has(c.item)) {
 				if (!multimesh_items.has(c.item)) {
 					multimesh_items[c.item] = List<Pair<Transform, IndexKey> >();
 					multimesh_items[c.item] = List<Pair<Transform, IndexKey> >();