Ragdoll raycast crash, holding items in correct angles, ghost wires, dropping items properly in editmapscreen, radar wont work without power, remove wire from connectors if its deleted

This commit is contained in:
Regalis
2015-10-26 01:46:52 +02:00
parent aeeae13b35
commit ebe248a7cc
25 changed files with 142 additions and 88 deletions
+5 -4
View File
@@ -130,12 +130,13 @@ namespace Barotrauma.Items.Components
Projectile projectileComponent = null;
//search for a projectile from linked containers
Item projectile = null;
Item projectileContainer = null;
foreach (MapEntity e in item.linkedTo)
{
Item container = e as Item;
if (container == null) continue;
projectileContainer = e as Item;
if (projectileContainer == null) continue;
ItemContainer containerComponent = container.GetComponent<ItemContainer>();
ItemContainer containerComponent = projectileContainer.GetComponent<ItemContainer>();
if (containerComponent == null) continue;
for (int i = 0; i < containerComponent.inventory.items.Length; i++)
@@ -182,7 +183,7 @@ namespace Barotrauma.Items.Components
projectile.SetTransform(ConvertUnits.ToSimUnits(new Vector2(item.Rect.X + barrelPos.X, item.Rect.Y - barrelPos.Y)), -rotation);
projectileComponent.Use(deltaTime);
item.RemoveContained(projectile);
projectileContainer.RemoveContained(projectile);
return true;
}