Option to hide waypoints and spawnpoints in editor, fixed cam "twitching" in multiplayer, additional light sprites for lightcomponents, wire bugfixes, fixed excessive camera shake when firing the railgun

This commit is contained in:
Regalis
2016-01-04 22:36:39 +02:00
parent bc9ff32023
commit ca7febfcab
20 changed files with 123 additions and 55 deletions

View File

@@ -19,6 +19,8 @@ namespace Barotrauma.Lights
private Texture2D texture;
public Sprite LightSprite;
public Entity Submarine;
//what was the range of the light when HullsInRange were last updated
@@ -85,7 +87,7 @@ namespace Barotrauma.Lights
this.range = range;
this.color = color;
texture = lightTexture;
texture = LightTexture;
GameMain.LightManager.AddLight(this);
}
@@ -106,6 +108,11 @@ namespace Barotrauma.Lights
Vector2 center = new Vector2(LightTexture.Width / 2, LightTexture.Height / 2);
float scale = range / (lightTexture.Width / 2.0f);
spriteBatch.Draw(lightTexture, new Vector2(WorldPosition.X, -WorldPosition.Y), null, color, 0, center, scale, SpriteEffects.None, 1);
if (LightSprite != null)
{
LightSprite.Draw(spriteBatch, new Vector2(WorldPosition.X, -WorldPosition.Y), Color);
}
}
public void Remove()