Fixed explosives being directly usable by characters, causing them to explode when left clicking while holding them due to 9dd9425c. See #385

This commit is contained in:
Joonas Rikkonen
2018-04-24 18:00:23 +03:00
parent 1f460c401e
commit 91d6c7b91f
10 changed files with 25 additions and 27 deletions
@@ -73,13 +73,10 @@ namespace Barotrauma.Items.Components
projectileAnchor.X = element.GetAttributeFloat("projectileanchorx", 0.0f);
projectileAnchor.Y = element.GetAttributeFloat("projectileanchory", 0.0f);
projectileAnchor = ConvertUnits.ToSimUnits(projectileAnchor);
characterUsable = element.GetAttributeBool("characterusable", false);
sprite = new Sprite(spritePath, new Vector2(0.5f,0.5f));
sectionLength = ConvertUnits.ToSimUnits(sprite.size.X);
Path ropePath = new Path();
ropePath.Add(item.body.SimPosition);
ropePath.Add(item.body.SimPosition + new Vector2(length, 0.0f));