HandsComponent now validates coordinates before attempting to drop.

This commit is contained in:
Vera Aguilera Puerto
2021-05-08 03:49:34 +02:00
parent b35e4d7e7c
commit 2c5102b85d

View File

@@ -291,7 +291,7 @@ namespace Content.Server.GameObjects.Components.GUI
public bool Drop(string slot, EntityCoordinates coords, bool doMobChecks = true, bool doDropInteraction = true, bool intentional = true)
{
var hand = GetHand(slot);
if (!CanDrop(slot, doMobChecks) || hand?.Entity == null)
if (!CanDrop(slot, doMobChecks) || !coords.IsValid(Owner.EntityManager) || hand?.Entity == null)
{
return false;
}