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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user