1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Should no longer crash after rebaking, may be a solution to #14795

Not sure if this is the same problem, as reported, please test.
This commit is contained in:
Juan Linietsky
2017-12-19 09:55:01 -03:00
parent 49eea481ec
commit 1eb1837d0c
3 changed files with 18 additions and 9 deletions

View File

@@ -475,16 +475,17 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
xform.basis.set_orthogonal_index(c.rot);
xform.set_origin(cellpos * cell_size + ofs);
xform.basis.scale(Vector3(cell_scale, cell_scale, cell_scale));
if (baked_meshes.size()) {
if (theme->get_item_mesh(c.item).is_valid()) {
if (!multimesh_items.has(c.item)) {
multimesh_items[c.item] = List<Pair<Transform, IndexKey> >();
}
if (theme->get_item_mesh(c.item).is_valid()) {
if (!multimesh_items.has(c.item)) {
multimesh_items[c.item] = List<Pair<Transform, IndexKey> >();
Pair<Transform, IndexKey> p;
p.first = xform;
p.second = E->get();
multimesh_items[c.item].push_back(p);
}
Pair<Transform, IndexKey> p;
p.first = xform;
p.second = E->get();
multimesh_items[c.item].push_back(p);
}
Vector<MeshLibrary::ShapeData> shapes = theme->get_item_shapes(c.item);