Merge branch 'master' of https://bitbucket.org/Regalis11/barotrauma
This commit is contained in:
@@ -469,12 +469,13 @@ 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 = ConnectedGaps.Where(i => i.Open > 0).OrderBy(i => i.LerpedFlowForce.Length()).FirstOrDefault();
|
foreach (var gap in ConnectedGaps.Where(gap => gap.Open > 0))
|
||||||
if (gap == null || gap.LerpedFlowForce.Length() < 0)
|
{
|
||||||
return;
|
var pos = gap.Position - body.Position;
|
||||||
var pos = gap.Position - body.Position;
|
pos.Normalize();
|
||||||
pos.Normalize();
|
body.body.ApplyForce((pos * gap.LerpedFlowForce) * deltaTime);
|
||||||
body.body.ApplyForce((pos*gap.LerpedFlowForce)*deltaTime);
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Extinquish(float deltaTime, float amount, Vector2 position)
|
public void Extinquish(float deltaTime, float amount, Vector2 position)
|
||||||
|
|||||||
Reference in New Issue
Block a user