Fix for #22516 - mobs can no longer cause clumsy mobs to get hurt on tables (#22684)

Fix for 22516 - mobs can no longer cause other mobs to be bonked against tables.
This commit is contained in:
J. Brown
2023-12-21 15:18:26 +00:00
committed by GitHub
parent 0c8b186e3a
commit 221eb561de
2 changed files with 9 additions and 5 deletions

View File

@@ -163,11 +163,16 @@ public sealed partial class ClimbSystem : VirtualController
if (args.Handled)
return;
var canVault = args.User == args.Dragged
? CanVault(component, args.User, uid, out _)
: CanVault(component, args.User, args.Dragged, uid, out _);
args.CanDrop = canVault;
if (!HasComp<HandsComponent>(args.User))
args.CanDrop = false;
args.Handled = true;
}
@@ -189,9 +194,7 @@ public sealed partial class ClimbSystem : VirtualController
private void OnClimbableDragDrop(EntityUid uid, ClimbableComponent component, ref DragDropTargetEvent args)
{
// definitely a better way to check if two entities are equal
// but don't have computer access and i have to do this without syntax
if (args.Handled || args.User != args.Dragged && !HasComp<HandsComponent>(args.User))
if (args.Handled)
return;
TryClimb(args.User, args.Dragged, uid, out _, component);