diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-10-09 18:28:59 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-10-09 18:28:59 +0200 |
commit | 7b6621297bb590efa43010e511a802444b2ea1e1 (patch) | |
tree | c51235fb309bcbf29d4ee92e80da40bacf6e193e /servers/rendering_server.cpp | |
parent | 42425baa59956dc9d1e22341fe5e5d7f8fad5067 (diff) | |
download | redot-engine-7b6621297bb590efa43010e511a802444b2ea1e1.tar.gz |
Fix incorrect check in `_dict_to_surf`
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r-- | servers/rendering_server.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 94ff59f7e1..c488cc66f8 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -1833,9 +1833,7 @@ static RS::SurfaceData _dict_to_surf(const Dictionary &p_dictionary) { RS::SurfaceData sd; sd.primitive = RS::PrimitiveType(int(p_dictionary["primitive"])); - if (p_dictionary.has("uv_scale")) { - sd.format = p_dictionary["format"]; - } + sd.format = p_dictionary["format"]; sd.vertex_data = p_dictionary["vertex_data"]; if (p_dictionary.has("attribute_data")) { sd.attribute_data = p_dictionary["attribute_data"]; @@ -1853,7 +1851,9 @@ static RS::SurfaceData _dict_to_surf(const Dictionary &p_dictionary) { } sd.aabb = p_dictionary["aabb"]; - sd.uv_scale = p_dictionary["uv_scale"]; + if (p_dictionary.has("uv_scale")) { + sd.uv_scale = p_dictionary["uv_scale"]; + } if (p_dictionary.has("lods")) { Array lods = p_dictionary["lods"]; |