Merge https://github.com/Regalis11/Barotrauma into develop
This commit is contained in:
@@ -212,19 +212,6 @@ namespace Barotrauma.Networking
|
||||
|
||||
public TimeSpan UpdateInterval => new TimeSpan(0, 0, 0, 0, MathHelper.Clamp(1000 / ServerSettings.TickRate, 1, 500));
|
||||
|
||||
|
||||
public bool CanUseRadio(Character sender)
|
||||
{
|
||||
if (sender == null) { return false; }
|
||||
|
||||
var radio = sender.Inventory.AllItems.FirstOrDefault(i => i.GetComponent<WifiComponent>() != null);
|
||||
if (radio == null || !sender.HasEquippedItem(radio)) { return false; }
|
||||
|
||||
var radioComponent = radio.GetComponent<WifiComponent>();
|
||||
if (radioComponent == null) { return false; }
|
||||
return radioComponent.HasRequiredContainedItems(sender, addMessage: false);
|
||||
}
|
||||
|
||||
public void AddChatMessage(string message, ChatMessageType type, string senderName = "", Client senderClient = null, Character senderCharacter = null, PlayerConnectionChangeType changeType = PlayerConnectionChangeType.None, Color? textColor = null)
|
||||
{
|
||||
AddChatMessage(ChatMessage.Create(senderName, message, type, senderCharacter, senderClient, changeType: changeType, textColor: textColor));
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Barotrauma.Networking
|
||||
listBox.UpdateScrollBarSize();
|
||||
}
|
||||
#endif
|
||||
if (unsavedLines.Count() >= LinesPerFile)
|
||||
if (unsavedLines.Count >= LinesPerFile)
|
||||
{
|
||||
Save();
|
||||
unsavedLines.Clear();
|
||||
@@ -146,7 +146,7 @@ namespace Barotrauma.Networking
|
||||
#if CLIENT
|
||||
while (listBox != null && listBox.Content.CountChildren > LinesPerFile)
|
||||
{
|
||||
listBox.RemoveChild(reverseOrder ? listBox.Content.Children.First() : listBox.Content.Children.Last());
|
||||
listBox.Content.RemoveChild(!reverseOrder ? listBox.Content.Children.First() : listBox.Content.Children.Last());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ namespace Barotrauma.Networking
|
||||
partial class ServerSettings : ISerializableEntity
|
||||
{
|
||||
public const int PacketLimitMin = 1200,
|
||||
PacketLimitWarning = 2400,
|
||||
PacketLimitDefault = 3000,
|
||||
PacketLimitWarning = 3500,
|
||||
PacketLimitDefault = 4000,
|
||||
PacketLimitMax = 10000;
|
||||
|
||||
public const string SettingsFile = "serversettings.xml";
|
||||
@@ -396,8 +396,10 @@ namespace Barotrauma.Networking
|
||||
set;
|
||||
}
|
||||
|
||||
private int tickRate = 20;
|
||||
[Serialize(20, IsPropertySaveable.Yes)]
|
||||
public const int DefaultTickRate = 20;
|
||||
|
||||
private int tickRate = DefaultTickRate;
|
||||
[Serialize(DefaultTickRate, IsPropertySaveable.Yes)]
|
||||
public int TickRate
|
||||
{
|
||||
get { return tickRate; }
|
||||
@@ -526,7 +528,7 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
}
|
||||
|
||||
[Serialize(LosMode.Opaque, IsPropertySaveable.Yes)]
|
||||
[Serialize(LosMode.Transparent, IsPropertySaveable.Yes)]
|
||||
public LosMode LosMode
|
||||
{
|
||||
get;
|
||||
|
||||
Reference in New Issue
Block a user