(6c8ca4a55) Tester's build, January 20th 2020

This commit is contained in:
Juan Pablo Arce
2020-01-20 11:35:15 -03:00
parent e6a08d715b
commit 4a58987eae
47 changed files with 852 additions and 248 deletions
@@ -78,17 +78,19 @@
<Outpost file="Content/Map/Outposts/Outpost.sub" />
<Outpost file="Content/Map/Outposts/Outpost2.sub" />
<Outpost file="Content/Map/Outposts/Outpost3.sub" />
<Submarine file="Submarines/Orca.sub" />
<Submarine file="Submarines/Typhon.sub" />
<Submarine file="Submarines/Selkie.sub" />
<Submarine file="Submarines/Berilia.sub" />
<Submarine file="Submarines/Dugong.sub" />
<Submarine file="Submarines/Hemulen.sub" />
<Submarine file="Submarines/Humpback.sub" />
<Submarine file="Submarines/Kastrull.sub" />
<Submarine file="Submarines/KastrullDrone.sub" />
<Submarine file="Submarines/Dugong.sub" />
<Submarine file="Submarines/Venture.sub" />
<Submarine file="Submarines/Orca.sub" />
<Submarine file="Submarines/Remora.sub" />
<Submarine file="Submarines/RemoraDrone.sub" />
<Submarine file="Submarines/Selkie.sub" />
<Submarine file="Submarines/Typhon.sub" />
<Submarine file="Submarines/Typhon2.sub" />
<Submarine file="Submarines/Venture.sub" />
<Text file="Content/Texts/English/EnglishVanilla.xml" />
<Text file="Content/Texts/German/GermanVanilla.xml" />
<Text file="Content/Texts/French/FrenchVanilla.xml" />
@@ -1233,14 +1233,14 @@ namespace Barotrauma
LatchOntoAI?.DeattachFromBody();
Character.AnimController.ReleaseStuckLimbs();
if (attacker == null || attacker.AiTarget == null) { return; }
if (State == AIState.Flee)
{
SelectTarget(attacker.AiTarget);
return;
}
if (attacker == null || attacker.AiTarget == null) { return; }
if (attackResult.Damage > 0.0f && Character.Params.AI.AttackWhenProvoked)
{
if (attacker.Submarine == Character.Submarine && canAttackCharacters ||
@@ -1370,7 +1370,7 @@ namespace Barotrauma
if (human)
{
var variant = Rand.Range(0, job.Variants, Rand.RandSync.Server);
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)
@@ -2,9 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Barotrauma.Extensions;
using System.Linq;
namespace Barotrauma
{
@@ -71,6 +69,7 @@ namespace Barotrauma
for (int i = 0; i < prefabsWithContainer.Count; i++)
{
var itemPrefab = prefabsWithContainer[i];
if (itemPrefab == null) { continue; }
if (SpawnItems(itemPrefab))
{
removals.Add(itemPrefab);
@@ -341,7 +341,7 @@ namespace Barotrauma.Items.Components
//ignore sensors and items
if (fixture?.Body == null || fixture.IsSensor) { return -1; }
if (fixture.Body.UserData is Item) { return -1; }
if (fixture.Body.UserData is Item item && item.GetComponent<Door>() == null) { return -1; }
if (fixture.Body?.UserData as string == "ruinroom") { return -1; }
//ignore everything else than characters, sub walls and level walls
@@ -546,6 +546,8 @@ namespace Barotrauma
private void HandleLimbCollision(Impact collision, Limb limb)
{
if (limb?.body?.FarseerBody == null || limb.character == null) { return; }
if (limb.Mass > MinImpactLimbMass)
{
Vector2 normal =
@@ -565,18 +567,18 @@ namespace Barotrauma
//find all contacts between the limb and level walls
List<Contact> levelContacts = new List<Contact>();
ContactEdge contactEdge = limb.body.FarseerBody.ContactList;
while (contactEdge != null)
while (contactEdge?.Contact != null)
{
if (contactEdge.Contact.Enabled &&
contactEdge.Other.UserData is VoronoiCell &&
contactEdge.Contact.IsTouching)
contactEdge.Contact.IsTouching &&
contactEdge.Other?.UserData is VoronoiCell)
{
levelContacts.Add(contactEdge.Contact);
}
contactEdge = contactEdge.Next;
}
if (levelContacts.Count == 0) return;
if (levelContacts.Count == 0) { return; }
//if the limb is in contact with the level, apply an artifical impact to prevent the sub from bouncing on top of it
//not a very realistic way to handle the collisions (makes it seem as if the characters were made of reinforced concrete),
@@ -59,10 +59,10 @@ namespace Barotrauma.Networking
{
shutDown = true;
readCancellationToken?.Cancel();
readCancellationToken?.Dispose();
readCancellationToken = null;
readThread?.Join(); readThread = null;
writeThread?.Join(); writeThread = null;
readCancellationToken?.Dispose();
readCancellationToken = null;
readStream?.Dispose(); readStream = null;
writeStream?.Dispose(); writeStream = null;
}
@@ -71,11 +71,11 @@ namespace Barotrauma.Networking
{
while (!shutDown)
{
Task<int> readTask = readStream.ReadAsync(tempBytes, 0, tempBytes.Length, readCancellationToken.Token);
Task<int> readTask = readStream?.ReadAsync(tempBytes, 0, tempBytes.Length, readCancellationToken.Token);
TimeSpan ts = TimeSpan.FromMilliseconds(15000);
if (!readTask.Wait(ts))
if (readTask == null || !readTask.Wait(ts))
{
readCancellationToken.Cancel();
readCancellationToken?.Cancel();
shutDown = true;
return;
}
@@ -142,8 +142,8 @@ namespace Barotrauma.Networking
byte[] lengthBytes = new byte[2];
lengthBytes[0] = (byte)(msg.Length & 0xFF);
lengthBytes[1] = (byte)((msg.Length >> 8) & 0xFF);
writeStream.Write(lengthBytes, 0, 2);
writeStream.Write(msg, 0, msg.Length);
writeStream?.Write(lengthBytes, 0, 2);
writeStream?.Write(msg, 0, msg.Length);
if (shutDown) { break; }
@@ -29,7 +29,11 @@ namespace Barotrauma.Networking
//arbitrary extra data that will be passed to the Write method of the serializable entity
//(the index of an itemcomponent for example)
protected object[] Data;
public object[] Data
{
get;
private set;
}
public bool Sent;
Binary file not shown.
Binary file not shown.
Binary file not shown.
+21
View File
@@ -1,3 +1,24 @@
---------------------------------------------------------------------------------------------------------
v0.9.7000 (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!
- Fixed "skip tutorials" returning to the main menu instead of opening the correct tab when starting a new game.
- Fixed crashing when an enemy takes damage from something else than a character.
- Fixed clients disconnecting if a sub with no version number (or a sub the client hasn't received yet) is selected.
- Fixed crash when spawning a human without specified job through the console.
- Fixed several bugs that were causing crashes due to race conditions in the server list.
- Made "showseed" console command usable by clients.
- Fixed accordion collider.
- Fixed doors not blocking hitscan weapons.
- Continue playing the main menu and editor musics from previous position instead of restarting when switching between screens.
- Added missing sonar display background to sonar monitor.
- Fuel rods now always return their steel on deconstruction.
- Constructing fuel rods now requires lead.
- Added an improved version of Typhon.
- Reworked Berilia.
---------------------------------------------------------------------------------------------------------
v0.9.7.0
---------------------------------------------------------------------------------------------------------