Exemplo n.º 1
0
        protected override void UnloadData()
        {
            Clusters.Dispose();

            Clusters.OnClusterCreated -= OnClusterCreated;
            Clusters.OnClusterRemoved -= OnClusterRemoved;
            Clusters = null;

            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool.RemoveReference();
                m_threadPool = null;

                m_jobQueue.Dispose();
                m_jobQueue = null;
            }
        }
Exemplo n.º 2
0
        public override void LoadData()
        {
            //HkBaseSystem.EnableAssert((int)0xd8279a05, false);
            HkBaseSystem.EnableAssert(-668493307, false);
            //HkBaseSystem.EnableAssert((int)3626473989, false);
            //float broadphaseSize = 100000.0f; // For unlimited worlds

            //Angular velocities and impulses
            HkBaseSystem.EnableAssert(952495168, false);
            HkBaseSystem.EnableAssert(1501626980, false);
            HkBaseSystem.EnableAssert(-258736554, false);
            HkBaseSystem.EnableAssert(524771844, false);
            HkBaseSystem.EnableAssert(1081361407, false);

            ThreadId = Thread.CurrentThread.ManagedThreadId;

            if (MyPerGameSettings.SingleCluster)
            {
                Clusters = new MyHavokCluster(MySession.Static.WorldBoundaries);
            }
            else
            {
                Clusters = new MyHavokCluster(null);
            }
            Clusters.OnClusterCreated += OnClusterCreated;
            Clusters.OnClusterRemoved += OnClusterRemoved;
            Clusters.OnFinishBatch    += OnFinishBatch;

            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool = new HkJobThreadPool();
                m_jobQueue   = new HkJobQueue(m_threadPool.ThreadCount + 1);
            }

            //Needed for smooth wheel movement
            HkCylinderShape.SetNumberOfVirtualSideSegments(128);
        }
Exemplo n.º 3
0
        protected override void UnloadData()
        {
            Clusters.Dispose();

            Clusters.OnClusterCreated -= OnClusterCreated;
            Clusters.OnClusterRemoved -= OnClusterRemoved;
            Clusters = null;

            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool.RemoveReference();
                m_threadPool = null;

                m_jobQueue.Dispose();
                m_jobQueue = null;
            }
            m_destructionQueue.Clear();

            if (MyPerGameSettings.Destruction)
            {
                //Dispose material otherwise memory is corrupted on DS service and memory leaks
                HkdBreakableShape.DisposeSharedMaterial();
            }
        }
Exemplo n.º 4
0
        protected override void UnloadData()
        {
            Clusters.Dispose();

            Clusters.OnClusterCreated -= OnClusterCreated;
            Clusters.OnClusterRemoved -= OnClusterRemoved;
            Clusters = null;

            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool.RemoveReference();
                m_threadPool = null;

                m_jobQueue.Dispose();
                m_jobQueue = null;
            }
            m_destructionQueue.Clear();

            if (MyPerGameSettings.Destruction)
            {
                //Dispose material otherwise memory is corrupted on DS service and memory leaks
                HkdBreakableShape.DisposeSharedMaterial();
            }
        }
Exemplo n.º 5
0
        public override void LoadData()
        {
            //HkBaseSystem.EnableAssert((int)0xd8279a05, false);
            HkBaseSystem.EnableAssert(-668493307, false);
            //HkBaseSystem.EnableAssert((int)3626473989, false);
            //float broadphaseSize = 100000.0f; // For unlimited worlds
            
            //Angular velocities and impulses
            HkBaseSystem.EnableAssert(952495168, false);
            HkBaseSystem.EnableAssert(1501626980, false);
            HkBaseSystem.EnableAssert(-258736554, false);
            HkBaseSystem.EnableAssert(524771844, false);
            HkBaseSystem.EnableAssert(1081361407, false);
            HkBaseSystem.EnableAssert(-1383504214, false); //we have more shapeKeys in contact point data

            //frequent, removing to clean logs
            HkBaseSystem.EnableAssert(-265005969, false); //calling set transform on body trying to deactivate
            HkBaseSystem.EnableAssert(1976984315, false);
            HkBaseSystem.EnableAssert(-252450131, false);
            HkBaseSystem.EnableAssert(-1400416854, false);

            ThreadId = Thread.CurrentThread.ManagedThreadId;

            if (MyPerGameSettings.SingleCluster)
            {
                Clusters = new MyHavokCluster(MySession.Static.WorldBoundaries);
            }
            else
            {
                Clusters = new MyHavokCluster(null);
            }
            Clusters.OnClusterCreated += OnClusterCreated;
            Clusters.OnClusterRemoved += OnClusterRemoved;
            Clusters.OnFinishBatch += OnFinishBatch;

            if (MyPerGameSettings.SingleCluster)
            {
                Clusters.CreateSingleCluster();
            }
            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool = new HkJobThreadPool();
                m_jobQueue = new HkJobQueue(m_threadPool.ThreadCount + 1);
            }

            //Needed for smooth wheel movement
            HkCylinderShape.SetNumberOfVirtualSideSegments(128);
        }
Exemplo n.º 6
0
        protected override void UnloadData()
        {
            Clusters.Dispose();

            Clusters.OnClusterCreated -= OnClusterCreated;
            Clusters.OnClusterRemoved -= OnClusterRemoved;
            Clusters = null;

            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool.RemoveReference();
                m_threadPool = null;

                m_jobQueue.Dispose();
                m_jobQueue = null;
            }
        }
Exemplo n.º 7
0
        public override void LoadData()
        {
            //HkBaseSystem.EnableAssert((int)0xd8279a05, false);
            HkBaseSystem.EnableAssert(-668493307, false);
            //HkBaseSystem.EnableAssert((int)3626473989, false);
            //float broadphaseSize = 100000.0f; // For unlimited worlds
            
            //Angular velocities and impulses
            HkBaseSystem.EnableAssert(952495168, false);
            HkBaseSystem.EnableAssert(1501626980, false);
            HkBaseSystem.EnableAssert(-258736554, false);
            HkBaseSystem.EnableAssert(524771844, false);
            HkBaseSystem.EnableAssert(1081361407, false);

            ThreadId = Thread.CurrentThread.ManagedThreadId;

            if(MyPerGameSettings.SingleCluster)
                Clusters = new MyHavokCluster(MySession.Static.WorldBoundaries);
            else
                Clusters = new MyHavokCluster(null);
            Clusters.OnClusterCreated += OnClusterCreated;
            Clusters.OnClusterRemoved += OnClusterRemoved;
            Clusters.OnFinishBatch += OnFinishBatch;

            if (MyFakes.ENABLE_HAVOK_MULTITHREADING)
            {
                m_threadPool = new HkJobThreadPool();
                m_jobQueue = new HkJobQueue(m_threadPool.ThreadCount + 1);
            }

            //Needed for smooth wheel movement
            HkCylinderShape.SetNumberOfVirtualSideSegments(128);
        }