From 5ae8894c83759c1c0179f9abf3adf4322dcb79eb Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sat, 8 May 2021 02:57:13 +0200 Subject: [PATCH] Fix RCD exception when being used in spess. This does not fix the actual functionality, it just checks whether the click location is not space. This needs to be fixed in the future to work in space. --- .../GameObjects/Components/Items/RCD/RCDComponent.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs b/Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs index 8d29c0d697..a847c47012 100644 --- a/Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs +++ b/Content.Server/GameObjects/Components/Items/RCD/RCDComponent.cs @@ -96,6 +96,10 @@ namespace Content.Server.GameObjects.Components.Items.RCD async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs) { + // FIXME: Make this work properly. Right now it relies on the click location being on a grid, which is bad. + if (!eventArgs.ClickLocation.IsValid(Owner.EntityManager) || !eventArgs.ClickLocation.GetGridId(Owner.EntityManager).IsValid()) + return false; + //No changing mode mid-RCD var startingMode = _mode;