Ejemplo n.º 1
0
        private void HandleSetHand(RequestSetHandEvent msg, EntitySessionEventArgs eventArgs)
        {
            var entity = eventArgs.SenderSession?.AttachedEntity;

            if (entity == null || !entity.TryGetComponent(out SharedHandsComponent? hands))
                return;

            hands.ActiveHand = msg.HandName;
        }
Ejemplo n.º 2
0
        private void HandleSetHand(RequestSetHandEvent msg, EntitySessionEventArgs eventArgs)
        {
            if (eventArgs.SenderSession.AttachedEntity == null)
            {
                return;
            }

            TrySetActiveHand(eventArgs.SenderSession.AttachedEntity.Value, msg.HandName);
        }