Explorar el Código

[Net] Silence ENetMultiplayerPeer close_connection.

Used to print an error when it was not active, now it just returns
immediately as per the documentation.
Fabio Alessandrelli hace 4 años
padre
commit
25f33999af
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      modules/enet/networked_multiplayer_enet.cpp

+ 3 - 1
modules/enet/networked_multiplayer_enet.cpp

@@ -446,7 +446,9 @@ bool NetworkedMultiplayerENet::is_server() const {
 }
 
 void NetworkedMultiplayerENet::close_connection(uint32_t wait_usec) {
-	ERR_FAIL_COND_MSG(!active, "The multiplayer instance isn't currently active.");
+	if (!active) {
+		return;
+	}
 
 	_pop_current_packet();