Commit 6b716e4d authored by nanahira's avatar nanahira

fix duel win in siding

parent 0f0b09bd
...@@ -1827,7 +1827,7 @@ ygopro.stoc_follow 'GAME_MSG', true, (buffer, info, client, server)-> ...@@ -1827,7 +1827,7 @@ ygopro.stoc_follow 'GAME_MSG', true, (buffer, info, client, server)->
if ygopro.constants.MSG[msg] == 'WIN' and client.pos == 0 if ygopro.constants.MSG[msg] == 'WIN' and client.pos == 0
pos = buffer.readUInt8(1) pos = buffer.readUInt8(1)
pos = 1 - pos unless client.is_first or pos == 2 pos = 1 - pos unless client.is_first or pos == 2 or room.turn == 0 or !room.turn
pos = pos * 2 if pos >= 0 and room.hostinfo.mode == 2 pos = pos * 2 if pos >= 0 and room.hostinfo.mode == 2
reason = buffer.readUInt8(2) reason = buffer.readUInt8(2)
#log.info {winner: pos, reason: reason} #log.info {winner: pos, reason: reason}
......
...@@ -2199,7 +2199,7 @@ ...@@ -2199,7 +2199,7 @@
} }
if (ygopro.constants.MSG[msg] === 'WIN' && client.pos === 0) { if (ygopro.constants.MSG[msg] === 'WIN' && client.pos === 0) {
pos = buffer.readUInt8(1); pos = buffer.readUInt8(1);
if (!(client.is_first || pos === 2)) { if (!(client.is_first || pos === 2 || room.turn === 0 || !room.turn)) {
pos = 1 - pos; pos = 1 - pos;
} }
if (pos >= 0 && room.hostinfo.mode === 2) { if (pos >= 0 && room.hostinfo.mode === 2) {
......
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