617 {
618 if(!itemInHands)
619 return;
620
621 if(itemInHands.m_LightSourceItem && itemInHands.m_LightSourceItem.GetCompEM())
622 {
623 if(state && itemInHands.m_LightSourceItem.GetCompEM().GetPreviousSwitchState())
624 itemInHands.m_LightSourceItem.GetCompEM().SwitchOn();
625 else if (!state)
626 itemInHands.m_LightSourceItem.GetCompEM().SwitchOff();
627
628 return;
629 }
630
631 else if(itemInHands.GetCompEM())
632 {
633 if(state && itemInHands.GetCompEM().GetPreviousSwitchState())
634 itemInHands.GetCompEM().SwitchOn();
635 else if (!state)
636 itemInHands.GetCompEM().SwitchOff();
637
638 return;
639 }
640 }