private void SpawnInMedicalRoom(MyPlayer player, MyMedicalRoom medical, bool joiningGame)
        {
            if (MySession.Static.Settings.EnableOxygen)
            {
                player.Identity.ChangeToOxygenSafeSuit();
            }

            if (medical.HasSpawnPosition())
            {
                Matrix matrix = medical.GetSpawnPosition();
                player.SpawnAt(matrix, medical.Parent.Physics.LinearVelocity, false);
                medical.TryTakeSpawneeOwnership(player);
            }
            else if (joiningGame)
            {
                Vector3 medicalPosition = medical.PositionComp.GetPosition();
                medicalPosition += -medical.WorldMatrix.Up + medical.WorldMatrix.Right;
                Matrix matrix = medical.WorldMatrix;
                matrix.Translation = medicalPosition;
                player.SpawnAt(matrix, medical.Parent.Physics.LinearVelocity);
            }
            else
            {
                Matrix  invWorldRot      = Matrix.Invert(medical.WorldMatrix.GetOrientation());
                Vector3 relativeVelocity = Vector3.Transform(medical.Parent.Physics.LinearVelocity, invWorldRot);
                player.SpawnAtRelative(medical, MyMedicalRoom.GetSafePlaceRelative(), relativeVelocity);
            }
        }
        private static void SpawnLemming()
        {
            m_spawnCount--;

            if (m_spawnCount <= 0)
            {
                m_timeToNextSpawn = -1;
                return;
            }

            Vector3D spawnPosition = m_spawnMedical.PositionComp.GetPosition() + (MyMedicalRoom.GetSafePlaceRelative() * (Matrix)m_spawnMedical.WorldMatrix).Translation;
            MatrixD  matrix        = m_spawnMedical.WorldMatrix;

            matrix.Translation = spawnPosition;

            var character = MyCharacter.CreateCharacter((Matrix)matrix, Vector3.Zero, "Lemming" + m_lemmings.Count, null, null, false, true);

            character.EnableJetpack(false, false, true, true);
            character.AIMode = true;
            MatrixD m = character.WorldMatrix;

            m             = m * Matrix.CreateRotationY(-MathHelper.PiOver2);
            m.Translation = character.PositionComp.GetPosition();
            character.PositionComp.SetWorldMatrix(m);
            character.Save = false;
            MyLemmingCharacter lemming = new MyLemmingCharacter()
            {
                Character = character,
            };

            m_lemmings.Add(lemming);
        }