Predict inventory slot interactions. (#6033)
This commit is contained in:
@@ -532,7 +532,7 @@ namespace Content.Shared.Interaction
|
||||
/// Finds components with the InteractUsing interface and calls their function
|
||||
/// NOTE: Does not have an InRangeUnobstructed check
|
||||
/// </summary>
|
||||
public async Task InteractUsing(EntityUid user, EntityUid used, EntityUid target, EntityCoordinates clickLocation)
|
||||
public async Task InteractUsing(EntityUid user, EntityUid used, EntityUid target, EntityCoordinates clickLocation, bool predicted = false)
|
||||
{
|
||||
if (!_actionBlockerSystem.CanInteract(user))
|
||||
return;
|
||||
@@ -541,7 +541,7 @@ namespace Content.Shared.Interaction
|
||||
return;
|
||||
|
||||
// all interactions should only happen when in range / unobstructed, so no range check is needed
|
||||
var interactUsingEvent = new InteractUsingEvent(user, used, target, clickLocation);
|
||||
var interactUsingEvent = new InteractUsingEvent(user, used, target, clickLocation, predicted);
|
||||
RaiseLocalEvent(target, interactUsingEvent);
|
||||
if (interactUsingEvent.Handled)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user