Aiming is disabled when unconscious/stunned, the range of fire lightsources isn't randomized to reduce the amount of required convexhull updates
This commit is contained in:
@@ -50,7 +50,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
|
||||
newTargetTimer = currentTarget == null ? 5.0f : 10.0f;
|
||||
newTargetTimer = currentTarget == null ? 5.0f : 15.0f;
|
||||
}
|
||||
|
||||
newTargetTimer -= deltaTime;
|
||||
|
||||
@@ -973,6 +973,8 @@ namespace Barotrauma
|
||||
{
|
||||
Holdable holdable = item.GetComponent<Holdable>();
|
||||
|
||||
if (character.IsUnconscious || character.Stun > 0.0f) aim = false;
|
||||
|
||||
//calculate the handle positions
|
||||
Matrix itemTransfrom = Matrix.CreateRotationZ(item.body.Rotation);
|
||||
Vector2[] transformedHandlePos = new Vector2[2];
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace Barotrauma
|
||||
|
||||
LimitSize();
|
||||
|
||||
lightSource.Range = Math.Max(size.X, size.Y) * Rand.Range(8.0f, 10.0f) / 2.0f;
|
||||
lightSource.Range = Math.Max(size.X, size.Y) * 10.0f / 2.0f;
|
||||
lightSource.Color = new Color(1.0f, 0.45f, 0.3f) * Rand.Range(0.8f, 1.0f);
|
||||
lightSource.Position = position;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user