Added a collider to railgun (-> cannot go through walls or enemy subs anymore). Closes #444

This commit is contained in:
Joonas Rikkonen
2018-08-14 15:39:01 +03:00
parent 8233f3b8df
commit 1e02d7406d
3 changed files with 38 additions and 3 deletions
@@ -45,6 +45,8 @@ namespace Barotrauma
public List<IDrawableComponent> drawableComponents;
public PhysicsBody body;
public readonly XElement staticBodyConfig;
private Vector2 lastSentPos;
private bool prevBodyAwake;
@@ -399,6 +401,9 @@ namespace Barotrauma
case "deconstruct":
case "brokensprite":
break;
case "staticbody":
staticBodyConfig = subElement;
break;
case "aitarget":
aiTarget = new AITarget(this);
aiTarget.SightRange = subElement.GetAttributeFloat("sightrange", 1000.0f);