Unstable 0.15.13.0
This commit is contained in:
@@ -256,6 +256,15 @@ namespace Barotrauma
|
||||
/// </summary>
|
||||
public bool CanInteractWhenUnfocusable { get; set; } = false;
|
||||
|
||||
public override Rectangle MouseRect
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!CanBeFocused && !CanInteractWhenUnfocusable) { return Rectangle.Empty; }
|
||||
return ClampMouseRectToParent ? ClampRect(Rect) : Rect;
|
||||
}
|
||||
}
|
||||
|
||||
/// <param name="isScrollBarOnDefaultSide">For horizontal listbox, default side is on the bottom. For vertical, it's on the right.</param>
|
||||
public GUIListBox(RectTransform rectT, bool isHorizontal = false, Color? color = null, string style = "", bool isScrollBarOnDefaultSide = true, bool useMouseDownToSelect = false) : base(style, rectT)
|
||||
{
|
||||
|
||||
@@ -201,9 +201,9 @@ namespace Barotrauma
|
||||
currentTarget = target;
|
||||
Vector2 currentPos = host.SimPosition;
|
||||
pathFinder.InsideSubmarine = character.Submarine != null && !character.Submarine.Info.IsRuin;
|
||||
pathFinder.ApplyPenaltyToOutsideNodes = character.Submarine != null && character.PressureProtection <= 0;
|
||||
pathFinder.ApplyPenaltyToOutsideNodes = character.Submarine != null && character.PressureProtection <= 0;
|
||||
var newPath = pathFinder.FindPath(currentPos, target, character.Submarine, "(Character: " + character.Name + ")", minGapSize, startNodeFilter, endNodeFilter, nodeFilter, checkVisibility: checkVisibility);
|
||||
bool useNewPath = needsNewPath || currentPath == null || currentPath.CurrentNode == null || character.Submarine != null && findPathTimer < -1 && Math.Abs(character.AnimController.TargetMovement.X) <= 0;
|
||||
bool useNewPath = needsNewPath || currentPath == null || currentPath.CurrentNode == null || character.Submarine != null && findPathTimer < -1 && Math.Abs(character.AnimController.TargetMovement.Combine()) <= 0;
|
||||
if (newPath.Unreachable || newPath.Nodes.None())
|
||||
{
|
||||
useNewPath = false;
|
||||
@@ -220,10 +220,12 @@ namespace Barotrauma
|
||||
// Use the new path if it has significantly lower cost (don't change the path if it has marginally smaller cost. This reduces navigating backwards due to new path that is calculated from the node just behind us).
|
||||
float t = (float)currentPath.CurrentIndex / (currentPath.Nodes.Count - 1);
|
||||
useNewPath = newPath.Cost < currentPath.Cost * MathHelper.Lerp(0.95f, 0, t);
|
||||
if (!useNewPath && character.Submarine != null)
|
||||
if (!useNewPath && character.Submarine != null && !character.IsClimbing)
|
||||
{
|
||||
// It's possible that the current path was calculated from a start point that is no longer valid.
|
||||
// Therefore, let's accept also paths with a greater cost than the current, if the current node is much farther than the new start node.
|
||||
// This is a special case for cases e.g. where the character falls and thus needs a new path.
|
||||
// Don't do this outside or when climbing ladders, because both cause issues.
|
||||
useNewPath = Vector2.DistanceSquared(character.WorldPosition, currentPath.CurrentNode.WorldPosition) > Math.Pow(Vector2.Distance(character.WorldPosition, newPath.Nodes.First().WorldPosition) * 3, 2);
|
||||
}
|
||||
}
|
||||
@@ -309,15 +311,12 @@ namespace Barotrauma
|
||||
}
|
||||
if (currentPath.Finished)
|
||||
{
|
||||
var lastNode = currentPath.Nodes.LastOrDefault();
|
||||
if (lastNode == null)
|
||||
Vector2 pos2 = host.SimPosition;
|
||||
if (character != null && character.Submarine == null && CurrentPath.Nodes.Count > 0 && CurrentPath.Nodes.Last().Submarine != null)
|
||||
{
|
||||
return Vector2.Zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ConvertUnits.ToSimUnits(lastNode.WorldPosition - host.WorldPosition);
|
||||
pos2 -= CurrentPath.Nodes.Last().Submarine.SimPosition;
|
||||
}
|
||||
return currentTarget - pos2;
|
||||
}
|
||||
bool doorsChecked = false;
|
||||
if (!character.LockHands && buttonPressCooldown <= 0.0f)
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Barotrauma.Abilities
|
||||
private readonly AbilityFlags abilityFlag;
|
||||
|
||||
private bool lastState;
|
||||
public override bool AllowClientSimulation => true;
|
||||
|
||||
public CharacterAbilityModifyFlag(CharacterAbilityGroup characterAbilityGroup, XElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace Barotrauma.Abilities
|
||||
class CharacterAbilityModifyReduceAffliction : CharacterAbility
|
||||
{
|
||||
float addedAmountMultiplier;
|
||||
public override bool AllowClientSimulation => true;
|
||||
|
||||
public CharacterAbilityModifyReduceAffliction(CharacterAbilityGroup characterAbilityGroup, XElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Barotrauma.Abilities
|
||||
private readonly string resistanceId;
|
||||
private readonly float resistance;
|
||||
bool lastState;
|
||||
public override bool AllowClientSimulation => true;
|
||||
|
||||
// should probably be split to different classes
|
||||
public CharacterAbilityModifyResistance(CharacterAbilityGroup characterAbilityGroup, XElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Barotrauma.Abilities
|
||||
private readonly StatTypes statType;
|
||||
private readonly float value;
|
||||
bool lastState;
|
||||
public override bool AllowClientSimulation => true;
|
||||
|
||||
public CharacterAbilityModifyStat(CharacterAbilityGroup characterAbilityGroup, XElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Barotrauma.Abilities
|
||||
private readonly StatTypes statType;
|
||||
private readonly float maxValue;
|
||||
private float lastValue = 0f;
|
||||
public override bool AllowClientSimulation => true;
|
||||
|
||||
public CharacterAbilityModifyStatToFlooding(CharacterAbilityGroup characterAbilityGroup, XElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace Barotrauma.Abilities
|
||||
private readonly float statPerLevel;
|
||||
private readonly int maxLevel;
|
||||
private float lastValue = 0f;
|
||||
public override bool AllowClientSimulation => true;
|
||||
|
||||
public CharacterAbilityModifyStatToLevel(CharacterAbilityGroup characterAbilityGroup, XElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace Barotrauma.Abilities
|
||||
private readonly string skillIdentifier;
|
||||
private readonly bool useAll;
|
||||
private float lastValue = 0f;
|
||||
public override bool AllowClientSimulation => true;
|
||||
|
||||
public CharacterAbilityModifyStatToSkill(CharacterAbilityGroup characterAbilityGroup, XElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Barotrauma.Abilities
|
||||
private float maxValue;
|
||||
private string afflictionIdentifier;
|
||||
private float lastValue = 0f;
|
||||
public override bool AllowClientSimulation => true;
|
||||
|
||||
public CharacterAbilityPsychoClown(CharacterAbilityGroup characterAbilityGroup, XElement abilityElement) : base(characterAbilityGroup, abilityElement)
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
Matrix bodyTransform = Matrix.CreateRotationZ(item.body == null ? MathHelper.ToRadians(item.Rotation) : item.body.Rotation);
|
||||
Vector2 flippedPos = barrelPos;
|
||||
if (item.body.Dir < 0.0f) { flippedPos.X = -flippedPos.X; }
|
||||
if (item.body != null && item.body.Dir < 0.0f) { flippedPos.X = -flippedPos.X; }
|
||||
return Vector2.Transform(flippedPos, bodyTransform) * item.Scale;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace Barotrauma.Items.Components
|
||||
float closestDist = float.PositiveInfinity;
|
||||
foreach (Item targetItem in Item.ItemList)
|
||||
{
|
||||
if (targetItem.NonInteractable || targetItem.NonPlayerTeamInteractable || targetItem.HiddenInGame) { continue; }
|
||||
if (OnlyInOwnSub)
|
||||
{
|
||||
if (targetItem.Submarine != item.Submarine) { continue; }
|
||||
|
||||
@@ -6,12 +6,15 @@ Changes:
|
||||
- Remove spawnpoint-based job assignment logic. Previously, the number of job-specific spawnpoints in the sub affected how many players the server would try to assign to a given job, which would often lead to players not getting the job they wanted to.
|
||||
- Made the captain job optional (i.e. if no-one has captain in their preferences, no-one gets forced to play as one).
|
||||
- Improvements to the Korean localization.
|
||||
- Added rewards to side objective missions (hunting grounds, beacon).
|
||||
- Reduce Pyromaniac's burning damage increase from 40% to 25%.
|
||||
|
||||
Fixes:
|
||||
- Fixed clients' characters getting reset in the multiplayer campaign if they're spectating at the end of the round.
|
||||
- Fixed crashing when an event set fails to load any of its sub events. Caused certain mods to crash the game at 42% in the loading screen.
|
||||
- Fixed crashing on startup when using mods that remove the small icons from job prefabs.
|
||||
- Fixed bots being unable to find their way to the submarine if the switch to the "find safety" state outside the sub.
|
||||
- Fixed bots often being unable to find a way to leaks they're trying to weld.
|
||||
- Fixed crashing when a monster was just about to turn to a husk when the round ends.
|
||||
- Fixed opened item disappearing when switching to the test mode from the sub editor.
|
||||
- Fixed Artie Dolittle's ID card not working in the player's sub after he's hired.
|
||||
@@ -29,6 +32,8 @@ Fixes:
|
||||
- Fixed contained items' impact sounds being played when the item they're inside hits the floor.
|
||||
- Fixed True Potential instant kills not properly giving kill credit (achievements, other talents).
|
||||
- Fixed Gene Harvester incorrectly checking the owner of the talent's submarine rather than the killer's.
|
||||
- Fixed certain talents not appearing to have an effect client-side, causing e.g. the high-pressure effects to appear when swimming outside with the Water Prankster talent.
|
||||
- Fix Scavenger's buff duration multiplier.
|
||||
- Fixed Insurance Policy not triggering properly.
|
||||
- Fixed issues with input going through interfaces drawn over inventory slots.
|
||||
- Fixed bots trying to treat talent afflictions.
|
||||
@@ -47,6 +52,12 @@ Fixes:
|
||||
- Fixed "select matching items" selecting all gaps if you've selected both a door and its gap in the sub editor.
|
||||
- Fixed door gaps not being selected if you use "select matching items" on a door in the sub editor.
|
||||
- Fixed biome ambience loop volume not being affected by the sound volume setting.
|
||||
- Fixed players wearing a PUCS not using up hull oxygen when no tank is equipped.
|
||||
- Fixed bots getting stuck on long outpost ladders.
|
||||
- Restored the sounds for legacy fractal guardians. Fixes console errors when they are spawned/viewed in the editor.
|
||||
- Fixed Reactor PDA showing hidden and non-interactable reactors.
|
||||
- Fixed welding tool scale being forced to 0.5.
|
||||
- Fix crew list content being repositioned when selected character was hovered.
|
||||
|
||||
Modding:
|
||||
- Made deconstruction recipes' mincondition accept items whose condition equals to the mincondition, not just items whose condition is higher.
|
||||
|
||||
Reference in New Issue
Block a user