summaryrefslogtreecommitdiff
path: root/modules/websocket/websocket_multiplayer_peer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/websocket/websocket_multiplayer_peer.cpp')
-rw-r--r--modules/websocket/websocket_multiplayer_peer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp
index a48738b6a4..6aab8a7e81 100644
--- a/modules/websocket/websocket_multiplayer_peer.cpp
+++ b/modules/websocket/websocket_multiplayer_peer.cpp
@@ -213,7 +213,7 @@ void WebSocketMultiplayerPeer::_send_add(int32_t p_peer_id) {
_send_sys(get_peer(p_peer_id), SYS_ADD, 1);
for (Map<int, Ref<WebSocketPeer> >::Element *E = _peer_map.front(); E; E = E->next()) {
- uint32_t id = E->key();
+ int32_t id = E->key();
if (p_peer_id == id)
continue; // Skip the newwly added peer (already confirmed)
@@ -226,7 +226,7 @@ void WebSocketMultiplayerPeer::_send_add(int32_t p_peer_id) {
void WebSocketMultiplayerPeer::_send_del(int32_t p_peer_id) {
for (Map<int, Ref<WebSocketPeer> >::Element *E = _peer_map.front(); E; E = E->next()) {
- uint32_t id = E->key();
+ int32_t id = E->key();
if (p_peer_id != id)
_send_sys(get_peer(id), SYS_DEL, p_peer_id);
}
@@ -288,7 +288,7 @@ void WebSocketMultiplayerPeer::_process_multiplayer(Ref<WebSocketPeer> p_peer, u
data_size = size - PROTO_SIZE;
uint8_t type = 0;
- int32_t from = 0;
+ uint32_t from = 0;
int32_t to = 0;
copymem(&type, in_buffer, 1);
copymem(&from, &in_buffer[1], 4);