(6e187d247) Fixed contained items' status effects being added twice to the list of an ItemContainer's active status effects when swapping items. For example, when swapping a fuel rod with another one, the status effect that increases AvailableFuel would be applied twice, causing the reactor to act as if there were 2 rods in it. Closes #1643 + merge fix

This commit is contained in:
Joonas Rikkonen
2019-06-15 20:24:01 +03:00
parent f68c16d944
commit 87a0ee21eb
52 changed files with 497 additions and 983 deletions
@@ -93,6 +93,10 @@ namespace Barotrauma.Networking
{
name = name.Replace(":", "");
name = name.Replace(";", "");
if (name.Length > NetConfig.ServerNameMaxLength)
{
name = name.Substring(0, NetConfig.ServerNameMaxLength);
}
this.name = name;
@@ -724,7 +728,7 @@ namespace Barotrauma.Networking
bool isNew = inc.ReadBoolean(); inc.ReadPadBits();
if (isNew)
{
string savePath = inc.ReadString();
string saveName = inc.ReadString();
string seed = inc.ReadString();
string subName = inc.ReadString();
string subHash = inc.ReadString();
@@ -739,7 +743,11 @@ namespace Barotrauma.Networking
}
else
{
if (connectedClient.HasPermission(ClientPermissions.SelectMode)) MultiPlayerCampaign.StartNewCampaign(savePath, matchingSub.FilePath, seed);
string localSavePath = SaveUtil.CreateSavePath(SaveUtil.SaveType.Multiplayer, saveName);
if (connectedClient.HasPermission(ClientPermissions.SelectMode))
{
MultiPlayerCampaign.StartNewCampaign(localSavePath, matchingSub.FilePath, seed);
}
}
}
else
@@ -2182,7 +2190,6 @@ namespace Barotrauma.Networking
public override void UnbanPlayer(string playerName, string playerIP)
{
playerName = playerName.ToLowerInvariant();
if (!string.IsNullOrEmpty(playerIP))
{
serverSettings.BanList.UnbanIP(playerIP);