Commit e13291c3 authored by nanahira's avatar nanahira

fix replay save in tag

parent c608e103
...@@ -1998,8 +1998,9 @@ ygopro.stoc_follow 'REPLAY', true, (buffer, info, client, server)-> ...@@ -1998,8 +1998,9 @@ ygopro.stoc_follow 'REPLAY', true, (buffer, info, client, server)->
roomid: room.port.toString(), roomid: room.port.toString(),
cloud_replay_id: "R#"+room.cloud_replay_id, cloud_replay_id: "R#"+room.cloud_replay_id,
replay_filename: replay_filename, replay_filename: replay_filename,
roommode: room.hostinfo.mode,
players: (for player in room.dueling_players players: (for player in room.dueling_players
name: player.name + (if settings.modules.tournament_mode.show_ip and !player.is_local then (" (IP: " + player.ip.slice(7) + ")") else "") + (if settings.modules.tournament_mode.show_info and not (room.hostinfo.mode == 2 and player.pos > 1) then (" (Score:" + room.scores[player.name] + " LP:" + (if player.lp? then player.lp else room.hostinfo.start_lp) + ")") else ""), name: player.name + (if settings.modules.tournament_mode.show_ip and !player.is_local then (" (IP: " + player.ip.slice(7) + ")") else "") + (if settings.modules.tournament_mode.show_info and not (room.hostinfo.mode == 2 and player.pos % 2 > 0) then (" (Score:" + room.scores[player.name] + " LP:" + (if player.lp? then player.lp else room.hostinfo.start_lp) + ")") else ""),
winner: player.pos == room.winner winner: player.pos == room.winner
) )
} }
...@@ -2237,7 +2238,7 @@ if settings.modules.http ...@@ -2237,7 +2238,7 @@ if settings.modules.http
else if u.query.death else if u.query.death
death_room_found = false death_room_found = false
for room in ROOM_all when room and room.established and room.started and !room.death and (u.query.death == "all" or u.query.death == room.port.toString()) for room in ROOM_all when room and room.established and room.started and !room.death and (u.query.death == "all" or u.query.death == room.port.toString()) and room.hostinfo.mode != 2
death_room_found = true death_room_found = true
if !room.changing_side and (!room.duel_count or room.turn) if !room.changing_side and (!room.duel_count or room.turn)
room.death = (if room.turn then room.turn + 4 else 5) room.death = (if room.turn then room.turn + 4 else 5)
......
...@@ -2536,6 +2536,7 @@ ...@@ -2536,6 +2536,7 @@
roomid: room.port.toString(), roomid: room.port.toString(),
cloud_replay_id: "R#" + room.cloud_replay_id, cloud_replay_id: "R#" + room.cloud_replay_id,
replay_filename: replay_filename, replay_filename: replay_filename,
roommode: room.hostinfo.mode,
players: (function() { players: (function() {
var l, len2, ref2, results; var l, len2, ref2, results;
ref2 = room.dueling_players; ref2 = room.dueling_players;
...@@ -2543,7 +2544,7 @@ ...@@ -2543,7 +2544,7 @@
for (l = 0, len2 = ref2.length; l < len2; l++) { for (l = 0, len2 = ref2.length; l < len2; l++) {
player = ref2[l]; player = ref2[l];
results.push({ results.push({
name: player.name + (settings.modules.tournament_mode.show_ip && !player.is_local ? " (IP: " + player.ip.slice(7) + ")" : "") + (settings.modules.tournament_mode.show_info && !(room.hostinfo.mode === 2 && player.pos > 1) ? " (Score:" + room.scores[player.name] + " LP:" + (player.lp != null ? player.lp : room.hostinfo.start_lp) + ")" : ""), name: player.name + (settings.modules.tournament_mode.show_ip && !player.is_local ? " (IP: " + player.ip.slice(7) + ")" : "") + (settings.modules.tournament_mode.show_info && !(room.hostinfo.mode === 2 && player.pos % 2 > 0) ? " (Score:" + room.scores[player.name] + " LP:" + (player.lp != null ? player.lp : room.hostinfo.start_lp) + ")" : ""),
winner: player.pos === room.winner winner: player.pos === room.winner
}); });
} }
...@@ -2853,7 +2854,7 @@ ...@@ -2853,7 +2854,7 @@
death_room_found = false; death_room_found = false;
for (l = 0, len2 = ROOM_all.length; l < len2; l++) { for (l = 0, len2 = ROOM_all.length; l < len2; l++) {
room = ROOM_all[l]; room = ROOM_all[l];
if (!(room && room.established && room.started && !room.death && (u.query.death === "all" || u.query.death === room.port.toString()))) { if (!(room && room.established && room.started && !room.death && (u.query.death === "all" || u.query.death === room.port.toString()) && room.hostinfo.mode !== 2)) {
continue; continue;
} }
death_room_found = true; death_room_found = 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