summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/multiplayer_replicator.cpp2
-rw-r--r--modules/enet/enet_multiplayer_peer.cpp4
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp1
3 files changed, 6 insertions, 1 deletions
diff --git a/core/io/multiplayer_replicator.cpp b/core/io/multiplayer_replicator.cpp
index 1642aab136..b9d0675af1 100644
--- a/core/io/multiplayer_replicator.cpp
+++ b/core/io/multiplayer_replicator.cpp
@@ -189,6 +189,8 @@ Error MultiplayerReplicator::_send_default_spawn_despawn(int p_peer_id, const Re
bool is_raw = false;
if (state_variants.size() == 1 && state_variants[0].get_type() == Variant::PACKED_BYTE_ARRAY) {
is_raw = true;
+ const PackedByteArray pba = state_variants[0];
+ state_len = pba.size();
} else if (state_variants.size()) {
err = _encode_state(state_variants, nullptr, state_len);
ERR_FAIL_COND_V(err, err);
diff --git a/modules/enet/enet_multiplayer_peer.cpp b/modules/enet/enet_multiplayer_peer.cpp
index 38ca38385c..7a9a780238 100644
--- a/modules/enet/enet_multiplayer_peer.cpp
+++ b/modules/enet/enet_multiplayer_peer.cpp
@@ -393,7 +393,9 @@ bool ENetMultiplayerPeer::is_server() const {
}
void ENetMultiplayerPeer::close_connection(uint32_t wait_usec) {
- ERR_FAIL_COND_MSG(!_is_active(), "The multiplayer instance isn't currently active.");
+ if (!_is_active()) {
+ return;
+ }
_pop_current_packet();
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index a0cf41d5a3..f2b601dc2c 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -2494,6 +2494,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
case GDScriptParser::ClassNode::Member::VARIABLE:
p_identifier->source = GDScriptParser::IdentifierNode::MEMBER_VARIABLE;
p_identifier->variable_source = member.variable;
+ member.variable->usages += 1;
break;
case GDScriptParser::ClassNode::Member::FUNCTION:
resolve_function_signature(member.function);