Ticket #3450: OOS_fix.patch

File OOS_fix.patch, 957 bytes (added by Itms, 9 years ago)
  • source/simulation2/components/CCmpPathfinder.cpp

     
    529529    else
    530530        m_LongPathfinder.Update(m_Grid, m_ObstructionsDirty.dirtinessGrid);
    531531
    532     // Notify the units that their current paths can be invalid now
    533     CMessagePassabilityMapChanged msg;
    534     GetSimContext().GetComponentManager().BroadcastMessage(msg);
     532    // Notify the units that their current paths can be invalid now.
     533    // The passability map will be globally dirty after init, or rejoining, loading a saved game, etc.
     534    // In those situations the paths can't be invalid.
     535    if (!m_ObstructionsDirty.globallyDirty)
     536    {
     537        CMessagePassabilityMapChanged msg;
     538        GetSimContext().GetComponentManager().BroadcastMessage(msg);
     539    }
    535540}
    536541
    537542void CCmpPathfinder::MinimalTerrainUpdate()