Added some debug logging, Character.Revive removes the existing AITarget from the character before creating a new one
This commit is contained in:
@@ -17,8 +17,13 @@ namespace Barotrauma
|
||||
var entity = FindEntityByID(entityId);
|
||||
if (entity != null)
|
||||
{
|
||||
DebugConsole.Log("Received entity removal message for \"" + entity.ToString() + "\".");
|
||||
entity.Remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.Log("Received entity removal message for ID " + entityId + ". Entity with a matching ID not found.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1957,6 +1957,10 @@ namespace Barotrauma
|
||||
{
|
||||
isDead = false;
|
||||
|
||||
if (aiTarget != null)
|
||||
{
|
||||
aiTarget.Remove();
|
||||
}
|
||||
aiTarget = new AITarget(this);
|
||||
|
||||
Health = Math.Max(maxHealth * 0.1f, health);
|
||||
|
||||
@@ -384,6 +384,11 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public void ServerWrite(NetBuffer msg, Client c, object[] extraData = null)
|
||||
{
|
||||
if (!attachable)
|
||||
{
|
||||
DebugConsole.ThrowError("Sent an attachment event for an item that's not attachable.");
|
||||
}
|
||||
|
||||
msg.Write(Attached);
|
||||
}
|
||||
|
||||
|
||||
@@ -1555,6 +1555,8 @@ namespace Barotrauma
|
||||
|
||||
ushort inventoryId = msg.ReadUInt16();
|
||||
|
||||
DebugConsole.Log("Received entity spawn message for item " + itemName + ".");
|
||||
|
||||
Vector2 pos = Vector2.Zero;
|
||||
Submarine sub = null;
|
||||
int inventorySlotIndex = -1;
|
||||
|
||||
Reference in New Issue
Block a user