(2402e736e) Tester's build, January 25th 2020

This commit is contained in:
Joonas Rikkonen
2020-01-25 12:48:13 +02:00
parent 4a58987eae
commit eaa18a20a3
57 changed files with 710 additions and 139 deletions
@@ -980,8 +980,7 @@ namespace Barotrauma
public void GiveJobItems(WayPoint spawnPoint = null)
{
if (info == null || info.Job == null) return;
if (info == null || info.Job == null) { return; }
info.Job.GiveJobItems(this, spawnPoint);
}
@@ -420,7 +420,7 @@ namespace Barotrauma
if (logging)
{
var fileMd5 = new Md5Hash(hash);
DebugConsole.NewMessage(" " + file.Path + ": " + fileMd5.ShortHash);
DebugConsole.NewMessage(" " + file.Path + ": " + fileMd5.Hash);
}
hashes.Add(hash);
}
@@ -440,7 +440,7 @@ namespace Barotrauma
md5Hash = new Md5Hash(bytes);
if (logging)
{
DebugConsole.NewMessage("****************************** Package hash: " + md5Hash.ShortHash);
DebugConsole.NewMessage("****************************** Package hash: " + md5Hash.Hash);
}
}
@@ -470,6 +470,14 @@ namespace Barotrauma
break;
}
if (filePaths.Count > 1)
{
using (MD5 tempMd5 = MD5.Create())
{
filePaths = filePaths.OrderBy(f => ToolBox.StringToUInt32Hash(f.CleanUpPathCrossPlatform(true), tempMd5)).ToList();
}
}
foreach (string filePath in filePaths)
{
if (!File.Exists(filePath)) continue;
@@ -489,6 +489,14 @@ namespace Barotrauma
}
}));
commands.Add(new Command("dumptofile", "", (string[] args) =>
{
string filename = "consoleOutput.txt";
if (args.Length > 0) { filename = string.Join(" ", args); }
File.WriteAllLines(filename, Messages.Select(m => m.Text).ToArray());
}));
commands.Add(new Command("findentityids", "findentityids [entityname]", (string[] args) =>
{
if (args.Length == 0) return;
@@ -924,6 +932,12 @@ namespace Barotrauma
}));
commands.Add(new Command("difficulty|leveldifficulty", "difficulty [0-100]: Change the level difficulty setting in the server lobby.", null));
commands.Add(new Command("autoitemplacerdebug|outfitdebug", "autoitemplacerdebug: Toggle automatic item placer debug info on/off. The automatically placed items are listed in the debug console at the start of a round.", (string[] args) =>
{
AutoItemPlacer.OutputDebugInfo = !AutoItemPlacer.OutputDebugInfo;
NewMessage((AutoItemPlacer.OutputDebugInfo ? "Enabled" : "Disabled") + " automatic item placer logging.", Color.White);
}, isCheat: false));
commands.Add(new Command("verboselogging", "verboselogging: Toggle verbose console logging on/off. When on, additional debug information is written to the debug console.", (string[] args) =>
{
@@ -1373,10 +1387,7 @@ namespace Barotrauma
var variant = job != null ? Rand.Range(0, job.Variants, Rand.RandSync.Server) : 0;
CharacterInfo characterInfo = new CharacterInfo(CharacterPrefab.HumanSpeciesName, jobPrefab: job, variant: variant);
spawnedCharacter = Character.Create(characterInfo, spawnPosition, ToolBox.RandomSeed(8));
if (job != null)
{
spawnedCharacter.GiveJobItems(spawnPoint);
}
spawnedCharacter.GiveJobItems(spawnPoint);
if (GameMain.GameSession != null)
{
@@ -10,6 +10,8 @@ namespace Barotrauma
{
private static readonly List<Item> spawnedItems = new List<Item>();
public static bool OutputDebugInfo = false;
public static void PlaceIfNeeded(GameMode gameMode)
{
if (GameMain.NetworkMember != null && !GameMain.NetworkMember.IsServer) { return; }
@@ -82,14 +84,24 @@ namespace Barotrauma
// Spawn items that don't have containers last
prefabsWithoutContainer.Randomize().ForEach(i => SpawnItems(i));
DebugConsole.NewMessage("Automatically placed items: ");
foreach (string itemName in spawnedItems.Select(it => it.Name).Distinct())
if (OutputDebugInfo)
{
DebugConsole.NewMessage(" - " + itemName + " x" + spawnedItems.Count(it => it.Name == itemName));
DebugConsole.NewMessage("Automatically placed items: ");
foreach (string itemName in spawnedItems.Select(it => it.Name).Distinct())
{
DebugConsole.NewMessage(" - " + itemName + " x" + spawnedItems.Count(it => it.Name == itemName));
}
}
bool SpawnItems(ItemPrefab itemPrefab)
{
if (itemPrefab == null)
{
string errorMsg = "Error in AutoItemPlacer.SpawnItems - itemPrefab was null.\n"+Environment.StackTrace;
DebugConsole.ThrowError(errorMsg);
GameAnalyticsManager.AddErrorEventOnce("AutoItemPlacer.SpawnItems:ItemNull", GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg);
return false;
}
bool success = false;
foreach (PreferredContainer preferredContainer in itemPrefab.PreferredContainers)
{
@@ -907,6 +907,7 @@ namespace Barotrauma
new XAttribute("width", GraphicsWidth),
new XAttribute("height", GraphicsHeight),
new XAttribute("vsync", VSyncEnabled),
new XAttribute("framelimit", Timing.FrameLimit),
new XAttribute("displaymode", windowMode));
}
@@ -1228,6 +1229,7 @@ namespace Barotrauma
new XAttribute("width", GraphicsWidth),
new XAttribute("height", GraphicsHeight),
new XAttribute("vsync", VSyncEnabled),
new XAttribute("framelimit", Timing.FrameLimit),
new XAttribute("displaymode", windowMode));
}
@@ -1423,6 +1425,7 @@ namespace Barotrauma
GraphicsWidth = graphicsMode.GetAttributeInt("width", GraphicsWidth);
GraphicsHeight = graphicsMode.GetAttributeInt("height", GraphicsHeight);
VSyncEnabled = graphicsMode.GetAttributeBool("vsync", VSyncEnabled);
Timing.FrameLimit = graphicsMode.GetAttributeInt("framelimit", 200);
XElement graphicsSettings = doc.Root.Element("graphicssettings");
ParticleLimit = graphicsSettings.GetAttributeInt("particlelimit", ParticleLimit);
@@ -1504,6 +1507,7 @@ namespace Barotrauma
GraphicsWidth = 0;
GraphicsHeight = 0;
VSyncEnabled = true;
Timing.FrameLimit = 200;
#if DEBUG
EnableSplashScreen = false;
#else
@@ -1283,7 +1283,7 @@ namespace Barotrauma
}
}
ApplyStatusEffects(ActionType.Always, deltaTime, null);
ApplyStatusEffects(ActionType.Always, deltaTime, character: (parentInventory as CharacterInventory)?.Owner as Character);
for (int i = 0; i < updateableComponents.Count; i++)
{
@@ -1306,7 +1306,7 @@ namespace Barotrauma
#endif
ic.WasUsed = false;
ic.ApplyStatusEffects(parentInventory == null ? ActionType.OnNotContained : ActionType.OnContained, deltaTime);
ic.ApplyStatusEffects(parentInventory == null ? ActionType.OnNotContained : ActionType.OnContained, deltaTime, character: (parentInventory as CharacterInventory)?.Owner as Character);
if (ic.IsActive)
{
@@ -228,7 +228,9 @@ namespace Barotrauma
if (hulls[i] == null) hulls[i] = Hull.FindHullOld(searchPos[i], null, false, true);
}
if (hulls[0] == null && hulls[1] == null) return;
if (hulls[1] == hulls[0]) { hulls[1] = null; }
if (hulls[0] == null && hulls[1] == null) { return; }
if (hulls[0] == null && hulls[1] != null)
{
@@ -619,7 +619,10 @@ namespace Barotrauma
if (Bodies != null)
{
foreach (Body b in Bodies)
{
GameMain.World.Remove(b);
}
Bodies.Clear();
}
if (Sections != null)
@@ -648,7 +651,10 @@ namespace Barotrauma
if (Bodies != null)
{
foreach (Body b in Bodies)
{
GameMain.World.Remove(b);
}
Bodies.Clear();
}
if (Sections != null)
@@ -14,6 +14,7 @@ namespace Barotrauma.Networking
private static Stream writeStream;
private static Stream readStream;
private static volatile bool shutDown;
private static ManualResetEvent writeManualResetEvent;
private static byte[] tempBytes;
private enum ReadState
@@ -49,6 +50,8 @@ namespace Barotrauma.Networking
readCancellationToken = new CancellationTokenSource();
writeManualResetEvent = new ManualResetEvent(false);
readThread = new Thread(UpdateRead);
writeThread = new Thread(UpdateWrite);
readThread.Start();
@@ -58,6 +61,7 @@ namespace Barotrauma.Networking
private static void PrivateShutDown()
{
shutDown = true;
writeManualResetEvent.Set();
readCancellationToken?.Cancel();
readThread?.Join(); readThread = null;
writeThread?.Join(); writeThread = null;
@@ -152,7 +156,11 @@ namespace Barotrauma.Networking
msgAvailable = msgsToWrite.TryDequeue(out msg);
}
}
Thread.Yield();
if (!shutDown)
{
writeManualResetEvent.Reset();
writeManualResetEvent.WaitOne();
}
}
}
@@ -163,6 +171,7 @@ namespace Barotrauma.Networking
lock (msgsToWrite)
{
msgsToWrite.Enqueue(msg);
writeManualResetEvent.Set();
}
}
@@ -154,10 +154,16 @@ namespace Barotrauma.Networking
}
}
string fileName = ServerName + "_" + DateTime.Now.ToString("yyyy-MM-dd_HH:mm") + ".txt";
string fileName = ServerName + "_" + DateTime.Now.ToString("yyyy-MM-dd_HH:mm");
fileName = ToolBox.RemoveInvalidFileNameChars(fileName);
string filePath = Path.Combine(SavePath, fileName);
string filePath = Path.Combine(SavePath, fileName + ".txt");
int i = 2;
while (File.Exists(filePath))
{
filePath = Path.Combine(SavePath, fileName + " (" + i + ").txt");
i++;
}
try
{
@@ -20,10 +20,12 @@
public virtual void Select()
{
if (selected != null && selected != this)
{
selected.Deselect();
#if CLIENT
GUI.ClearCursorWait();
//make sure any textbox in the previously selected screen doesn't stay selected
if (GUI.KeyboardDispatcher.Subscriber != DebugConsole.TextBox)
{
@@ -10,7 +10,28 @@ namespace Barotrauma
public static double TotalTime;
public static double Accumulator;
public static double Step = 1.0 / 60.0;
public const int FixedUpdateRate = 60;
public static double Step = 1.0 / FixedUpdateRate;
private static int frameLimit;
/// <summary>
/// Maximum FPS (0 = unlimited).
/// </summary>
public static int FrameLimit
{
get { return frameLimit; }
set
{
if (value <= 0)
{
frameLimit = 0;
}
else
{
frameLimit = Math.Max(value, FixedUpdateRate);
}
}
}
public static double Alpha
{
Binary file not shown.
Binary file not shown.
Binary file not shown.
+25 -3
View File
@@ -1,5 +1,25 @@
---------------------------------------------------------------------------------------------------------
v0.9.7000 (Unstable)
v0.9.701 (Unstable)
---------------------------------------------------------------------------------------------------------
- Fixed SteamP2P server hosting.
- Fixed a bug that caused "missing entity" errors when joining mid-round. Occurred if entities were created or removed while the client was in the process of getting in sync with the server, for example if the other players were firing turrets while the client was joining. However, there may still other bugs left that can cause the same "missing entity" error message.
- Cap the framerate to 200 FPS when VSync is off to prevent overloading the GPU. The cap can be adjusted by changing the "framelimit" attribute in config_player.xml.
- Rebalanced random events.
- Numerous fixes and improvements to Berilia.
- Give job items to humans spawned with the "spawn" command.
- Fixed content package hash mismatches between Windows and Linux.
- Fixed client crashing when disconnecting from the server as a host.
- Fixed clients crashing when an order message is received while in the server lobby.
- New sprites (that actually match the worn sprite) for dropped outfits.
- Slightly increased the view range of the coilguns and railguns.
- Cursor changes according to what it's hovered on (hand icon when on a button, caret icon when on a textbox, etc).
- The automatically placed items are not listed in the debug console by default anymore. Listing them can be re-enabled with the command "outfitdebug".
- Fixed crashing when saving structures into item assemblies.
- Fixed sub editor allowing vanilla subs to be deleted.
---------------------------------------------------------------------------------------------------------
v0.9.700 (Unstable)
---------------------------------------------------------------------------------------------------------
- Additional logging to diagnose event/entity ID errors: server and clients write a log file with a bunch of debug information the error happens. The files can be found in the ServerLogs folder after the error has occurred. If you get log files, please send them to us to help us diagnose these bugs!
@@ -24,10 +44,12 @@ v0.9.7.0
---------------------------------------------------------------------------------------------------------
UI/UX improvements:
- Graphical and functional overhaul of all user interfaces.
- Better feedback on shooting.
- Double clicking on an item moves it to the equipped inventory (e.g. ammo to the equipped weapon).
- Periscopes can be deselected by pressing esc.
- Fabricators can pull ingredients directly from the user's inventory without having to place them in the fabricator's input slots.
- Lock the on/off slider in the pump interface when the state is controlled by signals, same with the engine slider.
- Lock the on/off switch in the pump interface when the state is controlled by signals, same with the engine slider.
- 1 second cooldown before doors can be opened/closed after someone else has opened/closed them. Makes it less likely for doors to be opened/closed accidentally when multiple people are trying to use them at the same time.
- Show a warning if trying to start a campaign for the first time without playing the tutorials.
- Diving suits and fire extinguishers are not automatically picked up from the lockers/brackets when clicking on them to make it less likely to accidentally pick them up. Instead, clicking on them opens the inventory of the container, the same way when interacting with e.g. a steel cabinet.
@@ -58,7 +80,7 @@ Additions and changes:
- The job gear variants are not just visually different versions of the same item, but completely separate items. The job variants now allow the players to choose what kind of gear they want to spawn with, not just the look of the uniform.
- Attachable items and wire nodes can now be freely placed around the character instead of always being placed at the position of the character. When attaching items/wires, there's a placement grid that makes it much easier to neatly attach/wire things mid-round.
- The submarines now get automatically outfitted with a semi-random selection of supplies when starting a campaign. The items that have been manually placed in the submarine editor are kept as-is.
- Split internal damage into multiple subtypes: blunt force trauma, lacerations and bite wounds. The new afflictions are functionally identical to the default internal damage affliction, but can be used to identify the source of the injuries.
- Splitted internal damage into multiple subtypes: blunt force trauma, lacerations and bite wounds. The new afflictions are functionally identical to the default internal damage affliction, but can be used to identify the source of the injuries.
- Humans are more resistant to gunshot wounds, lacerations and blunt force trauma than monsters. The intention is to allow making weapons more effective towards monsters without making killing your crewmates with them too easy.
- Added a "terminal" item that can be used to send and display textual signals. Could be used for things such as terminals that send commands to devices or display some data received from devices.
- Added muzzle flashes to small firearms.