Commit 36e170ab authored by nanahira's avatar nanahira

fix send replay

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