Moar progress, fixed shadow/los/submarine misalignment issues
This commit is contained in:
@@ -74,7 +74,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
GameMain.ParticleManager.CreateParticle("bubbles", item.Position,
|
||||
GameMain.ParticleManager.CreateParticle("bubbles", item.WorldPosition,
|
||||
-currForce / 5.0f + new Vector2(Rand.Range(-100.0f, 100.0f), Rand.Range(-50f, 50f)),
|
||||
0.0f, item.CurrentHull);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private void GetHull()
|
||||
{
|
||||
hull1 = Hull.FindHull(item.Position, item.CurrentHull);
|
||||
hull1 = Hull.FindHull(item.WorldPosition, item.CurrentHull);
|
||||
}
|
||||
|
||||
public override void DrawHUD(SpriteBatch spriteBatch, Character character)
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace Barotrauma.Items.Components
|
||||
Vector2 baseVel = Rand.Vector(300.0f);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
var particle = GameMain.ParticleManager.CreateParticle("spark", item.Position,
|
||||
var particle = GameMain.ParticleManager.CreateParticle("spark", item.WorldPosition,
|
||||
baseVel + Rand.Vector(100.0f), 0.0f, item.CurrentHull);
|
||||
|
||||
if (particle != null) particle.Size *= Rand.Range(0.5f, 1.0f);
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
float prediction = 5.0f;
|
||||
|
||||
Vector2 futurePosition = Submarine.Loaded.Speed * prediction;
|
||||
Vector2 futurePosition = ConvertUnits.ToDisplayUnits(Submarine.Loaded.Velocity) * prediction;
|
||||
Vector2 targetSpeed = ((steeringPath.CurrentNode.Position - Submarine.Loaded.Position) - futurePosition);
|
||||
|
||||
targetSpeed = Vector2.Normalize(targetSpeed);
|
||||
|
||||
Reference in New Issue
Block a user