Commit 36e170ab authored by nanahira's avatar nanahira

fix send replay

parent 4d2422e8
......@@ -1394,9 +1394,9 @@ class Room
send_replays: () ->
return false unless settings.modules.replay_delay and @replays.length and @hostinfo.mode == 1
for player in @players
for player in @players when player
CLIENT_send_replays(player, this)
for player in @watchers
for player in @watchers when player
CLIENT_send_replays(player, this)
return true
......
......@@ -1857,13 +1857,17 @@
ref2 = this.players;
for (m = 0, len2 = ref2.length; m < len2; m++) {
player = ref2[m];
if (player) {
CLIENT_send_replays(player, this);
}
}
ref3 = this.watchers;
for (n = 0, len3 = ref3.length; n < len3; n++) {
player = ref3[n];
if (player) {
CLIENT_send_replays(player, this);
}
}
return true;
}
......
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