Commit 174fa0b7 authored by nanahira's avatar nanahira

fix

parent 07e222d5
...@@ -1894,6 +1894,14 @@ ygopro.stoc_follow 'CHAT', true, (buffer, info, client, server)-> ...@@ -1894,6 +1894,14 @@ ygopro.stoc_follow 'CHAT', true, (buffer, info, client, server)->
room=ROOM_all[client.rid] room=ROOM_all[client.rid]
pid = info.player pid = info.player
return unless room and pid < 4 and settings.modules.chat_color.enabled return unless room and pid < 4 and settings.modules.chat_color.enabled
if room.started and room.turn > 0 and !room.dueling_players[0].is_first
if room.hostinfo.mode == 2
pid = 2 if pid == 0
pid = 3 if pid == 1
pid = 0 if pid == 2
pid = 1 if pid == 3
else
pid = 1 - pid
for player in room.players when player and player.pos == pid for player in room.players when player and player.pos == pid
tplayer = player tplayer = player
return unless tplayer return unless tplayer
......
...@@ -2381,6 +2381,24 @@ ...@@ -2381,6 +2381,24 @@
if (!(room && pid < 4 && settings.modules.chat_color.enabled)) { if (!(room && pid < 4 && settings.modules.chat_color.enabled)) {
return; return;
} }
if (room.started && room.turn > 0 && !room.dueling_players[0].is_first) {
if (room.hostinfo.mode === 2) {
if (pid === 0) {
pid = 2;
}
if (pid === 1) {
pid = 3;
}
if (pid === 2) {
pid = 0;
}
if (pid === 3) {
pid = 1;
}
} else {
pid = 1 - pid;
}
}
ref = room.players; ref = room.players;
for (j = 0, len = ref.length; j < len; j++) { for (j = 0, len = ref.length; j < len; j++) {
player = ref[j]; player = ref[j];
......
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