Item.Container bugfix (affected at least railguns in MP), merged the "your crew has died" message box with shiftsummary, reliable reactor syncing, prevent artifacts dropping out of the level
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Barotrauma.Networking;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
@@ -29,6 +30,7 @@ namespace Barotrauma
|
||||
Vector2 position = level.PositionsOfInterest[Rand.Int(level.PositionsOfInterest.Count, false)];
|
||||
|
||||
monster = Character.Create(monsterFile, position);
|
||||
monster.Enabled = false;
|
||||
radarPosition = monster.Position;
|
||||
}
|
||||
|
||||
@@ -37,7 +39,14 @@ namespace Barotrauma
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
if (monster.Enabled) radarPosition = monster.Position;
|
||||
if (monster.Enabled)
|
||||
{
|
||||
radarPosition = monster.Position;
|
||||
}
|
||||
else
|
||||
{ Vector2 diff = monster.WorldPosition-Submarine.Loaded.WorldPosition;
|
||||
monster.Enabled = FarseerPhysics.ConvertUnits.ToSimUnits(diff.Length()) < NetConfig.CharacterIgnoreDistance;
|
||||
}
|
||||
|
||||
if (!monster.IsDead) return;
|
||||
ShowMessage(state);
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Barotrauma
|
||||
ConvertUnits.ToSimUnits(tryPos - Vector2.UnitY*level.Size.Y),
|
||||
null, Physics.CollisionLevel) != null)
|
||||
{
|
||||
position = tryPos;
|
||||
position = ConvertUnits.ToDisplayUnits(Submarine.LastPickedPosition);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Barotrauma
|
||||
|
||||
item = new Item(itemPrefab, position, null);
|
||||
item.MoveWithLevel = true;
|
||||
item.body.FarseerBody.GravityScale = 0.5f;
|
||||
item.body.FarseerBody.IsKinematic = true;
|
||||
//item.MoveWithLevel = true;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,10 @@ namespace Barotrauma
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
//item.body.LinearVelocity = Vector2.Zero;
|
||||
if (item.Inventory!=null) item.body.FarseerBody.IsKinematic = false;
|
||||
if (item.CurrentHull == null) return;
|
||||
|
||||
ShowMessage(state);
|
||||
state = 1;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user