(bf212a41f) v0.9.2.0 pre-release test version
This commit is contained in:
@@ -90,6 +90,15 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
private Vector2 ClampParticlePos(Vector2 particlePos, Hull hull)
|
||||
{
|
||||
if (hull == null) return particlePos;
|
||||
|
||||
return new Vector2(
|
||||
MathHelper.Clamp(particlePos.X, hull.WorldRect.X, hull.WorldRect.Right),
|
||||
MathHelper.Clamp(particlePos.Y, hull.WorldRect.Y - hull.WorldRect.Height, hull.WorldRect.Y));
|
||||
}
|
||||
|
||||
private IEnumerable<object> DimLight(LightSource light)
|
||||
{
|
||||
float currBrightness = 1.0f;
|
||||
|
||||
@@ -260,20 +260,19 @@ namespace Barotrauma.Lights
|
||||
(int)(GameMain.GraphicsWidth * currLightMapScale), (int)(GameMain.GraphicsHeight * currLightMapScale)), Color.Black);
|
||||
spriteBatch.End();
|
||||
}
|
||||
else
|
||||
|
||||
visibleHulls = GetVisibleHulls(cam);
|
||||
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, transformMatrix: spriteBatchTransform);
|
||||
foreach (Rectangle drawRect in visibleHulls.Values)
|
||||
{
|
||||
visibleHulls = GetVisibleHulls(cam);
|
||||
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, transformMatrix: spriteBatchTransform);
|
||||
foreach (Rectangle drawRect in visibleHulls.Values)
|
||||
{
|
||||
//TODO: draw some sort of smoothed rectangle
|
||||
GUI.DrawRectangle(spriteBatch,
|
||||
new Vector2(drawRect.X, -drawRect.Y),
|
||||
new Vector2(drawRect.Width, drawRect.Height),
|
||||
Color.Black, true);
|
||||
}
|
||||
spriteBatch.End();
|
||||
}
|
||||
//TODO: draw some sort of smoothed rectangle
|
||||
GUI.DrawRectangle(spriteBatch,
|
||||
new Vector2(drawRect.X, -drawRect.Y),
|
||||
new Vector2(drawRect.Width, drawRect.Height),
|
||||
Color.Black, true);
|
||||
}
|
||||
spriteBatch.End();
|
||||
|
||||
|
||||
graphics.BlendState = BlendState.Additive;
|
||||
}
|
||||
|
||||
@@ -382,8 +382,28 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedList.Clear();
|
||||
newSelection.ForEach(e => AddSelection(e));
|
||||
selectedList = newSelection;
|
||||
//selectedList.Clear();
|
||||
//newSelection.ForEach(e => AddSelection(e));
|
||||
foreach (var entity in newSelection)
|
||||
{
|
||||
HandleDoorGapLinks(entity,
|
||||
onGapFound: (door, gap) =>
|
||||
{
|
||||
door.RefreshLinkedGap();
|
||||
if (!selectedList.Contains(gap))
|
||||
{
|
||||
selectedList.Add(gap);
|
||||
}
|
||||
},
|
||||
onDoorFound: (door, gap) =>
|
||||
{
|
||||
if (!selectedList.Contains(door.Item))
|
||||
{
|
||||
selectedList.Add(door.Item);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//select wire if both items it's connected to are selected
|
||||
|
||||
@@ -12,11 +12,6 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
partial class WallSection
|
||||
{
|
||||
public ConvexHull hull;
|
||||
}
|
||||
|
||||
partial class Structure : MapEntity, IDamageable, IServerSerializable
|
||||
{
|
||||
public static bool ShowWalls = true, ShowStructures = true;
|
||||
|
||||
Reference in New Issue
Block a user