Unstable v0.10.6.0 (October 13th 2020)

This commit is contained in:
Juan Pablo Arce
2020-10-13 12:59:45 -03:00
parent 768f516e7c
commit 6b36bf809d
59 changed files with 1036 additions and 421 deletions
@@ -306,7 +306,7 @@ namespace Barotrauma.CharacterEditor
var lastJoint = selectedJoints.LastOrDefault();
if (lastJoint != null)
{
lastLimb = PlayerInput.KeyDown(Keys.LeftAlt) ? lastJoint.LimbA : lastJoint.LimbB;
lastLimb = PlayerInput.KeyDown(Keys.LeftAlt) ? lastJoint.LimbB : lastJoint.LimbA;
}
}
if (lastLimb != null)
@@ -941,7 +941,7 @@ namespace Barotrauma.CharacterEditor
var lastJoint = selectedJoints.LastOrDefault();
if (lastJoint != null)
{
lastLimb = PlayerInput.KeyDown(Keys.LeftAlt) ? lastJoint.LimbA : lastJoint.LimbB;
lastLimb = PlayerInput.KeyDown(Keys.LeftAlt) ? lastJoint.LimbB : lastJoint.LimbA;
}
}
if (lastLimb != null)
@@ -2389,7 +2389,7 @@ namespace Barotrauma.CharacterEditor
IEnumerable<Limb> limbs = selectedLimbs;
if (limbs.None())
{
limbs = selectedJoints.Select(j => PlayerInput.KeyDown(Keys.LeftAlt) ? j.LimbA : j.LimbB);
limbs = selectedJoints.Select(j => PlayerInput.KeyDown(Keys.LeftAlt) ? j.LimbB : j.LimbA);
}
foreach (var limb in limbs)
{
@@ -4452,11 +4452,11 @@ namespace Barotrauma.CharacterEditor
}
if (editJoints)
{
if (!altDown && joint.BodyA == limb.body.FarseerBody)
if (altDown && joint.BodyA == limb.body.FarseerBody)
{
continue;
}
if (altDown && joint.BodyB == limb.body.FarseerBody)
if (!altDown && joint.BodyB == limb.body.FarseerBody)
{
continue;
}
@@ -1104,7 +1104,16 @@ namespace Barotrauma
{
port = settingsDoc.Root.GetAttributeInt("port", port);
queryPort = settingsDoc.Root.GetAttributeInt("queryport", queryPort);
maxPlayers = settingsDoc.Root.GetAttributeInt("maxplayers", maxPlayers);
int maxPlayersElement = settingsDoc.Root.GetAttributeInt("maxplayers", maxPlayers);
if (maxPlayersElement > NetConfig.MaxPlayers)
{
DebugConsole.IsOpen = true;
DebugConsole.NewMessage($"Setting the maximum amount of players to {maxPlayersElement} failed due to exceeding the limit of {NetConfig.MaxPlayers} players per server. Using the maximum of {NetConfig.MaxPlayers} instead.", Color.Red);
maxPlayersElement = NetConfig.MaxPlayers;
}
maxPlayers = maxPlayersElement;
karmaEnabled = settingsDoc.Root.GetAttributeBool("karmaenabled", true);
selectedKarmaPreset = settingsDoc.Root.GetAttributeString("karmapreset", "default");
string playStyleStr = settingsDoc.Root.GetAttributeString("playstyle", "Casual");
@@ -4375,9 +4375,18 @@ namespace Barotrauma
Submarine.DrawFront(spriteBatch, editing: true, e => ShowThalamus || !(e.prefab?.Category.HasFlag(MapEntityCategory.Thalamus) ?? false));
if (!WiringMode && !IsMouseOnEditorGUI())
{
MapEntityPrefab.Selected?.DrawPlacing(spriteBatch, cam);
MapEntityPrefab.Selected?.DrawPlacing(spriteBatch, cam);
MapEntity.DrawSelecting(spriteBatch, cam);
}
if (dummyCharacter != null && WiringMode)
{
for (int i = 0; i < dummyCharacter.SelectedItems.Length; i++)
{
if (dummyCharacter.SelectedItems[i] == null) { continue; }
if (i > 0 && dummyCharacter.SelectedItems[0] == dummyCharacter.SelectedItems[i]) { continue; }
dummyCharacter.SelectedItems[i].Draw(spriteBatch, editing: false, back: true);
}
}
spriteBatch.End();
if (GameMain.LightManager.LightingEnabled && lightingEnabled)