- Larger icon for gap/ladder waypoints
- Creature-sub collision damage improvements (takes velocity of the limb into account) - In-sub particles move with the sub - Fixed artifacts spawning to non-pickable positions - Fixed ItemInventories not being drawn if the item is in a subslot - CauseOfDeath = Drowning if the character is in water while running out of oxy - Some more deconstructable items
This commit is contained in:
@@ -56,8 +56,8 @@ namespace Barotrauma
|
||||
Vector2 enemyDiff = Vector2.Normalize(enemy.Position - character.Position);
|
||||
float weaponAngle = ((weapon.body.Dir == 1.0f) ? weapon.body.Rotation : weapon.body.Rotation - MathHelper.Pi);
|
||||
Vector2 weaponDir = new Vector2((float)Math.Cos(weaponAngle), (float)Math.Sin(weaponAngle));
|
||||
|
||||
if (Vector2.Dot(enemyDiff, weaponDir)<0.9f) return;
|
||||
|
||||
if (Vector2.Dot(enemyDiff, weaponDir) < 0.9f) return;
|
||||
|
||||
List<FarseerPhysics.Dynamics.Body> ignoredBodies = new List<FarseerPhysics.Dynamics.Body>();
|
||||
foreach (Limb limb in character.AnimController.Limbs)
|
||||
|
||||
@@ -96,12 +96,17 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
character.AIController.SteeringManager.SteeringSeek(currTargetPos);
|
||||
|
||||
if (Vector2.Distance(currTargetPos, character.SimPosition) < 1.0f)
|
||||
{
|
||||
character.AIController.SteeringManager.Reset();
|
||||
character.AnimController.TargetDir = currTargetPos.X > character.SimPosition.X ? Direction.Right : Direction.Left;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
character.AIController.SteeringManager.SteeringSeek(currTargetPos);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsCompleted()
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (!MathUtils.IsValid(value)) return;
|
||||
oxygen = MathHelper.Clamp(value, 0.0f, 100.0f);
|
||||
if (oxygen == 0.0f) Kill(CauseOfDeath.Suffocation);
|
||||
if (oxygen == 0.0f) Kill(AnimController.InWater ? CauseOfDeath.Drowning : CauseOfDeath.Suffocation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user