You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Add object encoding param to serialization methods
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.
Break ABI compatibaility (API compatibility for GDNative).
(cherry picked from commit 393e62b98a)
This commit is contained in:
committed by
Hein-Pieter van Braam-Stewart
parent
a1ad05df86
commit
e0fe795433
@@ -114,7 +114,7 @@ Variant PackedDataContainer::_get_at_ofs(uint32_t p_ofs, const uint8_t *p_buf, b
|
||||
} else {
|
||||
|
||||
Variant v;
|
||||
Error rerr = decode_variant(v, p_buf + p_ofs, datalen - p_ofs, NULL);
|
||||
Error rerr = decode_variant(v, p_buf + p_ofs, datalen - p_ofs, NULL, false);
|
||||
|
||||
if (rerr != OK) {
|
||||
|
||||
@@ -249,9 +249,9 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
|
||||
|
||||
uint32_t pos = tmpdata.size();
|
||||
int len;
|
||||
encode_variant(p_data, NULL, len);
|
||||
encode_variant(p_data, NULL, len, false);
|
||||
tmpdata.resize(tmpdata.size() + len);
|
||||
encode_variant(p_data, &tmpdata.write[pos], len);
|
||||
encode_variant(p_data, &tmpdata.write[pos], len, false);
|
||||
return pos;
|
||||
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user