Fixed the previous commit (clients don't increment lastUpdateID when changing values in the lobby)
This commit is contained in:
@@ -591,12 +591,12 @@ namespace Barotrauma
|
|||||||
|
|
||||||
missionTypeBlock.GetChild<GUITextBlock>().Text = Mission.MissionTypes[missionTypeIndex];
|
missionTypeBlock.GetChild<GUITextBlock>().Text = Mission.MissionTypes[missionTypeIndex];
|
||||||
missionTypeBlock.UserData = missionTypeIndex;
|
missionTypeBlock.UserData = missionTypeIndex;
|
||||||
|
|
||||||
lastUpdateID++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ToggleMissionType(GUIButton button, object userData)
|
public bool ToggleMissionType(GUIButton button, object userData)
|
||||||
{
|
{
|
||||||
|
if (GameMain.Server == null) return false;
|
||||||
|
|
||||||
int missionTypeIndex = (int)missionTypeBlock.UserData;
|
int missionTypeIndex = (int)missionTypeBlock.UserData;
|
||||||
missionTypeIndex += (int)userData;
|
missionTypeIndex += (int)userData;
|
||||||
|
|
||||||
@@ -624,7 +624,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
SetTraitorsEnabled((YesNoMaybe)index);
|
SetTraitorsEnabled((YesNoMaybe)index);
|
||||||
|
|
||||||
lastUpdateID++;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -648,6 +647,8 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private bool SelectSub(GUIComponent component, object obj)
|
private bool SelectSub(GUIComponent component, object obj)
|
||||||
{
|
{
|
||||||
|
if (GameMain.Server == null) return false;
|
||||||
|
|
||||||
lastUpdateID++;
|
lastUpdateID++;
|
||||||
|
|
||||||
var hash = obj is Submarine ? ((Submarine)obj).MD5Hash.Hash : "";
|
var hash = obj is Submarine ? ((Submarine)obj).MD5Hash.Hash : "";
|
||||||
@@ -762,6 +763,7 @@ namespace Barotrauma
|
|||||||
public bool UpdateServerMessage(GUITextBox textBox, string text)
|
public bool UpdateServerMessage(GUITextBox textBox, string text)
|
||||||
{
|
{
|
||||||
if (GameMain.Server == null) return false;
|
if (GameMain.Server == null) return false;
|
||||||
|
|
||||||
lastUpdateID++;
|
lastUpdateID++;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1076,14 +1078,10 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private bool SelectSeed(GUITextBox textBox, string seed)
|
private bool SelectSeed(GUITextBox textBox, string seed)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(seed))
|
if (GameMain.Server == null) return false;
|
||||||
{
|
if (string.IsNullOrWhiteSpace(seed)) return false;
|
||||||
LevelSeed = seed;
|
|
||||||
}
|
|
||||||
|
|
||||||
//textBox.Text = LevelSeed;
|
|
||||||
//textBox.Selected = false;
|
|
||||||
|
|
||||||
|
LevelSeed = seed;
|
||||||
lastUpdateID++;
|
lastUpdateID++;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user