632 {
633 if(!itemInHands)
634 return;
635
636 if(itemInHands.m_LightSourceItem && itemInHands.m_LightSourceItem.GetCompEM())
637 {
638 if(state && itemInHands.m_LightSourceItem.GetCompEM().GetPreviousSwitchState())
639 itemInHands.m_LightSourceItem.GetCompEM().SwitchOn();
640 else if (!state)
641 itemInHands.m_LightSourceItem.GetCompEM().SwitchOff();
642
643 return;
644 }
645
646 else if(itemInHands.GetCompEM())
647 {
648 if(state && itemInHands.GetCompEM().GetPreviousSwitchState())
649 itemInHands.GetCompEM().SwitchOn();
650 else if (!state)
651 itemInHands.GetCompEM().SwitchOff();
652
653 return;
654 }
655 }