src/newgrf_commons.cpp
changeset 7667 0355390b08d9
parent 7632 08e14d61a557
child 7714 24777a3bda1c
--- a/src/newgrf_commons.cpp	Wed Oct 03 00:57:54 2007 +0000
+++ b/src/newgrf_commons.cpp	Thu Oct 04 00:59:52 2007 +0000
@@ -188,7 +188,7 @@
  * checking what is available
  * @param inds Industryspec that comes from the grf decoding process
  */
-void IndustryOverrideManager::SetEntitySpec(const IndustrySpec *inds)
+void IndustryOverrideManager::SetEntitySpec(IndustrySpec *inds)
 {
 	/* First step : We need to find if this industry is already specified in the savegame data */
 	IndustryType ind_id = this->GetID(inds->grf_prop.local_id, inds->grf_prop.grffile->grfid);
@@ -206,6 +206,7 @@
 			 * Or it is a simple substitute.
 			 * In both case, we need to find a free available slot */
 			ind_id = this->AddEntityID(inds->grf_prop.local_id, inds->grf_prop.grffile->grfid, inds->grf_prop.subst_id);
+			inds->grf_prop.override = invalid_ID;  // make sure it will not be detected as overriden
 		}
 	}