18 if (teamNamePlateDistance <= 0)
31 int num = teamNamePlateDistance * 8;
40 for (
int i = 0; i < 255; i++)
42 if (!player[i].active || myPlayer == i || player[i].dead || player[myPlayer].team <= 0 || player[myPlayer].team != player[i].team)
46 string name = player[i].
name;
49 if (player[i].chatOverhead.timeLeft > 0)
51 num2 = (0f - namePlatePos.
Y) * uIScale;
53 else if (player[i].emoteTime > 0)
55 num2 = (0f - namePlatePos.
Y) * uIScale;
57 Vector2 vector =
new Vector2((
float)(screenWidth / 2) + screenPosition.
X, (
float)(screenHeight / 2) + screenPosition.
Y);
59 position += (position - vector) * (gameViewMatrix.
Zoom -
Vector2.
One);
61 float num4 = (float)(
int)mouseTextColor / 255f;
62 Color namePlateColor =
new Color((
byte)((
float)(
int)teamColor[player[i].team].
R * num4), (
byte)((
float)(
int)teamColor[player[i].team].
G * num4), (
byte)((
float)(
int)teamColor[player[i].team].
B * num4), mouseTextColor);
63 float num5 = position.X + (float)(player[i].width / 2) - vector.
X;
64 float num6 = position.Y - namePlatePos.Y - 2f + num2 - vector.
Y;
65 float num7 = (float)
Math.
Sqrt(num5 * num5 + num6 * num6);
66 int num8 = screenHeight;
67 if (screenHeight > screenWidth)
76 if (num7 < (
float)num8)
78 namePlatePos.X = position.X + (float)(player[i].width / 2) - namePlatePos.X / 2f - screenPosition.
X;
79 namePlatePos.Y = position.Y - namePlatePos.Y - 2f + num2 - screenPosition.
Y;
84 num7 = (float)num8 / num7;
85 namePlatePos.X = (float)(screenWidth / 2) + num5 * num7 - namePlatePos.X / 2f;
86 namePlatePos.Y = (float)(screenHeight / 2) + num6 * num7 + 40f * uIScale;
89 namePlatePos += vector2 / 2f;
90 namePlatePos *= 1f / uIScale;
91 namePlatePos -= vector2 / 2f;
92 if (player[myPlayer].gravDir == -1f)
94 namePlatePos.Y = (float)screenHeight - namePlatePos.
Y;
100 num10 -= (vector2.X - 85f) / 2f;
103 float num11 = (float)
Math.
Sqrt(num5 * num5 + num6 * num6);
104 if (!(num11 > (
float)num))
108 npDistPos.X = namePlatePos.X - num10;
109 npDistPos.Y = namePlatePos.Y + vector2.Y / 2f - npDistPos.Y / 2f - num9;
110 DrawPlayerName2(spriteBatch, ref namePlateColor, textValue, ref npDistPos);
113 position2.X -= 22f + num10;
115 playerRenderer.
DrawPlayerHead(camera, player[i], position2, 1f, 0.8f, playerHeadBordersColor);
116 Vector2 vector3 = npDistPos + screenPosition2 +
new Vector2(26f, 20f);
117 if (player[i].statLife != player[i].statLifeMax2)
126 DrawPlayerName(spriteBatch, name, ref namePlatePos, ref namePlateColor);