Impulses aren't applied to disabled item bodies when the submarine hits something, velocities of item bodies are reset when the item is dropped, pathfinding errors don't open the debug console

This commit is contained in:
Regalis
2016-06-01 20:55:15 +03:00
parent 1828198abf
commit 0621f6c9e3
4 changed files with 16 additions and 6 deletions

View File

@@ -511,7 +511,8 @@ namespace Barotrauma
foreach (Item item in Item.ItemList)
{
if (item.Submarine != submarine || item.CurrentHull == null || item.body == null) continue;
if (item.Submarine != submarine || item.CurrentHull == null ||
item.body == null || !item.body.Enabled) continue;
item.body.ApplyLinearImpulse(item.body.Mass * impulse);
}