v1.5.7.0 (Summer Update Hotfix 1)
This commit is contained in:
@@ -458,15 +458,16 @@ namespace Barotrauma
|
||||
if (!back) { return; }
|
||||
if (holdable.Picker.Inventory?.GetItemInLimbSlot(InvSlotType.RightHand) == this)
|
||||
{
|
||||
depth = GetHeldItemDepth(LimbType.RightHand, depth);
|
||||
depth = GetHeldItemDepth(LimbType.RightHand, holdable, depth);
|
||||
}
|
||||
else if (holdable.Picker.Inventory?.GetItemInLimbSlot(InvSlotType.LeftHand) == this)
|
||||
{
|
||||
depth = GetHeldItemDepth(LimbType.LeftHand, depth);
|
||||
depth = GetHeldItemDepth(LimbType.LeftHand, holdable, depth);
|
||||
}
|
||||
|
||||
float GetHeldItemDepth(LimbType limb, float depth)
|
||||
static float GetHeldItemDepth(LimbType limb, Holdable holdable, float depth)
|
||||
{
|
||||
if (holdable?.Picker?.AnimController == null) { return depth; }
|
||||
//offset used to make sure the item draws just slightly behind the right hand, or slightly in front of the left hand
|
||||
float limbDepthOffset = 0.000001f;
|
||||
float depthOffset = holdable.Picker.AnimController.GetDepthOffset();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<RootNamespace>Barotrauma</RootNamespace>
|
||||
<Authors>FakeFish, Undertow Games</Authors>
|
||||
<Product>Barotrauma</Product>
|
||||
<Version>1.5.7.0</Version>
|
||||
<Version>1.5.8.0</Version>
|
||||
<Copyright>Copyright © FakeFish 2018-2024</Copyright>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<AssemblyName>Barotrauma</AssemblyName>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<RootNamespace>Barotrauma</RootNamespace>
|
||||
<Authors>FakeFish, Undertow Games</Authors>
|
||||
<Product>Barotrauma</Product>
|
||||
<Version>1.5.7.0</Version>
|
||||
<Version>1.5.8.0</Version>
|
||||
<Copyright>Copyright © FakeFish 2018-2024</Copyright>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<AssemblyName>Barotrauma</AssemblyName>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<RootNamespace>Barotrauma</RootNamespace>
|
||||
<Authors>FakeFish, Undertow Games</Authors>
|
||||
<Product>Barotrauma</Product>
|
||||
<Version>1.5.7.0</Version>
|
||||
<Version>1.5.8.0</Version>
|
||||
<Copyright>Copyright © FakeFish 2018-2024</Copyright>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<AssemblyName>Barotrauma</AssemblyName>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<RootNamespace>Barotrauma</RootNamespace>
|
||||
<Authors>FakeFish, Undertow Games</Authors>
|
||||
<Product>Barotrauma Dedicated Server</Product>
|
||||
<Version>1.5.7.0</Version>
|
||||
<Version>1.5.8.0</Version>
|
||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<AssemblyName>DedicatedServer</AssemblyName>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<RootNamespace>Barotrauma</RootNamespace>
|
||||
<Authors>FakeFish, Undertow Games</Authors>
|
||||
<Product>Barotrauma Dedicated Server</Product>
|
||||
<Version>1.5.7.0</Version>
|
||||
<Version>1.5.8.0</Version>
|
||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<AssemblyName>DedicatedServer</AssemblyName>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<RootNamespace>Barotrauma</RootNamespace>
|
||||
<Authors>FakeFish, Undertow Games</Authors>
|
||||
<Product>Barotrauma Dedicated Server</Product>
|
||||
<Version>1.5.7.0</Version>
|
||||
<Version>1.5.8.0</Version>
|
||||
<Copyright>Copyright © FakeFish 2018-2023</Copyright>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<AssemblyName>DedicatedServer</AssemblyName>
|
||||
|
||||
@@ -4831,8 +4831,6 @@ namespace Barotrauma
|
||||
}
|
||||
#endif
|
||||
|
||||
ApplyStatusEffects(ActionType.OnDeath, 1.0f);
|
||||
|
||||
AnimController.Frozen = false;
|
||||
|
||||
Character killer = causeOfDeathAffliction?.Source;
|
||||
@@ -4866,7 +4864,10 @@ namespace Barotrauma
|
||||
info.LastResistanceMultiplierSkillLossRespawn = GetAbilityResistance(Tags.SkillLossRespawnResistance);
|
||||
}
|
||||
|
||||
//it's important that we set isDead before executing the status effects,
|
||||
//otherwise a statuseffect might kill the character "again" and trigger a loop that crashes the game
|
||||
isDead = true;
|
||||
ApplyStatusEffects(ActionType.OnDeath, 1.0f);
|
||||
|
||||
#if CLIENT
|
||||
// Keep permadeath status in sync (to show it correctly in the UI, the server takes care of the actual logic)
|
||||
|
||||
@@ -298,7 +298,7 @@ namespace Barotrauma
|
||||
|
||||
public void PurchaseItems(Identifier storeIdentifier, List<PurchasedItem> itemsToPurchase, bool removeFromCrate, Client client = null)
|
||||
{
|
||||
var store = Location.GetStore(storeIdentifier);
|
||||
var store = Location?.GetStore(storeIdentifier);
|
||||
if (store == null) { return; }
|
||||
var itemsPurchasedFromStore = GetPurchasedItems(storeIdentifier, create: true);
|
||||
// Check all the prices before starting the transaction to make sure the modifiers stay the same for the whole transaction
|
||||
|
||||
@@ -269,10 +269,14 @@ namespace Barotrauma.Items.Components
|
||||
public Color HudTint { get; set; }
|
||||
|
||||
[Header(localizedTextTag: "sp.turret.AutoOperate.propertyheader")]
|
||||
[Serialize(false, IsPropertySaveable.Yes, description:"Should the turret operate automatically using AI targeting? Comes with some optional random movement that can be adjusted below."),
|
||||
[Serialize(false, IsPropertySaveable.Yes, description: "Should the turret operate automatically using AI targeting? Comes with some optional random movement that can be adjusted below."),
|
||||
Editable(TransferToSwappedItem = true)]
|
||||
public bool AutoOperate { get; set; }
|
||||
|
||||
[Serialize(false, IsPropertySaveable.Yes, description: "Can the Auto Operate functionality be enabled using signals to the turret?"),
|
||||
Editable(TransferToSwappedItem = true)]
|
||||
public bool AllowAutoOperateWithWiring { get; set; }
|
||||
|
||||
[Serialize(0f, IsPropertySaveable.Yes, description: "[Auto Operate] How much the turret should adjust the aim off the target randomly instead of tracking the target perfectly? In Degrees."),
|
||||
Editable(TransferToSwappedItem = true)]
|
||||
public float RandomAimAmount { get; set; }
|
||||
@@ -319,8 +323,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
#endregion
|
||||
|
||||
private const string SetAutoOperatePin = "set_auto_operate";
|
||||
private const string ToggleAutoOperatePin = "toggle_auto_operate";
|
||||
private const string SetAutoOperateConnection = "set_auto_operate";
|
||||
private const string ToggleAutoOperateConnection = "toggle_auto_operate";
|
||||
|
||||
public Turret(Item item, ContentXElement element)
|
||||
: base(item, element)
|
||||
@@ -374,12 +378,14 @@ namespace Barotrauma.Items.Components
|
||||
if (loadedBaseRotation.HasValue) { BaseRotation = loadedBaseRotation.Value; }
|
||||
targetRotation = Rotation;
|
||||
UpdateTransformedBarrelPos();
|
||||
if (!AutoOperate)
|
||||
if (!AllowAutoOperateWithWiring &&
|
||||
Screen.Selected is { IsEditor: false })
|
||||
{
|
||||
// If the turret is not set to auto operate, don't allow changing the state with wirings.
|
||||
// If the turret is not set to auto operate and the auto operate connections haven't been wired to anything,
|
||||
// don't allow changing the state with wirings.
|
||||
foreach (ConnectionPanel connectionPanel in Item.GetComponents<ConnectionPanel>())
|
||||
{
|
||||
connectionPanel.Connections.RemoveAll(c => c.Name is ToggleAutoOperatePin or SetAutoOperatePin);
|
||||
connectionPanel.Connections.RemoveAll(c => c.Name is ToggleAutoOperateConnection or SetAutoOperateConnection && c.Wires.None());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1952,10 +1958,12 @@ namespace Barotrauma.Items.Components
|
||||
UpdateLightComponents();
|
||||
}
|
||||
break;
|
||||
case SetAutoOperatePin:
|
||||
case SetAutoOperateConnection:
|
||||
if (!AllowAutoOperateWithWiring) { return; }
|
||||
AutoOperate = signal.value != "0";
|
||||
break;
|
||||
case ToggleAutoOperatePin:
|
||||
case ToggleAutoOperateConnection:
|
||||
if (!AllowAutoOperateWithWiring) { return; }
|
||||
if (signal.value != "0")
|
||||
{
|
||||
AutoOperate = !AutoOperate;
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
v1.5.8.0
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Fixed crashing when killing a defense bot or a leucocyte.
|
||||
- Fixed directional flak ammo box still being carried with 2 hands.
|
||||
- Fixed set_auto_operate and toggle_auto_operate disappearing at the start of the round if AutoOperate is not enabled. Now there's a setting called "Allow Auto Operate With Wiring" which can be enabled in the sub editor to enable the connections.
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
v1.5.7.0
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user