mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Revert "Initialize Quaternion
variant with identity"
This reverts commit 82fc85aae9
.
This may be correct, but it breaks compatibility so it shouldn't be
cherry-picked to stable branches.
This commit is contained in:
parent
3ddb1600cb
commit
33ed90cb18
1 changed files with 1 additions and 8 deletions
|
@ -54,9 +54,6 @@ public:
|
|||
case Variant::TRANSFORM2D:
|
||||
init_transform2d(v);
|
||||
break;
|
||||
case Variant::QUATERNION:
|
||||
init_quaternion(v);
|
||||
break;
|
||||
case Variant::AABB:
|
||||
init_aabb(v);
|
||||
break;
|
||||
|
@ -222,7 +219,7 @@ public:
|
|||
|
||||
// Should be in the same order as Variant::Type for consistency.
|
||||
// Those primitive and vector types don't need an `init_` method:
|
||||
// Nil, bool, float, Vector2/i, Rect2/i, Vector3/i, Plane, RID.
|
||||
// Nil, bool, float, Vector2/i, Rect2/i, Vector3/i, Plane, Quat, RID.
|
||||
// Object is a special case, handled via `object_reset_data`.
|
||||
_FORCE_INLINE_ static void init_string(Variant *v) {
|
||||
memnew_placement(v->_data._mem, String);
|
||||
|
@ -233,10 +230,6 @@ public:
|
|||
memnew_placement(v->_data._transform2d, Transform2D);
|
||||
v->type = Variant::TRANSFORM2D;
|
||||
}
|
||||
_FORCE_INLINE_ static void init_quaternion(Variant *v) {
|
||||
memnew_placement(v->_data._mem, Quaternion);
|
||||
v->type = Variant::QUATERNION;
|
||||
}
|
||||
_FORCE_INLINE_ static void init_aabb(Variant *v) {
|
||||
v->_data._aabb = (AABB *)Variant::Pools::_bucket_small.alloc();
|
||||
memnew_placement(v->_data._aabb, AABB);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue