From: <dil...@us...> - 2014-07-25 07:35:25
|
Revision: 7294 http://sourceforge.net/p/freeorion/code/7294 Author: dilvish-fo Date: 2014-07-25 07:35:18 +0000 (Fri, 25 Jul 2014) Log Message: ----------- adjustment to colonization process, so that colonization of an empire-owned planet does not reset buildings on it (which was nullifying in-progress scrap orders) Modified Paths: -------------- trunk/FreeOrion/universe/Planet.cpp Modified: trunk/FreeOrion/universe/Planet.cpp =================================================================== --- trunk/FreeOrion/universe/Planet.cpp 2014-07-24 16:05:01 UTC (rev 7293) +++ trunk/FreeOrion/universe/Planet.cpp 2014-07-25 07:35:18 UTC (rev 7294) @@ -585,7 +585,6 @@ } void Planet::Reset() { - SetOwner(ALL_EMPIRES); PopCenter::Reset(); ResourceCenter::Reset(); @@ -598,14 +597,17 @@ GetMeter(METER_DETECTION)->Reset(); GetMeter(METER_REBEL_TROOPS)->Reset(); - for (std::set<int>::const_iterator it = m_buildings.begin(); it != m_buildings.end(); ++it) - if (TemporaryPtr<Building> building = GetBuilding(*it)) - building->Reset(); + if (m_is_about_to_be_colonized && !OwnedBy(ALL_EMPIRES)) { + for (std::set<int>::const_iterator it = m_buildings.begin(); it != m_buildings.end(); ++it) + if (TemporaryPtr<Building> building = GetBuilding(*it)) + building->Reset(); + } m_just_conquered = false; m_is_about_to_be_colonized = false; m_is_about_to_be_invaded = false; m_is_about_to_be_bombarded = false; + SetOwner(ALL_EMPIRES); } void Planet::Depopulate() { |