Item UI replacements, fabricator bugfix, randomly spawning artifacts, AI can fix leaks, LimbAttacks do damage once (not each frame for the duration of the attack)
This commit is contained in:
@@ -39,36 +39,11 @@ namespace Barotrauma
|
||||
|
||||
public override void Start(Level level)
|
||||
{
|
||||
Vector2 position = Vector2.Zero;
|
||||
|
||||
int tries = 0;
|
||||
do
|
||||
{
|
||||
Vector2 tryPos = level.PositionsOfInterest[Rand.Int(level.PositionsOfInterest.Count, false)];
|
||||
|
||||
if (Submarine.PickBody(
|
||||
ConvertUnits.ToSimUnits(tryPos),
|
||||
ConvertUnits.ToSimUnits(tryPos - Vector2.UnitY*level.Size.Y),
|
||||
null, Physics.CollisionLevel) != null)
|
||||
{
|
||||
position = ConvertUnits.ToDisplayUnits(Submarine.LastPickedPosition);
|
||||
break;
|
||||
}
|
||||
|
||||
tries++;
|
||||
|
||||
if (tries==10)
|
||||
{
|
||||
position = level.EndPosition - Vector2.UnitY*300.0f;
|
||||
}
|
||||
|
||||
} while (tries < 10);
|
||||
|
||||
|
||||
Vector2 position = Level.Loaded.GetRandomItemPos(30.0f);
|
||||
|
||||
item = new Item(itemPrefab, position, null);
|
||||
item.MoveWithLevel = true;
|
||||
item.body.FarseerBody.IsKinematic = true;
|
||||
//item.MoveWithLevel = true;
|
||||
}
|
||||
|
||||
public override void Update(float deltaTime)
|
||||
|
||||
Reference in New Issue
Block a user