Characters with no CharacterInfo can't be selected, fixed broken tickboxes in server settings, inventory log tweaking, one gap sound per hull, chat message "commands" changed from /d to d;

This commit is contained in:
Regalis
2016-02-17 20:43:42 +02:00
parent 8129aa2ae5
commit 4ad8105cd6
16 changed files with 216 additions and 70 deletions
+12 -11
View File
@@ -653,6 +653,16 @@ namespace Barotrauma
if (IsKeyDown(InputType.Use)) selectedConstruction.Use(deltaTime, this);
if (selectedConstruction != null && IsKeyDown(InputType.Aim)) selectedConstruction.SecondaryUse(deltaTime, this);
}
if (selectedCharacter!=null)
{
if (Vector2.Distance(selectedCharacter.SimPosition, SimPosition) > 3.0f ||
(!selectedCharacter.isDead && selectedCharacter.Stun <= 0.0f))
{
DeselectCharacter();
}
}
if (IsNetworkPlayer)
{
@@ -828,10 +838,9 @@ namespace Barotrauma
if (findClosestTimer <= 0.0f || Screen.Selected == GameMain.EditMapScreen)
{
closestCharacter = FindClosestCharacter(mouseSimPos);
if (closestCharacter != null)
if (closestCharacter != null && closestCharacter.info==null)
{
// if (closestCharacter != selectedCharacter) selectedCharacter = null;
if (!closestCharacter.IsHumanoid) closestCharacter = null;
closestCharacter = null;
}
closestItem = FindClosestItem(mouseSimPos);
@@ -872,14 +881,6 @@ namespace Barotrauma
}
}
}
else
{
if (Vector2.Distance(selectedCharacter.SimPosition, SimPosition) > 2.0f ||
(!selectedCharacter.isDead && selectedCharacter.Stun <= 0.0f))
{
DeselectCharacter();
}
}
if (IsKeyHit(InputType.Select))
{