Ticket #3407: 3407-v1.1.patch

File 3407-v1.1.patch, 669 bytes (added by s0600204, 9 years ago)

Removed the ENSURE

  • source/simulation2/components/CCmpTerritoryManager.cpp

     
    540540    if (m_TerritoryTotalPassableCellCount == 0)
    541541        CalculateTerritories();
    542542
    543     ENSURE(m_TerritoryTotalPassableCellCount > 0);
     543    // If it is still 0, then we return 0
     544    if (m_TerritoryTotalPassableCellCount == 0)
     545        return 0;
     546
    544547    u8 percentage = (m_TerritoryCellCounts[player] * 100) / m_TerritoryTotalPassableCellCount;
    545548    ENSURE(percentage <= 100);
    546549    return percentage;