diff --git a/.vs/Subsurface_Solution/v14/.suo b/.vs/Subsurface_Solution/v14/.suo deleted file mode 100644 index f87552f79..000000000 Binary files a/.vs/Subsurface_Solution/v14/.suo and /dev/null differ diff --git a/Subsurface/Source/Items/Item.cs b/Subsurface/Source/Items/Item.cs index 327c36183..1dea6d528 100644 --- a/Subsurface/Source/Items/Item.cs +++ b/Subsurface/Source/Items/Item.cs @@ -872,12 +872,13 @@ namespace Barotrauma prefab.sprite.effects = oldEffects; - for (int i = 0; i < drawableComponents.Count; i++ ) + List staticDrawableComponents = new List(drawableComponents); //static list to compensate for drawable toggling + for (int i = 0; i < staticDrawableComponents.Count; i++ ) { - drawableComponents[i].Draw(spriteBatch, editing); + staticDrawableComponents[i].Draw(spriteBatch, editing); } - //foreach (ItemComponent component in components) component.Draw(spriteBatch, editing); + //foreach (ItemComponent component in components) component.Draw(spriteBatch, editing); if (GameMain.DebugDraw && aiTarget!=null) aiTarget.Draw(spriteBatch); diff --git a/Subsurface/Source/Map/MapEntityPrefab.cs b/Subsurface/Source/Map/MapEntityPrefab.cs index d3f12afdc..7f6dacd67 100644 --- a/Subsurface/Source/Map/MapEntityPrefab.cs +++ b/Subsurface/Source/Map/MapEntityPrefab.cs @@ -31,9 +31,9 @@ namespace Barotrauma protected ConstructorInfo constructor; //is it possible to stretch the entity horizontally/vertically - protected bool resizeHorizontal; - protected bool resizeVertical; - + public bool resizeHorizontal { get; protected set; } + public bool resizeVertical { get; protected set; } + //which prefab has been selected for placing protected static MapEntityPrefab selected; diff --git a/Subsurface/Source/Map/Structure.cs b/Subsurface/Source/Map/Structure.cs index f7514a0fd..61d04c532 100644 --- a/Subsurface/Source/Map/Structure.cs +++ b/Subsurface/Source/Map/Structure.cs @@ -63,6 +63,16 @@ namespace Barotrauma public SpriteEffects SpriteEffects = SpriteEffects.None; + public bool resizeHorizontal + { + get { return prefab.resizeHorizontal; } + } + + public bool resizeVertical + { + get { return prefab.resizeVertical; } + } + private bool flippedX; public override Sprite Sprite diff --git a/Subsurface/Source/Screens/GameScreen.cs b/Subsurface/Source/Screens/GameScreen.cs index 3f419f320..2c860927d 100644 --- a/Subsurface/Source/Screens/GameScreen.cs +++ b/Subsurface/Source/Screens/GameScreen.cs @@ -239,7 +239,7 @@ namespace Barotrauma null, null, null, null, cam.Transform); - Submarine.DrawBack(spriteBatch,false,s => s is Structure); + Submarine.DrawBack(spriteBatch,false,s => s is Structure && ((s as Structure).resizeHorizontal || (s as Structure).resizeVertical)); spriteBatch.End(); @@ -255,7 +255,7 @@ namespace Barotrauma null, null, null, null, cam.Transform); - Submarine.DrawBack(spriteBatch, false, s => !(s is Structure)); + Submarine.DrawBack(spriteBatch, false, s => (!(s is Structure)) || (!(s as Structure).resizeHorizontal && !(s as Structure).resizeHorizontal)); foreach (Character c in Character.CharacterList) c.Draw(spriteBatch); @@ -336,6 +336,8 @@ namespace Barotrauma Submarine.DrawDamageable(spriteBatch, null); spriteBatch.End(); + GameMain.LightManager.DrawLightMap(spriteBatch, lightBlur.Effect); + GameMain.LightManager.DrawLOS(spriteBatch, lightBlur.Effect, true); } @@ -398,9 +400,9 @@ namespace Barotrauma spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); - float r = Math.Min(CharacterHUD.damageOverlayTimer * 0.03f, 0.04f); + float r = Math.Min(CharacterHUD.damageOverlayTimer * 0.5f, 0.1f); spriteBatch.Draw(renderTarget, new Rectangle(0, 0, GameMain.GraphicsWidth, GameMain.GraphicsHeight), - new Color(0.04f + r, Math.Max(0.04f-r,0.0f), Math.Max(0.045f - r, 0.0f), 1.0f)); + new Color(r, Math.Max(0.07f-r*0.07f/0.1f,0.0f), Math.Max(0.1f - r, 0.0f), 1.0f)); spriteBatch.End(); }