diff options
| author | Petr Mrázek | 2012-02-27 17:44:09 +0100 |
|---|---|---|
| committer | Petr Mrázek | 2012-02-27 17:44:09 +0100 |
| commit | ca35c82579d1e3e0ce227ccdaeb71c2a6dbf1cb9 (patch) | |
| tree | 04052da84dee32c944dc3d8e9a4167102cc2b8e9 /GameBuildings.cpp | |
| parent | 09476326db2b0613e6120fa83146e004b6d92dda (diff) | |
| download | stonesense-ca35c82579d1e3e0ce227ccdaeb71c2a6dbf1cb9.tar.gz stonesense-ca35c82579d1e3e0ce227ccdaeb71c2a6dbf1cb9.tar.bz2 stonesense-ca35c82579d1e3e0ce227ccdaeb71c2a6dbf1cb9.tar.xz | |
Get rid of a bunch of things. Simpler map segment update mechanism.
Diffstat (limited to 'GameBuildings.cpp')
| -rw-r--r-- | GameBuildings.cpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/GameBuildings.cpp b/GameBuildings.cpp index ffb0397..d896b55 100644 --- a/GameBuildings.cpp +++ b/GameBuildings.cpp @@ -74,16 +74,7 @@ void ReadBuildings(DFHack::Core& DF, vector<Buildings::t_building>* buildingHold uint32_t index = 0;
while(index < numbuildings){
- try
- {
- Buildings::Read(index, tempbuilding);
- }
- catch (exception &e)
- {
- WriteErr("DFhack exeption: %s\n", e.what());
- config.skipBuildings = true;
- return;
- }
+ Buildings::Read(index, tempbuilding);
buildingHolder->push_back(tempbuilding);
index++;
}
@@ -115,15 +106,13 @@ void MergeBuildingsToSegment(vector<Buildings::t_building>* buildings, WorldSegm segment->addBlock( b );
}
- if( b ){
- //handle special case where zones and stockpiles overlap buildings, and try to replace them
- if(b->building.info.type != BUILDINGTYPE_NA && tempbuilding.type == df::enums::building_type::Civzone )
- continue;
- if(b->building.info.type != BUILDINGTYPE_NA && tempbuilding.type == df::enums::building_type::Stockpile )
- continue;
- b->building.index = i;
- b->building.info = tempbuilding;
- }
+ //handle special case where zones and stockpiles overlap buildings, and try to replace them
+ if(b->building.info.type != BUILDINGTYPE_NA && tempbuilding.type == df::enums::building_type::Civzone )
+ continue;
+ if(b->building.info.type != BUILDINGTYPE_NA && tempbuilding.type == df::enums::building_type::Stockpile )
+ continue;
+ b->building.index = i;
+ b->building.info = tempbuilding;
}
}
}
|
