diff options
Diffstat (limited to 'modules/websocket/websocket_multiplayer_peer.cpp')
-rw-r--r-- | modules/websocket/websocket_multiplayer_peer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp index fa0ef7060f..ddd8e190df 100644 --- a/modules/websocket/websocket_multiplayer_peer.cpp +++ b/modules/websocket/websocket_multiplayer_peer.cpp @@ -123,13 +123,13 @@ Error WebSocketMultiplayerPeer::put_packet(const uint8_t *p_buffer, int p_buffer } // -// NetworkedMultiplayerPeer +// MultiplayerPeer // void WebSocketMultiplayerPeer::set_transfer_mode(TransferMode p_mode) { // Websocket uses TCP, reliable } -NetworkedMultiplayerPeer::TransferMode WebSocketMultiplayerPeer::get_transfer_mode() const { +MultiplayerPeer::TransferMode WebSocketMultiplayerPeer::get_transfer_mode() const { // Websocket uses TCP, reliable return TRANSFER_MODE_RELIABLE; } @@ -215,7 +215,7 @@ void WebSocketMultiplayerPeer::_store_pkt(int32_t p_source, int32_t p_dest, cons packet.destination = p_dest; memcpy(packet.data, &p_data[PROTO_SIZE], p_data_size); _incoming_packets.push_back(packet); - emit_signal("peer_packet", p_source); + emit_signal(SNAME("peer_packet"), p_source); } Error WebSocketMultiplayerPeer::_server_relay(int32_t p_from, int32_t p_to, const uint8_t *p_buffer, uint32_t p_buffer_size) { @@ -306,15 +306,15 @@ void WebSocketMultiplayerPeer::_process_multiplayer(Ref<WebSocketPeer> p_peer, u switch (type) { case SYS_ADD: // Add peer _peer_map[id] = Ref<WebSocketPeer>(); - emit_signal("peer_connected", id); + emit_signal(SNAME("peer_connected"), id); if (id == 1) { // We just connected to the server - emit_signal("connection_succeeded"); + emit_signal(SNAME("connection_succeeded")); } break; case SYS_DEL: // Remove peer _peer_map.erase(id); - emit_signal("peer_disconnected", id); + emit_signal(SNAME("peer_disconnected"), id); break; case SYS_ID: // Hello, server assigned ID _peer_id = id; |