Example #1
0
        public static void UnloadData()
        {
            // all lights should be deallocated at this point
            MyCommonDebugUtils.AssertDebug(m_preallocatedLights.GetActiveCount() == 0, "MyLights.UnloadData: preallocated lights not emptied!");
            m_preallocatedLights.DeallocateAll();
            if (m_sortedLights != null)
            {
                m_sortedLights.Clear();
                m_sortedLights = null;
            }

            m_tree.Clear();
        }
Example #2
0
 //  This method tells us if this buffer is almost consumed, so few more allocations and it's done.
 //  In that case, level needs to be reinicialized by server.
 public static bool IsAlmostFull()
 {
     //return m_nextForAllocation >= (m_capacity * 0.9);
     return(m_preallocatedContents.GetActiveCount() > (m_preallocatedContents.GetCapacity() * 0.9));
 }
Example #3
0
 public static int GetActiveCount()
 {
     return(m_missiles.GetActiveCount());
 }
Example #4
0
 public static int GetActiveCount()
 {
     return(m_hologramShips.GetActiveCount());
 }
Example #5
0
 public static int GetActiveCount()
 {
     return(m_projectiles.GetActiveCount());
 }
Example #6
0
 //  Checks if buffer has enough free triangles for adding new decal. If not, we can't add triangles
 //  of the decal (because we add all decal triangles or none)
 public bool CanAddTriangles(int newTrianglesCount)
 {
     //  If buffer is full, we can't add new triangles
     return((m_triangles.GetActiveCount() + newTrianglesCount) < m_triangles.GetCapacity());
 }