(1762f02b3) Merge branch 'dev' into human-ai
This commit is contained in:
@@ -21,9 +21,9 @@ namespace Barotrauma
|
||||
{
|
||||
if (!Enabled) { return 1000.0f; }
|
||||
|
||||
if (recipient.Character == null)
|
||||
if (recipient.Character == null || recipient.Character.IsDead)
|
||||
{
|
||||
return 0.1f;
|
||||
return 0.2f;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -53,6 +53,21 @@ namespace Barotrauma
|
||||
get { return Config.SelectedContentPackages; }
|
||||
}
|
||||
|
||||
|
||||
private static ContentPackage vanillaContent;
|
||||
public static ContentPackage VanillaContent
|
||||
{
|
||||
get
|
||||
{
|
||||
if (vanillaContent == null)
|
||||
{
|
||||
// TODO: Dynamic method for defining and finding the vanilla content package.
|
||||
vanillaContent = ContentPackage.List.SingleOrDefault(cp => Path.GetFileName(cp.Path).ToLowerInvariant() == "vanilla 0.9.xml");
|
||||
}
|
||||
return vanillaContent;
|
||||
}
|
||||
}
|
||||
|
||||
public readonly string[] CommandLineArgs;
|
||||
|
||||
public GameMain(string[] args)
|
||||
|
||||
@@ -212,15 +212,31 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
if (purchasedHullRepairs && !this.PurchasedHullRepairs && Money >= HullRepairCost)
|
||||
if (purchasedHullRepairs != this.PurchasedHullRepairs)
|
||||
{
|
||||
this.PurchasedHullRepairs = true;
|
||||
Money -= HullRepairCost;
|
||||
if (purchasedHullRepairs && Money >= HullRepairCost)
|
||||
{
|
||||
this.PurchasedHullRepairs = true;
|
||||
Money -= HullRepairCost;
|
||||
}
|
||||
else if (!purchasedHullRepairs)
|
||||
{
|
||||
this.PurchasedHullRepairs = false;
|
||||
Money += HullRepairCost;
|
||||
}
|
||||
}
|
||||
if (purchasedItemRepairs && !this.PurchasedItemRepairs && Money >= ItemRepairCost)
|
||||
if (purchasedItemRepairs != this.PurchasedItemRepairs)
|
||||
{
|
||||
this.PurchasedItemRepairs = true;
|
||||
Money -= ItemRepairCost;
|
||||
if (purchasedItemRepairs && Money >= ItemRepairCost)
|
||||
{
|
||||
this.PurchasedItemRepairs = true;
|
||||
Money -= ItemRepairCost;
|
||||
}
|
||||
else if (!purchasedItemRepairs)
|
||||
{
|
||||
this.PurchasedItemRepairs = false;
|
||||
Money += ItemRepairCost;
|
||||
}
|
||||
}
|
||||
|
||||
Map.SelectLocation(selectedLocIndex == UInt16.MaxValue ? -1 : selectedLocIndex);
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
if (!item.CanClientAccess(c)) return;
|
||||
|
||||
IsActive = true;
|
||||
|
||||
if (!autoTemp && AutoTemp) blameOnBroken = c;
|
||||
if (turbineOutput < targetTurbineOutput) blameOnBroken = c;
|
||||
if (fissionRate > targetFissionRate) blameOnBroken = c;
|
||||
|
||||
@@ -33,7 +33,8 @@ namespace Barotrauma
|
||||
//update client hulls if the amount of water has changed by >10%
|
||||
//or if oxygen percentage has changed by 5%
|
||||
if (Math.Abs(lastSentVolume - waterVolume) > Volume * 0.1f ||
|
||||
Math.Abs(lastSentOxygen - OxygenPercentage) > 5f)
|
||||
Math.Abs(lastSentOxygen - OxygenPercentage) > 5f ||
|
||||
FireSources.Count > 0)
|
||||
{
|
||||
sendUpdateTimer -= deltaTime;
|
||||
if (sendUpdateTimer < 0.0f)
|
||||
|
||||
@@ -182,6 +182,15 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
else
|
||||
{
|
||||
//tell the respawning client they're no longer a traitor
|
||||
if (GameMain.Server.TraitorManager != null && clients[i].Character != null)
|
||||
{
|
||||
if (GameMain.Server.TraitorManager.TraitorList.Any(t => t.Character == clients[i].Character))
|
||||
{
|
||||
GameMain.Server.SendDirectChatMessage(TextManager.Get("traitorrespawnmessage"), clients[i], ChatMessageType.MessageBox);
|
||||
}
|
||||
}
|
||||
|
||||
clients[i].Character = character;
|
||||
character.OwnerClientIP = clients[i].Connection.RemoteEndPoint.Address.ToString();
|
||||
character.OwnerClientName = clients[i].Name;
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace Barotrauma.Steam
|
||||
Instance.server.SetKey("usingwhitelist", (server.ServerSettings.Whitelist != null && server.ServerSettings.Whitelist.Enabled).ToString());
|
||||
Instance.server.SetKey("modeselectionmode", server.ServerSettings.ModeSelectionMode.ToString());
|
||||
Instance.server.SetKey("subselectionmode", server.ServerSettings.SubSelectionMode.ToString());
|
||||
Instance.server.SetKey("voicechatenabled", server.ServerSettings.VoiceChatEnabled.ToString());
|
||||
Instance.server.SetKey("allowspectating", server.ServerSettings.AllowSpectating.ToString());
|
||||
Instance.server.SetKey("allowrespawn", server.ServerSettings.AllowRespawn.ToString());
|
||||
Instance.server.SetKey("traitors", server.ServerSettings.TraitorsEnabled.ToString());
|
||||
|
||||
Reference in New Issue
Block a user