Merge branch 'master' into jgrpp
# Conflicts: # src/clear_cmd.cpp # src/main_gui.cpp # src/saveload/newgrf_sl.cpp # src/water_cmd.cpp
This commit is contained in:
@@ -175,7 +175,7 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as)
|
||||
{
|
||||
byte airport_id = this->AddEntityID(as->grf_prop.local_id, as->grf_prop.grffile->grfid, as->grf_prop.subst_id);
|
||||
|
||||
if (airport_id == invalid_ID) {
|
||||
if (airport_id == this->invalid_id) {
|
||||
grfmsg(1, "Airport.SetEntitySpec: Too many airports allocated. Ignoring.");
|
||||
return;
|
||||
}
|
||||
@@ -183,15 +183,15 @@ void AirportOverrideManager::SetEntitySpec(AirportSpec *as)
|
||||
memcpy(AirportSpec::GetWithoutOverride(airport_id), as, sizeof(*as));
|
||||
|
||||
/* Now add the overrides. */
|
||||
for (int i = 0; i < max_offset; i++) {
|
||||
for (int i = 0; i < this->max_offset; i++) {
|
||||
AirportSpec *overridden_as = AirportSpec::GetWithoutOverride(i);
|
||||
|
||||
if (entity_overrides[i] != as->grf_prop.local_id || grfid_overrides[i] != as->grf_prop.grffile->grfid) continue;
|
||||
if (this->entity_overrides[i] != as->grf_prop.local_id || this->grfid_overrides[i] != as->grf_prop.grffile->grfid) continue;
|
||||
|
||||
overridden_as->grf_prop.override = airport_id;
|
||||
overridden_as->enabled = false;
|
||||
entity_overrides[i] = invalid_ID;
|
||||
grfid_overrides[i] = 0;
|
||||
this->entity_overrides[i] = this->invalid_id;
|
||||
this->grfid_overrides[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user