Clients ignore messages about attaching an item to a wall if the item is not attachable, and don't drop the the items before attaching (because it disconnects all connected wires). The spamevents debug command didn't work correctly because of this, and I'd imagine that the latter could have caused wires to drop from some attached items when joining mid-round.
This commit is contained in:
@@ -360,9 +360,19 @@ namespace Barotrauma.Items.Components
|
||||
public void ClientRead(ServerNetObject type, NetBuffer msg, float sendingTime)
|
||||
{
|
||||
bool isAttached = msg.ReadBoolean();
|
||||
|
||||
if (!attachable)
|
||||
{
|
||||
DebugConsole.ThrowError("Received an attachment event for an item that's not attachable.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (isAttached)
|
||||
{
|
||||
item.Drop();
|
||||
if (item.ParentInventory != null)
|
||||
{
|
||||
item.ParentInventory.RemoveItem(item);
|
||||
}
|
||||
AttachToWall();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user