@@ -205,10 +205,15 @@ namespace Barotrauma
|
|||||||
Vector2 startPos = character.DrawPosition + (character.FocusedCharacter.DrawPosition - character.DrawPosition) * 0.7f;
|
Vector2 startPos = character.DrawPosition + (character.FocusedCharacter.DrawPosition - character.DrawPosition) * 0.7f;
|
||||||
startPos = cam.WorldToScreen(startPos);
|
startPos = cam.WorldToScreen(startPos);
|
||||||
|
|
||||||
|
string focusName = character.FocusedCharacter.SpeciesName;
|
||||||
|
if (character.FocusedCharacter.Info != null)
|
||||||
|
{
|
||||||
|
focusName = character.FocusedCharacter.Info.Name;
|
||||||
|
}
|
||||||
Vector2 textPos = startPos;
|
Vector2 textPos = startPos;
|
||||||
textPos -= new Vector2(GUI.Font.MeasureString(character.FocusedCharacter.Info.Name).X / 2, 20);
|
textPos -= new Vector2(GUI.Font.MeasureString(focusName).X / 2, 20);
|
||||||
|
|
||||||
GUI.DrawString(spriteBatch, textPos, character.FocusedCharacter.Info.Name, Color.White, Color.Black, 2);
|
GUI.DrawString(spriteBatch, textPos, focusName, Color.White, Color.Black, 2);
|
||||||
}
|
}
|
||||||
else if (character.SelectedCharacter == null && character.FocusedItem != null && character.SelectedConstruction == null)
|
else if (character.SelectedCharacter == null && character.FocusedItem != null && character.SelectedConstruction == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1031,7 +1031,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public bool CanInteractWith(Character c, float maxDist = 200.0f)
|
public bool CanInteractWith(Character c, float maxDist = 200.0f)
|
||||||
{
|
{
|
||||||
if (c == this || !c.Enabled || !c.CanBeSelected) return false;
|
if (c == this || !c.Enabled || !c.IsHumanoid || !c.CanBeSelected) return false;
|
||||||
|
|
||||||
maxDist = ConvertUnits.ToSimUnits(maxDist);
|
maxDist = ConvertUnits.ToSimUnits(maxDist);
|
||||||
if (Vector2.DistanceSquared(SimPosition, c.SimPosition) > maxDist * maxDist) return false;
|
if (Vector2.DistanceSquared(SimPosition, c.SimPosition) > maxDist * maxDist) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user