v0.12.0.2
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
using Barotrauma.Networking;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
//team specific
|
||||
return descriptions[GameMain.Client.Character.TeamID == Character.TeamType.Team1 ? 1 : 2];
|
||||
return descriptions[GameMain.Client.Character.TeamID == CharacterTeamType.Team1 ? 1 : 2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,23 @@ namespace Barotrauma
|
||||
{
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
byte caveCount = msg.ReadByte();
|
||||
for (int i = 0; i < caveCount; i++)
|
||||
{
|
||||
byte selectedCave = msg.ReadByte();
|
||||
if (selectedCave < 255 && Level.Loaded != null)
|
||||
{
|
||||
if (selectedCave < Level.Loaded.Caves.Count)
|
||||
{
|
||||
Level.Loaded.Caves[selectedCave].DisplayOnSonar = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError($"Cave index out of bounds when reading nest mission data. Index: {selectedCave}, number of caves: {Level.Loaded.Caves.Count}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < ResourceClusters.Count; i++)
|
||||
{
|
||||
var amount = msg.ReadByte();
|
||||
|
||||
@@ -8,9 +8,23 @@ namespace Barotrauma
|
||||
{
|
||||
public override void ClientReadInitial(IReadMessage msg)
|
||||
{
|
||||
byte selectedCaveIndex = msg.ReadByte();
|
||||
nestPosition = new Vector2(
|
||||
msg.ReadSingle(),
|
||||
msg.ReadSingle());
|
||||
if (selectedCaveIndex < 255 && Level.Loaded != null)
|
||||
{
|
||||
if (selectedCaveIndex < Level.Loaded.Caves.Count)
|
||||
{
|
||||
Level.Loaded.Caves[selectedCaveIndex].DisplayOnSonar = true;
|
||||
SpawnNestObjects(Level.Loaded, Level.Loaded.Caves[selectedCaveIndex]);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError($"Cave index out of bounds when reading nest mission data. Index: {selectedCaveIndex}, number of caves: {Level.Loaded.Caves.Count}");
|
||||
}
|
||||
}
|
||||
|
||||
ushort itemCount = msg.ReadUInt16();
|
||||
for (int i = 0; i < itemCount; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user