summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorMarc Gilleron <marc.gilleron@gmail.com>2022-02-16 20:13:47 +0000
committerMarc Gilleron <marc.gilleron@gmail.com>2022-02-16 20:47:36 +0000
commitc69d303ba9286c593f9cef7cb5d77eddff5090a7 (patch)
tree8d593d5a89fa14cb5235737bf3f998eb5634a1a0 /core/io
parentd02db6306ebcb57296dece3e8d990ae188b39aad (diff)
Add missing flag when encode_variant writes math types with doubles
Diffstat (limited to 'core/io')
-rw-r--r--core/io/marshalls.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index a363cc3694..72bc3356ab 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -1067,6 +1067,21 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
flags |= ENCODE_FLAG_OBJECT_AS_ID;
}
} break;
+#ifdef REAL_T_IS_DOUBLE
+ case Variant::VECTOR2:
+ case Variant::VECTOR3:
+ case Variant::PACKED_VECTOR2_ARRAY:
+ case Variant::PACKED_VECTOR3_ARRAY:
+ case Variant::TRANSFORM2D:
+ case Variant::TRANSFORM3D:
+ case Variant::QUATERNION:
+ case Variant::PLANE:
+ case Variant::BASIS:
+ case Variant::RECT2:
+ case Variant::AABB: {
+ flags |= ENCODE_FLAG_64;
+ } break;
+#endif // REAL_T_IS_DOUBLE
default: {
} // nothing to do at this stage
}