Some fixes to attachable items (buttons, signal items, etc):
- Syncing the attached/detached state of the items. This should fix the "received a position update for an item with no physics body " errors: midround-joining clients didn't get notified if an item had been detached, causing the error to appear every time it receives a position update. - Detached items can be picked up just like any other item, instead of having to use a wrench and wait for the item to "detach". - Wires can't be connected to items with a physics body (such as detached buttons).
This commit is contained in:
@@ -90,6 +90,13 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override bool Select(Character picker)
|
||||
{
|
||||
//attaching wires to items with a body is not allowed
|
||||
//(signal items remove their bodies when attached to a wall)
|
||||
if (item.body != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
user = picker;
|
||||
IsActive = true;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user