- fixed clients failing to load submarines if they're not in the root Submarine folder

- some refactoring
- temporarily disabled kicking by voting
This commit is contained in:
Regalis
2016-05-30 18:32:36 +03:00
parent 9b659f72d6
commit b512a7ec18
6 changed files with 111 additions and 72 deletions
+8 -4
View File
@@ -404,7 +404,7 @@ namespace Barotrauma
spectateButton.UserData = "spectateButton";
}
GameMain.Client.Voting.ResetVotes(GameMain.Client.OtherClients);
GameMain.Client.Voting.ResetVotes(GameMain.Client.ConnectedClients);
UpdatePlayerFrame(GameMain.Client.CharacterInfo);
}
@@ -593,10 +593,14 @@ namespace Barotrauma
{
(component as GUITextBlock).TextColor = Color.DarkRed * 0.8f;
component.CanBeFocused = false;
StartButton.Enabled = false;
return false;
}
StartButton.Enabled = true;
return true;
}
@@ -1121,7 +1125,7 @@ namespace Barotrauma
public void ReadData(NetIncomingMessage msg)
{
string mapName = "", md5Hash = "";
string subName = "", md5Hash = "";
int modeIndex = 0;
//float durationScroll = 0.0f;
@@ -1135,7 +1139,7 @@ namespace Barotrauma
try
{
mapName = msg.ReadString();
subName = msg.ReadString();
md5Hash = msg.ReadString();
ServerName = msg.ReadString();
@@ -1167,7 +1171,7 @@ namespace Barotrauma
return;
}
if (!string.IsNullOrWhiteSpace(mapName) && !GameMain.NetworkMember.Voting.AllowSubVoting) TrySelectSub(mapName, md5Hash);
if (!string.IsNullOrWhiteSpace(subName) && !GameMain.NetworkMember.Voting.AllowSubVoting) TrySelectSub(subName, md5Hash);
if (!GameMain.NetworkMember.Voting.AllowModeVoting)
{