Merge branch 'master' into new-netcode

Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
This commit is contained in:
Regalis
2017-02-22 23:33:14 +02:00
23 changed files with 82 additions and 46 deletions

View File

@@ -745,9 +745,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<Content Include="Content\Items\Electricity\wire.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Items\Pump\pump.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<SubType>Designer</SubType>

View File

@@ -6,7 +6,9 @@
<sound file="Content/Characters/Scorpion/scorpionidle2.ogg" state="None" />
<ragdoll waveamplitude="50.0" wavelength="2500" speed="1.5">
<collider width="45" radius="22"/>
<!-- head -->
<limb id = "0" radius="37" height="81" mass="6" type="Head" steerforce="1.0">
<sprite texture="Content/Characters/Scorpion/scorpion.png" sourcerect="11,12,74,155" depth="0.02"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -15,9 +15,9 @@
<Item name="Copper Bar"/>
</Deconstruct>
<Sprite texture ="wire.png" depth="0.55"/>
<Sprite texture ="signalcomp.png" depth="0.55" sourcerect="83,105,44,22"/>
<Body radius="15" density="30"/>
<Body radius="7" width="25" density="30"/>
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
@@ -38,8 +38,9 @@
<Item name="Copper Bar"/>
</Deconstruct>
<Sprite texture ="wire.png" depth="0.55"/>
<Body radius="15" density="30"/>
<Sprite texture ="signalcomp.png" depth="0.55" sourcerect="83,105,44,22"/>
<Body radius="7" width="25" density="30"/>
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
<Wire/>
@@ -59,8 +60,9 @@
<Item name="Copper Bar"/>
</Deconstruct>
<Sprite texture ="wire.png" depth="0.55"/>
<Body radius="15" density="30"/>
<Sprite texture ="signalcomp.png" depth="0.55" sourcerect="83,105,44,22"/>
<Body radius="7" width="25" density="30"/>
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
<Wire/>
@@ -80,8 +82,9 @@
<Item name="Copper Bar"/>
</Deconstruct>
<Sprite texture ="wire.png" depth="0.55"/>
<Body radius="15" density="30"/>
<Sprite texture ="signalcomp.png" depth="0.55" sourcerect="83,105,44,22"/>
<Body radius="7" width="25" density="30"/>
<Holdable slots="Any,RightHand,LeftHand" handle1="0,0"/>
<Wire/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -8,7 +8,7 @@
<Sprite texture ="captainhat.png" depth="0.6"/>
<Body radius="8" density="30"/>
<Body width="25" height="15" density="30"/>
<Wearable limbtype="Head" slots="Any,Head">
<sprite texture="captainhat.png" limb="Head" origin="0.5,0.9"/>

View File

@@ -8,7 +8,7 @@ with.
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<FontName>Verdana</FontName>
<FontName>Code Pro Bold</FontName>
<Size>16</Size>

Binary file not shown.

View File

@@ -8,9 +8,9 @@ with.
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<FontName>Verdana</FontName>
<FontName>Exo Light</FontName>
<Size>7</Size>
<Size>9</Size>
<Spacing>0</Spacing>

Binary file not shown.

View File

@@ -11,13 +11,13 @@ with.
<!--
Modify this string to change the font that will be imported.
-->
<FontName>Verdana</FontName>
<FontName>Exo Medium</FontName>
<!--
Size is a float value, measured in points. Modify this value to change
the size of the font.
-->
<Size>12</Size>
<Size>10</Size>
<!--
Spacing is a float value, measured in pixels. Modify this value to change

Binary file not shown.

View File

@@ -21,12 +21,12 @@ namespace Barotrauma
public Vector2 CenterPosition;
public Vector2 TitlePosition;
private float? loadState;
private float? loadState;
#if !LINUX
Video splashScreenVideo;
VideoPlayer videoPlayer;
#endif
public Vector2 TitleSize
{
get { return new Vector2(titleTexture.Width, titleTexture.Height); }
@@ -56,19 +56,23 @@ namespace Barotrauma
public LoadingScreen(GraphicsDevice graphics)
{
#if !LINUX
if (GameMain.Config.EnableSplashScreen)
{
try
{
splashScreenVideo = GameMain.Instance.Content.Load<Video>("utg_4");
}
catch (Exception e)
{
DebugConsole.ThrowError("Failed to load splashscreen", e);
GameMain.Config.EnableSplashScreen = false;
}
}
#endif
backgroundTexture = TextureLoader.FromFile("Content/UI/titleBackground.png");
monsterTexture = TextureLoader.FromFile("Content/UI/titleMonster.png");
@@ -82,6 +86,7 @@ namespace Barotrauma
public void Draw(SpriteBatch spriteBatch, GraphicsDevice graphics, float deltaTime)
{
#if !LINUX
if (GameMain.Config.EnableSplashScreen && splashScreenVideo != null)
{
try
@@ -96,6 +101,7 @@ namespace Barotrauma
GameMain.Config.EnableSplashScreen = false;
}
}
#endif
drawn = true;
@@ -171,6 +177,7 @@ namespace Barotrauma
}
#if !LINUX
private void DrawSplashScreen(SpriteBatch spriteBatch)
{
if (videoPlayer == null)
@@ -206,6 +213,7 @@ namespace Barotrauma
}
}
#endif
bool drawn;
public IEnumerable<object> DoLoading(IEnumerable<object> loader)

View File

@@ -241,7 +241,9 @@ namespace Barotrauma
while (!SoundPlayer.Initialized)
{
i++;
TitleScreen.LoadState = Math.Min((float)TitleScreen.LoadState + 0.5f*i, 70.0f);
TitleScreen.LoadState = SoundPlayer.SoundCount == 0 ?
30.0f :
Math.Min(30.0f + 40.0f * i / Math.Max(SoundPlayer.SoundCount, 1), 70.0f);
yield return CoroutineStatus.Running;
}

View File

@@ -303,7 +303,7 @@ namespace Barotrauma.Tutorials
foreach (Structure s in Structure.WallList)
{
if (s.CastShadow || !s.HasBody) continue;
if (s.Rect.Right > steering.Item.CurrentHull.Rect.Right) windows.Add(s);
}
@@ -332,7 +332,7 @@ namespace Barotrauma.Tutorials
}
if (broken) break;
}
if (broken) break;
yield return CoroutineStatus.Running;
} while (!broken);
@@ -459,8 +459,6 @@ namespace Barotrauma.Tutorials
yield return CoroutineStatus.Running;
}
moloch.AnimController.SetPosition(ConvertUnits.ToSimUnits(Character.Controlled.WorldPosition + Vector2.UnitY * 600.0f));
infoBox = CreateInfoFrame("Now we're ready to shoot! Select the railgun controller.");
while (Character.Controlled.SelectedConstruction == null || Character.Controlled.SelectedConstruction.Name != "Railgun Controller")
@@ -468,11 +466,18 @@ namespace Barotrauma.Tutorials
yield return CoroutineStatus.Running;
}
moloch.AnimController.SetPosition(ConvertUnits.ToSimUnits(Character.Controlled.WorldPosition + Vector2.UnitY * 600.0f));
infoBox = CreateInfoFrame("Use the right mouse button to aim and wait for the creature to come closer. When you're ready to shoot, "
+ "press the left mouse button.");
while (!moloch.IsDead)
{
if (moloch.WorldPosition.Y > Character.Controlled.WorldPosition.Y + 600.0f)
{
moloch.AIController.SteeringManager.SteeringManual(CoroutineManager.DeltaTime, Character.Controlled.WorldPosition - moloch.WorldPosition);
}
moloch.AIController.SelectTarget(Character.Controlled.AiTarget);
yield return CoroutineStatus.Running;
}

View File

@@ -272,11 +272,7 @@ namespace Barotrauma.Items.Components
dir = dir == Direction.Left ? Direction.Right : Direction.Left;
}
if (userPos.X != 0.0f)
{
float diff = (item.Rect.X + UserPos.X) - item.Rect.Center.X;
userPos.X = item.Rect.Center.X - diff - item.Rect.X;
}
userPos.X = -UserPos.X;
for (int i = 0; i < limbPositions.Count; i++)
{

View File

@@ -263,6 +263,7 @@ namespace Barotrauma.Networking
var request = new RestRequest("masterserver3.php", Method.GET);
request.AddParameter("action", "refreshserver");
request.AddParameter("serverport", Port);
request.AddParameter("gamestarted", gameStarted ? 1 : 0);
request.AddParameter("currplayers", connectedClients.Count);
request.AddParameter("maxplayers", config.MaximumConnections);
@@ -1889,6 +1890,7 @@ namespace Barotrauma.Networking
{
var request = new RestRequest("masterserver2.php", Method.GET);
request.AddParameter("action", "removeserver");
request.AddParameter("serverport", Port);
restClient.Execute(request);
restClient = null;

View File

@@ -188,6 +188,7 @@ namespace Barotrauma.Networking
if (radio == null || !sender.HasEquippedItem(radio)) return false;
var radioComponent = radio.GetComponent<WifiComponent>();
if (radioComponent == null) return false;
return radioComponent.HasRequiredContainedItems(false);
}

View File

@@ -564,7 +564,7 @@ namespace Barotrauma
{
//if there are more than 2 positions in the buffer,
//increase the interpolation speed to catch up with the server
float speedMultiplier = 0.9f + (float)Math.Pow((positionBuffer.Count - 2) / 5.0f, 2.0f);
float speedMultiplier = (float)Math.Pow(1.0f + (positionBuffer.Count - 2) / 10.0f, 2.0f);
netInterpolationState += (deltaTime * speedMultiplier) / (next.Timestamp - prev.Timestamp);

View File

@@ -215,8 +215,17 @@ namespace Barotrauma
if (GameMain.GameSession != null) GameMain.GameSession.Draw(spriteBatch);
if (Character.Controlled == null && Submarine.MainSub != null && !GUI.DisableHUD)
DrawSubmarineIndicator(spriteBatch, Submarine.MainSub);
if (Character.Controlled == null && !GUI.DisableHUD)
{
for (int i = 0; i < Submarine.MainSubs.Length; i++)
{
if (Submarine.MainSubs[i] != null)
{
Color indicatorColor = i == 0 ? Color.LightBlue * 0.5f : Color.Red * 0.5f;
DrawSubmarineIndicator(spriteBatch, Submarine.MainSubs[i], indicatorColor);
}
}
}
GUI.Draw((float)deltaTime, spriteBatch, cam);
@@ -435,7 +444,7 @@ namespace Barotrauma
}
private void DrawSubmarineIndicator(SpriteBatch spriteBatch, Submarine submarine)
private void DrawSubmarineIndicator(SpriteBatch spriteBatch, Submarine submarine, Color color)
{
Vector2 subDiff = submarine.WorldPosition - cam.WorldViewCenter;
@@ -447,11 +456,11 @@ namespace Barotrauma
cam.WorldToScreen(cam.WorldViewCenter) +
new Vector2(normalizedSubDiff.X * GameMain.GraphicsWidth * 0.4f, -normalizedSubDiff.Y * GameMain.GraphicsHeight * 0.4f);
GUI.SubmarineIcon.Draw(spriteBatch, iconPos, Color.LightBlue * 0.5f);
GUI.SubmarineIcon.Draw(spriteBatch, iconPos, color);
Vector2 arrowOffset = normalizedSubDiff * GUI.SubmarineIcon.size.X * 0.7f;
arrowOffset.Y = -arrowOffset.Y;
GUI.Arrow.Draw(spriteBatch, iconPos + arrowOffset, Color.LightBlue * 0.5f, MathUtils.VectorToAngle(arrowOffset) + MathHelper.PiOver2);
GUI.Arrow.Draw(spriteBatch, iconPos + arrowOffset, color, MathUtils.VectorToAngle(arrowOffset) + MathHelper.PiOver2);
}
}

View File

@@ -90,11 +90,18 @@ namespace Barotrauma
get;
set;
}
public static int SoundCount;
public static IEnumerable<object> Init()
{
OverrideMusicType = null;
XDocument doc = ToolBox.TryLoadXml("Content/Sounds/sounds.xml");
if (doc == null) yield return CoroutineStatus.Failure;
SoundCount = 16 + doc.Root.Elements().Count();
startDrone = Sound.Load("Content/Sounds/startDrone.ogg", false);
startDrone.Play();
@@ -116,12 +123,7 @@ namespace Barotrauma
SplashSounds[i] = Sound.Load("Content/Sounds/Water/Splash"+(i)+".ogg", false);
yield return CoroutineStatus.Running;
}
XDocument doc = ToolBox.TryLoadXml("Content/Sounds/sounds.xml");
if (doc == null) yield return CoroutineStatus.Failure;
yield return CoroutineStatus.Running;
var xMusic = doc.Root.Elements("music").ToList();
if (xMusic.Any())
@@ -178,8 +180,7 @@ namespace Barotrauma
}
}
miscSounds = miscSoundList.ToLookup(kvp => kvp.Key, kvp => kvp.Value);
miscSounds = miscSoundList.ToLookup(kvp => kvp.Key, kvp => kvp.Value);
Initialized = true;

View File

@@ -9,7 +9,16 @@ v0.5.4.3
multi-part subs shouldn't spawn inside walls anymore)
- explosion damage is calculated based on the distance to the closest surface of a limb instead of the
center position of the limb (i.e. large monsters can be damaged by smaller explosions)
- added an Undertow Games splash screen
- updated to a newer version of the NVorbis sound library
- fixed a null reference exception caused by wires
- fixed an issue in the way items in alien ruins are initialized, which occasionally caused ID mismatches
(and desync) in items and characters created after generating the ruins
- fixed some item properties not being saved if changed in the editor (e.g. battery recharge speed)
- fixed characters turning into husks when they die, even if the infection has been cured
- fixed docking ports being disconnected in the mirrored subs in the combat missions
- unconscious characters collide with stairs when they're being dragged up
- fixed characters sinking/floating away when using railgun controllers underwater
---------------------------------------------------------------------------------------------------------
v0.5.4.2

View File

@@ -47,6 +47,7 @@ Credits:
Programming, graphics, sounds, game design - Joonas Rikkonen ("Regalis")
Graphics - James Bear ("Moonsaber99")
Programming - Sebastian Broberg
Programming - Juan Pablo Arce ("juanjp600")
------------------------------------------------------------------------