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.
This commit is contained in:
Vera Aguilera Puerto
2021-05-08 02:57:13 +02:00
parent 16daf3ed17
commit 5ae8894c83

View File

@@ -96,6 +96,10 @@ namespace Content.Server.GameObjects.Components.Items.RCD
async Task<bool> 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;