You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits.
This commit is contained in:
@@ -1248,6 +1248,14 @@ Variant::operator uint64_t() const {
|
||||
}
|
||||
}
|
||||
|
||||
Variant::operator ObjectID() const {
|
||||
if (type == INT) {
|
||||
return ObjectID(_data._int);
|
||||
} else {
|
||||
return ObjectID();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NEED_LONG_INT
|
||||
Variant::operator signed long() const {
|
||||
|
||||
@@ -2193,6 +2201,11 @@ Variant::Variant(double p_double) {
|
||||
_data._real = p_double;
|
||||
}
|
||||
|
||||
Variant::Variant(const ObjectID &p_id) {
|
||||
type = INT;
|
||||
_data._int = p_id;
|
||||
}
|
||||
|
||||
Variant::Variant(const StringName &p_string) {
|
||||
|
||||
type = STRING;
|
||||
|
||||
Reference in New Issue
Block a user