- sonar shows the outlines of docked subs (instead of normal sonar blips)
- fixed lights not being removed if the same explosion is triggered again before the previous one is finished - fixed electrical shocks from junction boxes stunning nearby players (and not just the player using the jb) - showing restart timer as mins + secs - more server settings
This commit is contained in:
@@ -114,7 +114,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private void DrawRadar(SpriteBatch spriteBatch, Rectangle rect)
|
||||
{
|
||||
Vector2 center = new Vector2(rect.X + rect.Width*0.75f, rect.Center.Y);
|
||||
Vector2 center = new Vector2(rect.X + rect.Width*0.5f, rect.Center.Y);
|
||||
|
||||
if (!IsActive) return;
|
||||
|
||||
@@ -128,6 +128,8 @@ namespace Barotrauma.Items.Components
|
||||
foreach (Submarine submarine in Submarine.Loaded)
|
||||
{
|
||||
if (item.Submarine == submarine && !DetectSubmarineWalls) continue;
|
||||
if (item.Submarine != null && item.Submarine.DockedTo.Contains(submarine)) continue;
|
||||
if (submarine.HullVertices == null) continue;
|
||||
|
||||
for (int i = 0; i < submarine.HullVertices.Count; i++)
|
||||
{
|
||||
@@ -152,16 +154,21 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
float simScale = displayScale * Physics.DisplayToSimRation;
|
||||
|
||||
Vector2 offset = ConvertUnits.ToSimUnits(item.Submarine.WorldPosition - item.WorldPosition);
|
||||
|
||||
for (int i = 0; i < item.Submarine.HullVertices.Count; i++)
|
||||
foreach (Submarine submarine in Submarine.Loaded)
|
||||
{
|
||||
Vector2 start = (item.Submarine.HullVertices[i] + offset) * simScale;
|
||||
start.Y = -start.Y;
|
||||
Vector2 end = (item.Submarine.HullVertices[(i + 1) % item.Submarine.HullVertices.Count] + offset) * simScale;
|
||||
end.Y = -end.Y;
|
||||
if (submarine != item.Submarine && !submarine.DockedTo.Contains(item.Submarine)) continue;
|
||||
|
||||
GUI.DrawLine(spriteBatch, center + start, center + end, Color.Green);
|
||||
Vector2 offset = ConvertUnits.ToSimUnits(submarine.WorldPosition - item.WorldPosition);
|
||||
|
||||
for (int i = 0; i < submarine.HullVertices.Count; i++)
|
||||
{
|
||||
Vector2 start = (submarine.HullVertices[i] + offset) * simScale;
|
||||
start.Y = -start.Y;
|
||||
Vector2 end = (submarine.HullVertices[(i + 1) % submarine.HullVertices.Count] + offset) * simScale;
|
||||
end.Y = -end.Y;
|
||||
|
||||
GUI.DrawLine(spriteBatch, center + start, center + end, Color.Green);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,6 +89,8 @@ namespace Barotrauma.Items.Components
|
||||
float degreeOfSuccess = DegreeOfSuccess(character);
|
||||
if (Rand.Range(0.0f, 50.0f) < degreeOfSuccess) return false;
|
||||
|
||||
character.StartStun(5.0f);
|
||||
|
||||
item.ApplyStatusEffects(ActionType.OnFailure, 1.0f, character);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user