From f3c22315a137ee2ff0bce3724b0635580946d47b Mon Sep 17 00:00:00 2001 From: NotAlwaysTrue <77662224+NotAlwaysTrue@users.noreply.github.com> Date: Fri, 2 Jan 2026 18:34:12 +0800 Subject: [PATCH] OBT/1.0.13 Fixed another crash(Object reference not set to an instance of an object.) --- .../SharedSource/Characters/Animation/Ragdoll.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Animation/Ragdoll.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Animation/Ragdoll.cs index 4c2d83683..059844e6d 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Animation/Ragdoll.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Animation/Ragdoll.cs @@ -1184,6 +1184,10 @@ namespace Barotrauma public void Teleport(Vector2 moveAmount, Vector2 velocityChange, bool detachProjectiles = true) { + // Hopefully this will fix some crashes :( + // If Collider was null then no need to procced: nothing is there already + if (Collider == null) { return; } + foreach (Limb limb in Limbs) { if (limb.IsSevered) { continue; } @@ -1205,6 +1209,7 @@ namespace Barotrauma character.DisableImpactDamageTimer = 0.25f; + // Why they did null check below but didn't do it here???? SetPosition(Collider.SimPosition + moveAmount); character.CursorPosition += moveAmount;