Changeset - r7667:3c17bebdab13
[Not reviewed]
master
0 2 0
belugas - 17 years ago 2007-10-04 00:59:52
belugas@openttd.org
(svn r11198) -Fix: When industry override is not possible because it is already been overridden, mark the new candidate as not being an override
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf_commons.cpp
Show inline comments
 
@@ -188,7 +188,7 @@ uint16 IndustryOverrideManager::AddEntit
 
 * 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 @@ void IndustryOverrideManager::SetEntityS
 
			 * 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
 
		}
 
	}
 

	
src/newgrf_commons.h
Show inline comments
 
@@ -71,7 +71,7 @@ public:
 
			OverrideManagerBase(offset, maximum, invalid) {}
 

	
 
	virtual uint16 AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id);
 
	void SetEntitySpec(const IndustrySpec *inds);
 
	void SetEntitySpec(IndustrySpec *inds);
 
};
 

	
 

	
0 comments (0 inline, 0 general)