Fixed crash when projectiles stuck to items on dedicated server

Report submitted by etet2, haven't tested it yet but I'm fairly certain this should fix the crash
This commit is contained in:
juanjp600
2017-08-14 21:35:19 -03:00
parent 8691789974
commit 6fe9130dd8

View File

@@ -232,7 +232,7 @@ namespace Barotrauma.Items.Components
stickJoint.MaxMotorForce = 30.0f;
stickJoint.LimitEnabled = true;
stickJoint.UpperLimit = ConvertUnits.ToSimUnits(item.Sprite.size.X*0.7f);
if (item.Sprite != null) stickJoint.UpperLimit = ConvertUnits.ToSimUnits(item.Sprite.size.X*0.7f);
item.body.FarseerBody.IgnoreCollisionWith(targetBody);
stickTarget = targetBody;