Hotfix 0.15.23.0

This commit is contained in:
Markus Isberg
2022-01-11 23:47:46 +09:00
parent e2ce85884e
commit d9baeaa2e1
13 changed files with 22 additions and 9 deletions
@@ -321,6 +321,7 @@ namespace Barotrauma
case NetEntityEvent.Type.Control:
msg.WriteRangedInteger(1, min, max);
Client owner = (Client)extraData[1];
msg.Write(owner == c && owner.Character == this);
msg.Write(owner != null && owner.Character == this && GameMain.Server.ConnectedClients.Contains(owner) ? owner.ID : (byte)0);
break;
case NetEntityEvent.Type.Status:
@@ -220,6 +220,7 @@ namespace Barotrauma
{
RespawnManager.ReduceCharacterSkills(characterInfo);
characterInfo.RemoveSavedStatValuesOnDeath();
characterInfo.CauseOfDeath = null;
}
c.CharacterInfo = characterInfo;
characterData.RemoveAll(cd => cd.MatchesClient(c));
@@ -1337,9 +1337,9 @@ namespace Barotrauma.Networking
break;
case ClientPermissions.ManageRound:
bool end = inc.ReadBoolean();
bool save = inc.ReadBoolean();
if (end)
{
bool save = inc.ReadBoolean();
if (gameStarted)
{
Log("Client \"" + GameServer.ClientLogName(sender) + "\" ended the round.", ServerLog.MessageType.ServerMessage);
@@ -399,6 +399,7 @@ namespace Barotrauma.Networking
{
ReduceCharacterSkills(characterInfos[i]);
characterInfos[i].RemoveSavedStatValuesOnDeath();
characterInfos[i].CauseOfDeath = null;
}
}
}
@@ -131,7 +131,7 @@ namespace Barotrauma
{
string subName = inc.ReadString();
SubmarineInfo subInfo = SubmarineInfo.SavedSubmarines.FirstOrDefault(s => s.Name == subName);
if (GameMain.GameSession?.Campaign is MultiPlayerCampaign campaign && campaign.CanPurchaseSub(subInfo))
if (GameMain.GameSession?.Campaign is MultiPlayerCampaign campaign && (campaign.CanPurchaseSub(subInfo) || GameMain.GameSession.IsSubmarineOwned(subInfo)))
{
StartSubmarineVote(subInfo, voteType, sender);
}