diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Holdable/Holdable.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Holdable/Holdable.cs index 799641991..cbffca55c 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Holdable/Holdable.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Holdable/Holdable.cs @@ -191,7 +191,7 @@ namespace Barotrauma.Items.Components item.body.Enabled = true; IsActive = true; - if (!alreadySelected) Networking.GameServer.Log(character.Name + " equipped " + item.Name, Networking.ServerLog.MessageType.ItemInteraction); + if (!alreadySelected) GameServer.Log(character.Name + " equipped " + item.Name, ServerLog.MessageType.ItemInteraction); } } @@ -201,7 +201,7 @@ namespace Barotrauma.Items.Components picker.DeselectItem(item); - Networking.GameServer.Log(character.Name + " unequipped " + item.Name, Networking.ServerLog.MessageType.ItemInteraction); + GameServer.Log(character.Name + " unequipped " + item.Name, ServerLog.MessageType.ItemInteraction); item.body.Enabled = false; IsActive = false; @@ -234,6 +234,10 @@ namespace Barotrauma.Items.Components if (GameMain.Server != null && attachable) { item.CreateServerEvent(this); + if (picker != null) + { + Networking.GameServer.Log(picker.Name + " detached " + item.Name + " from a wall", ServerLog.MessageType.ItemInteraction); + } } return true; } @@ -284,9 +288,10 @@ namespace Barotrauma.Items.Components { if (!character.IsKeyDown(InputType.Aim)) return false; if (character.CurrentHull == null) return false; - if (character != null && GameMain.Server != null) + if (GameMain.Server != null) { item.CreateServerEvent(this); + GameServer.Log(character.Name + " attached " + item.Name+" to a wall", ServerLog.MessageType.ItemInteraction); } item.Drop(); } diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Holdable/Throwable.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Holdable/Throwable.cs index a296e2935..344477c91 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Holdable/Throwable.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Holdable/Throwable.cs @@ -93,11 +93,11 @@ namespace Barotrauma.Items.Components Vector2 throwVector = picker.CursorWorldPosition - picker.WorldPosition; throwVector = Vector2.Normalize(throwVector); + GameServer.Log(picker.Name + " threw " + item.Name, ServerLog.MessageType.ItemInteraction); + item.Drop(); item.body.ApplyLinearImpulse(throwVector * throwForce * item.body.Mass * 3.0f); - GameServer.Log(picker.Name + " threw " + item.Name, ServerLog.MessageType.ItemInteraction); - ac.GetLimb(LimbType.Head).body.ApplyLinearImpulse(throwVector*10.0f); ac.GetLimb(LimbType.Torso).body.ApplyLinearImpulse(throwVector * 10.0f);