You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Use same boolean for objects encode and decode.
In a very unintuitive move encode needed false to encode an object, decode needed true to decode it. They now need the same value: `true`.
This commit is contained in:
@@ -93,7 +93,7 @@ Error PacketPeer::get_var(Variant &r_variant) {
|
||||
Error PacketPeer::put_var(const Variant &p_packet) {
|
||||
|
||||
int len;
|
||||
Error err = encode_variant(p_packet, NULL, len, !allow_object_decoding); // compute len first
|
||||
Error err = encode_variant(p_packet, NULL, len, allow_object_decoding); // compute len first
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -102,7 +102,7 @@ Error PacketPeer::put_var(const Variant &p_packet) {
|
||||
|
||||
uint8_t *buf = (uint8_t *)alloca(len);
|
||||
ERR_FAIL_COND_V(!buf, ERR_OUT_OF_MEMORY);
|
||||
err = encode_variant(p_packet, buf, len, !allow_object_decoding);
|
||||
err = encode_variant(p_packet, buf, len, allow_object_decoding);
|
||||
ERR_FAIL_COND_V(err, err);
|
||||
|
||||
return put_packet(buf, len);
|
||||
|
||||
Reference in New Issue
Block a user