Cleanup (removing unused variables & other redundancies, rethrowing exceptions instead of wrapping them in a new exception instance)
This commit is contained in:
@@ -30,9 +30,7 @@ namespace Barotrauma
|
||||
private float updateTargetsTimer;
|
||||
|
||||
private float raycastTimer;
|
||||
|
||||
private Vector2 prevPosition;
|
||||
|
||||
|
||||
//a timer for attacks such as biting that last for a specific amount of time
|
||||
//the duration is determined by the attackDuration of the attacking limb
|
||||
private float attackTimer;
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace Barotrauma
|
||||
/// makes the character act according to the objective, or according to any subobjectives that
|
||||
/// need to be completed before this one
|
||||
/// </summary>
|
||||
/// <param name="character">the character who's trying to achieve the objective</param>
|
||||
public void TryComplete(float deltaTime)
|
||||
{
|
||||
subObjectives.RemoveAll(s => s.IsCompleted() || !s.CanBeCompleted);
|
||||
|
||||
@@ -5,8 +5,6 @@ namespace Barotrauma
|
||||
{
|
||||
class AICharacter : Character
|
||||
{
|
||||
const float AttackBackPriority = 1.0f;
|
||||
|
||||
private AIController aiController;
|
||||
|
||||
public override AIController AIController
|
||||
|
||||
@@ -857,7 +857,7 @@ namespace Barotrauma
|
||||
headInWater = false;
|
||||
|
||||
inWater = false;
|
||||
if (inWater = currentHull.Volume > currentHull.FullVolume * 0.95f)
|
||||
if (currentHull.Volume > currentHull.FullVolume * 0.95f)
|
||||
{
|
||||
inWater = true;
|
||||
}
|
||||
@@ -1435,8 +1435,6 @@ namespace Barotrauma
|
||||
|
||||
public Vector2 GetColliderBottom()
|
||||
{
|
||||
float halfHeight = Collider.height * 0.5f + Collider.radius;
|
||||
|
||||
float offset = 0.0f;
|
||||
|
||||
if (!character.IsUnconscious && !character.IsDead && character.Stun <= 0.0f)
|
||||
|
||||
@@ -37,9 +37,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<Item> SpawnItems = new List<Item>();
|
||||
|
||||
|
||||
private bool enabled = true;
|
||||
public bool Enabled
|
||||
{
|
||||
|
||||
@@ -70,7 +70,6 @@ namespace Barotrauma
|
||||
public InputNetFlags states; //keys pressed/other boolean states at this step
|
||||
public UInt16 intAim; //aim angle, represented as an unsigned short where 0=0º, 65535=just a bit under 360º
|
||||
public UInt16 interact; //id of the entity being interacted with
|
||||
public AnimController.Animation? animation;
|
||||
|
||||
public UInt16 networkUpdateID;
|
||||
}
|
||||
|
||||
@@ -131,9 +131,7 @@ namespace Barotrauma
|
||||
item.AddTag(s);
|
||||
}
|
||||
}
|
||||
|
||||
character.SpawnItems.Add(item);
|
||||
|
||||
|
||||
if (parentItem != null) parentItem.Combine(item);
|
||||
|
||||
foreach (XElement childItemElement in itemElement.Elements())
|
||||
@@ -142,7 +140,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public virtual XElement Save(XElement parentElement)
|
||||
public XElement Save(XElement parentElement)
|
||||
{
|
||||
XElement jobElement = new XElement("job");
|
||||
|
||||
|
||||
@@ -48,13 +48,7 @@ namespace Barotrauma
|
||||
public readonly LimbType type;
|
||||
|
||||
public readonly bool ignoreCollisions;
|
||||
|
||||
//private readonly float maxHealth;
|
||||
//private float damage;
|
||||
//private float bleeding;
|
||||
|
||||
public readonly float impactTolerance;
|
||||
|
||||
|
||||
private float damage, burnt;
|
||||
|
||||
private readonly Vector2 armorSector;
|
||||
|
||||
Reference in New Issue
Block a user