Logging when players attach items on walls or detach them, null exception fix in Throwable (picker is set to null in Item.Drop)

This commit is contained in:
Joonas Rikkonen
2017-07-17 23:28:46 +03:00
parent 575b643c62
commit 56e04823f1
2 changed files with 10 additions and 5 deletions
@@ -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);