Increased character visibility range (how far monsters can see characters from), enemies manually steer towards their target if their steering path is finished or unreachable, mantis tweaking

This commit is contained in:
Regalis
2016-11-24 19:17:49 +02:00
parent baf6a94e38
commit 12f98268b5
3 changed files with 14 additions and 6 deletions
@@ -251,6 +251,16 @@ namespace Barotrauma
if (attackLimb != null)
{
steeringManager.SteeringSeek(attackSimPosition - (attackLimb.SimPosition - SimPosition));
if (steeringManager is IndoorsSteeringManager)
{
var indoorsSteering = (IndoorsSteeringManager)steeringManager;
if (indoorsSteering.CurrentPath!=null && (indoorsSteering.CurrentPath.Finished || indoorsSteering.CurrentPath.Unreachable))
{
steeringManager.SteeringManual(deltaTime, attackSimPosition - attackLimb.SimPosition);
}
}
if (attackingLimb != null) UpdateLimbAttack(deltaTime, attackingLimb, attackSimPosition);
}
}
+1 -3
View File
@@ -1357,9 +1357,7 @@ namespace Barotrauma
{
if (aiTarget == null) return;
aiTarget.SightRange = 0.0f;
aiTarget.SightRange = Mass*10.0f + AnimController.Collider.LinearVelocity.Length()*500.0f;
aiTarget.SightRange = Mass*100.0f + AnimController.Collider.LinearVelocity.Length()*500.0f;
}
public void ShowSpeechBubble(float duration, Color color)