示例#1
0
        protected override void ComponentStack_IsFunctionalChanged()
        {
            MyCharacter        pilot      = base.m_pilot;
            MyEntityController controller = base.ControllerInfo.Controller;

            base.ComponentStack_IsFunctionalChanged();
            if ((!base.IsFunctional && (pilot != null)) && (controller == null))
            {
                if (MySession.Static.CreativeMode)
                {
                    pilot.Close();
                }
                else
                {
                    pilot.DoDamage(1000f, MyDamageType.Destruction, false, 0L);
                }
            }
        }