(98501b696) Reduce the max accepted distance for repair tool ai operate.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:30:23 +03:00
parent 348f21598e
commit 54a0164f89
34 changed files with 387 additions and 227 deletions
@@ -132,6 +132,8 @@ namespace Barotrauma
private GUILayoutGroup subPreviewContainer;
private GUILayoutGroup subPreviewContainer;
private GUIButton loadGameButton;
public Action<Submarine, string, string> StartNewGame;
@@ -149,8 +149,8 @@ namespace Barotrauma
//These will be visible through the LOS effect.
//Could be drawn with one Submarine.DrawBack call, but we can avoid sorting by depth by doing it like this.
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, DepthStencilState.None, null, null, cam.Transform);
Submarine.DrawBack(spriteBatch, false, e => e is Structure s && (s.ResizeVertical || s.ResizeHorizontal) && !s.DrawDamageEffect);
Submarine.DrawBack(spriteBatch, false, e => e is Structure s && !(s.ResizeVertical && s.ResizeHorizontal) && s.Prefab.BackgroundSprite != null);
Submarine.DrawBack(spriteBatch, false, s => s is Structure && s.ResizeVertical && s.ResizeHorizontal);
Submarine.DrawBack(spriteBatch, false, s => s is Structure && !(s.ResizeVertical && s.ResizeHorizontal) && ((Structure)s).Prefab.BackgroundSprite != null);
spriteBatch.End();
graphics.SetRenderTarget(null);
@@ -817,7 +817,7 @@ namespace Barotrauma
{
if (dummyCharacter != null) RemoveDummyCharacter();
dummyCharacter = Character.Create(Character.HumanConfigFile, Vector2.Zero, "", hasAi: false);
dummyCharacter = Character.Create(Character.HumanConfigFile, Vector2.Zero, "");
//make space for the entity menu
for (int i = 0; i < dummyCharacter.Inventory.SlotPositions.Length; i++)
@@ -2282,11 +2282,6 @@ namespace Barotrauma
GameMain.LightManager.UpdateLightMap(graphics, spriteBatch, cam);
}
foreach (Submarine sub in Submarine.Loaded)
{
sub.UpdateTransform();
}
spriteBatch.Begin(SpriteSortMode.BackToFront,
BlendState.AlphaBlend,
null, null, null, null,