Release 1.9.7.0 - Summer Update 2025
This commit is contained in:
@@ -316,9 +316,6 @@ namespace Barotrauma
|
||||
if (worldPosition.X + extents.X > worldView.Right || worldPosition.X + extents.Width < worldView.X) { return false; }
|
||||
if (worldPosition.Y + extents.Height < worldView.Y - worldView.Height || worldPosition.Y + extents.Y > worldView.Y) { return false; }
|
||||
|
||||
if (extents.Width * Screen.Selected.Cam.Zoom < 1.0f) { return false; }
|
||||
if (extents.Height * Screen.Selected.Cam.Zoom < 1.0f) { return false; }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -327,7 +324,7 @@ namespace Barotrauma
|
||||
Draw(spriteBatch, editing, back, overrideColor: null);
|
||||
}
|
||||
|
||||
public void Draw(SpriteBatch spriteBatch, bool editing, bool back = true, Color? overrideColor = null)
|
||||
public void Draw(SpriteBatch spriteBatch, bool editing, bool back = true, Color? overrideColor = null, float? overrideDepth = null)
|
||||
{
|
||||
if (!Visible || (!editing && IsHidden) || !SubEditorScreen.IsLayerVisible(this)) { return; }
|
||||
|
||||
@@ -395,7 +392,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
float depth = GetDrawDepth();
|
||||
float depth = overrideDepth ?? GetDrawDepth();
|
||||
if (isWiringMode && isLogic && !PlayerInput.IsShiftDown()) { depth = 0.01f; }
|
||||
if (activeSprite != null)
|
||||
{
|
||||
@@ -427,7 +424,7 @@ namespace Barotrauma
|
||||
textureScale: Vector2.One * Scale,
|
||||
depth: d);
|
||||
}
|
||||
DrawDecorativeSprites(spriteBatch, DrawPosition, flippedX && Prefab.CanSpriteFlipX, flippedY && Prefab.CanSpriteFlipY, rotation: 0, depth, overrideColor);
|
||||
DrawDecorativeSprites(spriteBatch, DrawPosition, FlippedX && Prefab.CanSpriteFlipX, FlippedY && Prefab.CanSpriteFlipY, rotation: 0, depth, overrideColor);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -448,7 +445,7 @@ namespace Barotrauma
|
||||
Prefab.DamagedInfectedSprite?.Draw(spriteBatch, new Vector2(DrawPosition.X, -DrawPosition.Y) + drawOffset, Infector.HealthColor, Prefab.DamagedInfectedSprite.Origin, RotationRad, Scale, activeSprite.effects, depth - 0.002f);
|
||||
}
|
||||
|
||||
DrawDecorativeSprites(spriteBatch, DrawPosition, flippedX && Prefab.CanSpriteFlipX, flippedY && Prefab.CanSpriteFlipY, -RotationRad, depth, overrideColor);
|
||||
DrawDecorativeSprites(spriteBatch, DrawPosition, FlippedX && Prefab.CanSpriteFlipX, FlippedY && Prefab.CanSpriteFlipY, -RotationRad, depth, overrideColor);
|
||||
}
|
||||
}
|
||||
else if (body.Enabled)
|
||||
@@ -524,8 +521,8 @@ namespace Barotrauma
|
||||
if (!spriteAnimState[decorativeSprite].IsActive) { continue; }
|
||||
float rotation = decorativeSprite.GetRotation(ref spriteAnimState[decorativeSprite].RotationState, spriteAnimState[decorativeSprite].RandomRotationFactor);
|
||||
Vector2 offset = decorativeSprite.GetOffset(ref spriteAnimState[decorativeSprite].OffsetState, spriteAnimState[decorativeSprite].RandomOffsetMultiplier, -RotationRad) * Scale;
|
||||
if (flippedX && Prefab.CanSpriteFlipX) { offset.X = -offset.X; }
|
||||
if (flippedY && Prefab.CanSpriteFlipY) { offset.Y = -offset.Y; }
|
||||
if (FlippedX && Prefab.CanSpriteFlipX) { offset.X = -offset.X; }
|
||||
if (FlippedY && Prefab.CanSpriteFlipY) { offset.Y = -offset.Y; }
|
||||
decorativeSprite.Sprite.Draw(spriteBatch, new Vector2(DrawPosition.X + offset.X, -(DrawPosition.Y + offset.Y)), color, decorativeSprite.Sprite.Origin,
|
||||
rotation, decorativeSprite.GetScale(ref spriteAnimState[decorativeSprite].ScaleState, spriteAnimState[decorativeSprite].RandomScaleFactor) * Scale, activeSprite.effects,
|
||||
depth: depth + (decorativeSprite.Sprite.Depth - activeSprite.Depth));
|
||||
@@ -543,7 +540,7 @@ namespace Barotrauma
|
||||
//causing them to be removed from the list
|
||||
for (int i = drawableComponents.Count - 1; i >= 0; i--)
|
||||
{
|
||||
drawableComponents[i].Draw(spriteBatch, editing, depth, overrideColor);
|
||||
drawableComponents[i].Draw(spriteBatch, editing && !GameMain.SubEditorScreen.TransformWidgetSelected, depth, overrideColor);
|
||||
}
|
||||
|
||||
if (GameMain.DebugDraw)
|
||||
@@ -813,6 +810,8 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
if (Screen.Selected != GameMain.SubEditorScreen) { return; }
|
||||
if (Character.Controlled == null) { activeHUDs.Clear(); }
|
||||
if (GameMain.SubEditorScreen.TransformWidgetSelected) { return; }
|
||||
|
||||
if (GetComponent<ElectricalDischarger>() is { } discharger)
|
||||
{
|
||||
@@ -826,8 +825,6 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (Character.Controlled == null) { activeHUDs.Clear(); }
|
||||
|
||||
foreach (ItemComponent ic in components)
|
||||
{
|
||||
ic.UpdateEditing(deltaTime);
|
||||
@@ -2341,6 +2338,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
bool onInsertedEffectsAppliedOnPreviousRound = msg.ReadBoolean();
|
||||
byte bodyType = msg.ReadByte();
|
||||
bool spawnedInOutpost = msg.ReadBoolean();
|
||||
bool allowStealing = msg.ReadBoolean();
|
||||
@@ -2453,6 +2451,10 @@ namespace Barotrauma
|
||||
AllowStealing = allowStealing,
|
||||
Quality = quality
|
||||
};
|
||||
if (onInsertedEffectsAppliedOnPreviousRound)
|
||||
{
|
||||
item.OnInsertedEffectsApplied = item.OnInsertedEffectsAppliedOnPreviousRound = true;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user