Commit fa0e9f97 authored by nanahira's avatar nanahira

format

parent 5930fdaa
...@@ -562,7 +562,8 @@ CLIENT_send_pre_reconnect_info = (client, room, old_client) -> ...@@ -562,7 +562,8 @@ CLIENT_send_pre_reconnect_info = (client, room, old_client) ->
ygopro.stoc_send(client, 'HS_PLAYER_ENTER', { ygopro.stoc_send(client, 'HS_PLAYER_ENTER', {
name: player.name, name: player.name,
pos: player.pos, pos: player.pos,
}) })
return
CLIENT_send_reconnect_info = (client, server, room) -> CLIENT_send_reconnect_info = (client, server, room) ->
client.reconnecting = true client.reconnecting = true
...@@ -597,6 +598,7 @@ CLIENT_pre_reconnect = (client) -> ...@@ -597,6 +598,7 @@ CLIENT_pre_reconnect = (client) ->
client.pos = dinfo.old_client.pos client.pos = dinfo.old_client.pos
client.setTimeout(300000) client.setTimeout(300000)
CLIENT_send_pre_reconnect_info(client, ROOM_all[dinfo.room_id], dinfo.old_client) CLIENT_send_pre_reconnect_info(client, ROOM_all[dinfo.room_id], dinfo.old_client)
return
CLIENT_reconnect = (client) -> CLIENT_reconnect = (client) ->
if !CLIENT_is_able_to_reconnect(client) if !CLIENT_is_able_to_reconnect(client)
......
...@@ -740,7 +740,7 @@ ...@@ -740,7 +740,7 @@
}; };
CLIENT_send_pre_reconnect_info = function(client, room, old_client) { CLIENT_send_pre_reconnect_info = function(client, room, old_client) {
var len2, m, player, ref2, req_pos, results; var len2, m, player, ref2, req_pos;
ygopro.stoc_send_chat(client, "${pre_reconnecting_to_room}", ygopro.constants.COLORS.BABYBLUE); ygopro.stoc_send_chat(client, "${pre_reconnecting_to_room}", ygopro.constants.COLORS.BABYBLUE);
ygopro.stoc_send(client, 'JOIN_GAME', room.join_game_buffer); ygopro.stoc_send(client, 'JOIN_GAME', room.join_game_buffer);
req_pos = old_client.pos; req_pos = old_client.pos;
...@@ -751,15 +751,13 @@ ...@@ -751,15 +751,13 @@
type: req_pos type: req_pos
}); });
ref2 = room.players; ref2 = room.players;
results = [];
for (m = 0, len2 = ref2.length; m < len2; m++) { for (m = 0, len2 = ref2.length; m < len2; m++) {
player = ref2[m]; player = ref2[m];
results.push(ygopro.stoc_send(client, 'HS_PLAYER_ENTER', { ygopro.stoc_send(client, 'HS_PLAYER_ENTER', {
name: player.name, name: player.name,
pos: player.pos pos: player.pos
})); });
} }
return results;
}; };
CLIENT_send_reconnect_info = function(client, server, room) { CLIENT_send_reconnect_info = function(client, server, room) {
...@@ -800,7 +798,7 @@ ...@@ -800,7 +798,7 @@
client.pre_reconnecting = true; client.pre_reconnecting = true;
client.pos = dinfo.old_client.pos; client.pos = dinfo.old_client.pos;
client.setTimeout(300000); client.setTimeout(300000);
return CLIENT_send_pre_reconnect_info(client, ROOM_all[dinfo.room_id], dinfo.old_client); CLIENT_send_pre_reconnect_info(client, ROOM_all[dinfo.room_id], dinfo.old_client);
}; };
CLIENT_reconnect = function(client) { CLIENT_reconnect = function(client) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment