private void OnCancelledDoAfter(CancelledDoAfterMessage ev) { if (!TryComp <DoAfterComponent>(ev.Uid, out var doAfter)) { return; } Cancel(doAfter, ev.ID); }
public void Cancelled(DoAfter doAfter) { if (!_doAfters.TryGetValue(doAfter, out var index)) { return; } if (TryGetConnectedClient(out var connectedClient)) { var message = new CancelledDoAfterMessage(index); SendNetworkMessage(message, connectedClient); } _doAfters.Remove(doAfter); }