Commit 32506dec authored by SherryChaos's avatar SherryChaos

bug fix

parent 1b430e09
...@@ -469,6 +469,7 @@ namespace MDPro3.Servant ...@@ -469,6 +469,7 @@ namespace MDPro3.Servant
int player = r.ReadInt16(); int player = r.ReadInt16();
var length = r.BaseStream.Length - 3; var length = r.BaseStream.Length - 3;
var content = r.ReadUnicode((int)length); var content = r.ReadUnicode((int)length);
//Debug.Log($"{player}: {content}");
Program.instance.ui_.chatPanel.AddChatItem(player, content); Program.instance.ui_.chatPanel.AddChatItem(player, content);
} }
......
...@@ -161,7 +161,7 @@ namespace MDPro3.UI.ServantUI ...@@ -161,7 +161,7 @@ namespace MDPro3.UI.ServantUI
roomPlayers[i].SetReadyIcon(RoomServant.players[i].ready); roomPlayers[i].SetReadyIcon(RoomServant.players[i].ready);
roomPlayers[i].SetButtonTextColor(RoomServant.SelfType == i ? Color.cyan : Color.white); roomPlayers[i].SetButtonTextColor(RoomServant.SelfType == i ? Color.cyan : Color.white);
var position = GetPlayerPositon(i); var position = GetPlayerPosition(i);
switch (position) switch (position)
{ {
case PlayerPosition.Me: case PlayerPosition.Me:
......
...@@ -154,7 +154,7 @@ namespace MDPro3.UI ...@@ -154,7 +154,7 @@ namespace MDPro3.UI
var nickName = GetPlayerName(player); var nickName = GetPlayerName(player);
GameObject item = null; GameObject item = null;
var position = GetPlayerPositon(player); var position = GetPlayerPosition(player);
switch (position) switch (position)
{ {
case PlayerPosition.Me: case PlayerPosition.Me:
...@@ -235,11 +235,26 @@ namespace MDPro3.UI ...@@ -235,11 +235,26 @@ namespace MDPro3.UI
{ {
if (!Program.instance.ocgcore.showing) if (!Program.instance.ocgcore.showing)
return player; return player;
if(player > -1 && player < 4 && !OcgCore.isFirst) if (RoomServant.SelfType == 7)
return player;
if(player > -1 && player < 4)
{
if(InFirst() && !OcgCore.isFirst)
return player ^ 2; return player ^ 2;
if(!InFirst() && OcgCore.isFirst)
return player ^ 2;
}
return player; return player;
} }
private static bool InFirst()
{
if(RoomServant.Mode < 2)
return RoomServant.SelfType == 0;
else
return RoomServant.SelfType == 0 || RoomServant.SelfType == 1;
}
private static string GetPlayerConfigName(PlayerPosition position) private static string GetPlayerConfigName(PlayerPosition position)
{ {
return position switch return position switch
...@@ -258,7 +273,7 @@ namespace MDPro3.UI ...@@ -258,7 +273,7 @@ namespace MDPro3.UI
public static string GetPlayerName(int player) public static string GetPlayerName(int player)
{ {
var playerPosition = GetPlayerPositon(player); var playerPosition = GetPlayerPosition(player);
player = GetRoomPlayerIndex(player); player = GetRoomPlayerIndex(player);
string nickName = ""; string nickName = "";
switch (player) switch (player)
...@@ -291,7 +306,7 @@ namespace MDPro3.UI ...@@ -291,7 +306,7 @@ namespace MDPro3.UI
return nickName; return nickName;
} }
public static PlayerPosition GetPlayerPositon(int player) public static PlayerPosition GetPlayerPosition(int player)
{ {
player = GetRoomPlayerIndex(player); player = GetRoomPlayerIndex(player);
PlayerPosition position; PlayerPosition position;
......
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