Fixed projectiles (e.g. railgun shells) not colliding with the sub when shot from outside, fixed lightcomponents not being positioned correctly on moving items

This commit is contained in:
Regalis
2016-03-12 21:28:39 +02:00
parent d1580328ed
commit c99f94b1de
5 changed files with 23 additions and 8 deletions
@@ -149,6 +149,16 @@ namespace Barotrauma.Items.Components
AttackResult attackResult = new AttackResult(0.0f, 0.0f);
if (attack != null)
{
var submarine = f2.Body.UserData as Submarine;
if (submarine != null)
{
item.Move(-submarine.Position);
item.Submarine = submarine;
item.body.Submarine = submarine;
item.FindHull();
return false;
}
Limb limb;
Structure structure;
if ((limb = (f2.Body.UserData as Limb)) != null)