Some cleanup using ReSharper (mostly removing redundancies)

This commit is contained in:
Regalis
2016-03-12 15:32:34 +02:00
parent ae4e4d8f34
commit d1580328ed
99 changed files with 197 additions and 483 deletions
+2 -2
View File
@@ -79,7 +79,7 @@ namespace Barotrauma.Items.Components
ToolBox.GetAttributeVector2(element, "origin", Vector2.Zero));
}
public override void Draw(SpriteBatch spriteBatch, bool editing)
public override void Draw(SpriteBatch spriteBatch, bool editing = false)
{
Vector2 drawPos = new Vector2(item.Rect.X, item.Rect.Y);
if (item.Submarine != null) drawPos += item.Submarine.DrawPosition;
@@ -270,7 +270,7 @@ namespace Barotrauma.Items.Components
if (Math.Abs(MathUtils.GetShortestAngle(enemyAngle, turretAngle)) > 0.01f) return false;
var pickedBody = Submarine.PickBody(ConvertUnits.ToSimUnits(item.WorldPosition), closestEnemy.SimPosition, null);
if (pickedBody != null && pickedBody.UserData as Limb == null) return false;
if (pickedBody != null && !(pickedBody.UserData is Limb)) return false;
if (objective.Option.ToLower()=="fire at will") Use(deltaTime, character);