v1.6.18.1 (Unto the Breach Hotfix 1)
This commit is contained in:
@@ -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