v1.6.18.1 (Unto the Breach Hotfix 1)
This commit is contained in:
@@ -234,7 +234,8 @@ namespace Barotrauma.Items.Components
|
||||
base.Update(deltaTime, cam);
|
||||
if (targetCharacter != null)
|
||||
{
|
||||
if (SetTaintedOnDeath && targetCharacter.IsDead && !tainted)
|
||||
if (SetTaintedOnDeath && !tainted &&
|
||||
targetCharacter.IsDead && targetCharacter.CauseOfDeath is not { Type: CauseOfDeathType.Disconnected })
|
||||
{
|
||||
SetTainted(true);
|
||||
}
|
||||
|
||||
@@ -850,7 +850,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private bool CanAutoInteractWithContained(Item containedItem)
|
||||
{
|
||||
return AutoInteractWithContained && autoInteractWithContainedTags.Any(t => containedItem.HasTag(t));
|
||||
return AutoInteractWithContained &&
|
||||
(autoInteractWithContainedTags.None() || autoInteractWithContainedTags.Any(t => containedItem.HasTag(t)));
|
||||
}
|
||||
|
||||
private void SetContainedActive(bool active)
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (!powerOnSoundPlayed && powerOnSound != null)
|
||||
{
|
||||
SoundPlayer.PlaySound(powerOnSound.Sound, item.WorldPosition, powerOnSound.Volume, powerOnSound.Range, hullGuess: item.CurrentHull, ignoreMuffling: powerOnSound.IgnoreMuffling, freqMult: powerOnSound.GetRandomFrequencyMultiplier());
|
||||
SoundPlayer.PlaySound(powerOnSound, item.WorldPosition, hullGuess: item.CurrentHull);
|
||||
powerOnSoundPlayed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,16 @@ namespace Barotrauma.Items.Components
|
||||
public void SetPhysicsBodyPosition(bool ignoreContacts = true)
|
||||
{
|
||||
if (PhysicsBody == null) { return; }
|
||||
|
||||
Vector2 offset = ConvertUnits.ToSimUnits(BodyOffset * item.Scale);
|
||||
if (item.FlippedX)
|
||||
{
|
||||
offset.X = -offset.X;
|
||||
}
|
||||
if (item.FlippedY)
|
||||
{
|
||||
offset.Y = -offset.Y;
|
||||
}
|
||||
if (!MathUtils.NearlyEqual(item.RotationRad, 0))
|
||||
{
|
||||
Matrix transform = Matrix.CreateRotationZ(-item.RotationRad);
|
||||
@@ -260,6 +269,15 @@ namespace Barotrauma.Items.Components
|
||||
PhysicsBody.UpdateDrawPosition();
|
||||
}
|
||||
|
||||
public override void FlipX(bool relativeToSub)
|
||||
{
|
||||
SetPhysicsBodyPosition();
|
||||
}
|
||||
public override void FlipY(bool relativeToSub)
|
||||
{
|
||||
SetPhysicsBodyPosition();
|
||||
}
|
||||
|
||||
public override void OnMapLoaded()
|
||||
{
|
||||
base.OnMapLoaded();
|
||||
|
||||
Reference in New Issue
Block a user