Fix getting stuck on tables (#21981)

This commit is contained in:
metalgearsloth
2023-11-30 00:23:21 +11:00
committed by GitHub
parent 09966809aa
commit b08c4edd55

View File

@@ -355,13 +355,14 @@ public sealed partial class ClimbSystem : VirtualController
return;
}
foreach (var fixture in args.OurFixture.Contacts.Keys)
foreach (var otherFixture in args.OurFixture.Contacts.Keys)
{
if (fixture == args.OtherFixture)
// If it's the other fixture then ignore em
if (otherFixture == args.OtherFixture)
continue;
// If still colliding with a climbable, do not stop climbing
if (HasComp<ClimbableComponent>(args.OtherEntity))
if (HasComp<ClimbableComponent>(otherFixture.Owner))
return;
}