409d4d9...aeafa16 (merge human-ai)

This commit is contained in:
Joonas Rikkonen
2019-03-18 22:52:17 +02:00
parent 80ab27df22
commit 3301bed442
88 changed files with 2334 additions and 1657 deletions
@@ -583,8 +583,8 @@ namespace Barotrauma.Tutorials
yield return Controlled.IsDead ? CoroutineStatus.Success : CoroutineStatus.Running;
}
}
if (brokenBox != null && brokenBox.Condition > brokenBox.Prefab.Health / 2.0f && pump.Voltage < pump.MinVoltage)
if (brokenBox != null && brokenBox.ConditionPercentage > 50.0f && pump.Voltage < pump.MinVoltage)
{
yield return new WaitForSeconds(1.0f);
@@ -670,7 +670,7 @@ namespace Barotrauma.Tutorials
Vector2 steering = targetPos - enemy.WorldPosition;
if (steering != Vector2.Zero) steering = Vector2.Normalize(steering);
enemy.AIController.Steering = steering * enemy.AnimController.GetCurrentSpeed(true);
enemy.AIController.Steering = steering;
yield return CoroutineStatus.Running;
} while (capacitors.FirstOrDefault(c => c.Charge > 0.4f) == null);
@@ -325,7 +325,7 @@ namespace Barotrauma.Tutorials
foreach (Item item in Item.ItemList)
{
if (!item.Repairables.Any() || item.Condition > item.Prefab.Health / 2.0f) continue;
if (!item.Repairables.Any() || item.ConditionPercentage > 50) continue;
degradedEquipmentFound = true;
break;
}