Commit 75284eb9 authored by nanahira's avatar nanahira

Merge branch 'replay_delay' into replay_delay_koishi

parents 7a3fe6f3 94601b6a
......@@ -2700,6 +2700,8 @@ ygopro.stoc_follow 'DUEL_END', false, (buffer, info, client, server)->
CLIENT_send_replays(client, room)
if !room.replays_sent_to_watchers
room.replays_sent_to_watchers = true
for player in room.players when player and player.pos > 3
CLIENT_send_replays(player, room)
for player in room.watchers when player
CLIENT_send_replays(player, room)
......
......@@ -3392,7 +3392,7 @@
});
ygopro.stoc_follow('DUEL_END', false, function(buffer, info, client, server) {
var len2, m, player, ref3, results, room;
var len2, len3, m, n, player, ref3, ref4, results, room;
room = ROOM_all[client.rid];
if (!(room && settings.modules.replay_delay && room.hostinfo.mode === 1)) {
return;
......@@ -3400,10 +3400,17 @@
CLIENT_send_replays(client, room);
if (!room.replays_sent_to_watchers) {
room.replays_sent_to_watchers = true;
ref3 = room.watchers;
results = [];
ref3 = room.players;
for (m = 0, len2 = ref3.length; m < len2; m++) {
player = ref3[m];
if (player && player.pos > 3) {
CLIENT_send_replays(player, room);
}
}
ref4 = room.watchers;
results = [];
for (n = 0, len3 = ref4.length; n < len3; n++) {
player = ref4[n];
if (player) {
results.push(CLIENT_send_replays(player, room));
}
......
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