Skip to content

Commit

Permalink
Merge pull request #58205 from Zylann/fix_variant_encode_with_doubles
Browse files Browse the repository at this point in the history
Add missing flag when encode_variant writes math types with doubles
  • Loading branch information
akien-mga authored Feb 19, 2022
2 parents c944c9e + c69d303 commit 420ad25
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/io/marshalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,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
}
Expand Down

0 comments on commit 420ad25

Please sign in to comment.