Merge branch 'master' of https://bitbucket.org/Regalis11/barotrauma
This commit is contained in:
@@ -642,7 +642,8 @@ namespace Barotrauma
|
|||||||
body.ResetDynamics();
|
body.ResetDynamics();
|
||||||
}
|
}
|
||||||
body.ApplyForce(buoyancy - body.LinearVelocity * volume);
|
body.ApplyForce(buoyancy - body.LinearVelocity * volume);
|
||||||
CurrentHull.HandleItems(deltaTime, this);
|
if(CurrentHull != null)
|
||||||
|
CurrentHull.HandleItems(deltaTime, this);
|
||||||
//apply simple angular drag
|
//apply simple angular drag
|
||||||
body.ApplyTorque(body.AngularVelocity * volume * -0.05f);
|
body.ApplyTorque(body.AngularVelocity * volume * -0.05f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -469,8 +469,7 @@ namespace Barotrauma
|
|||||||
var uplift = -GameMain.World.Gravity*(forceFactor - body.body.LinearVelocity.Y*5);
|
var uplift = -GameMain.World.Gravity*(forceFactor - body.body.LinearVelocity.Y*5);
|
||||||
body.body.FarseerBody.ApplyForce(uplift*deltaTime);
|
body.body.FarseerBody.ApplyForce(uplift*deltaTime);
|
||||||
|
|
||||||
var gap =
|
var gap = ConnectedGaps.Where(i => i.Open > 0).OrderBy(i => i.LerpedFlowForce.Length()).FirstOrDefault();
|
||||||
ConnectedGaps.Where(i => i.Open > 0).OrderBy(i => Vector2.Distance(body.Position, i.Position)).FirstOrDefault();
|
|
||||||
if (gap == null || gap.LerpedFlowForce.Length() < 0)
|
if (gap == null || gap.LerpedFlowForce.Length() < 0)
|
||||||
return;
|
return;
|
||||||
var pos = gap.Position - body.Position;
|
var pos = gap.Position - body.Position;
|
||||||
|
|||||||
Reference in New Issue
Block a user