|
|
|
@ -278,6 +278,8 @@ Maps::Maps(DFContextShared* _d)
|
|
|
|
|
|
|
|
|
|
Maps::~Maps()
|
|
|
|
|
{
|
|
|
|
|
if(d->FeaturesStarted)
|
|
|
|
|
StopFeatures();
|
|
|
|
|
if(d->Started)
|
|
|
|
|
Finish();
|
|
|
|
|
delete d;
|
|
|
|
@ -357,10 +359,7 @@ bool Maps::Finish()
|
|
|
|
|
{
|
|
|
|
|
if(d->FeaturesStarted)
|
|
|
|
|
{
|
|
|
|
|
d->local_feature_store.clear();
|
|
|
|
|
d->v_global_feature.clear();
|
|
|
|
|
d->m_local_feature.clear();
|
|
|
|
|
d->FeaturesStarted = false;
|
|
|
|
|
StopFeatures();
|
|
|
|
|
}
|
|
|
|
|
if (d->block != NULL)
|
|
|
|
|
{
|
|
|
|
@ -604,6 +603,18 @@ bool Maps::ReadRegionOffsets (uint32_t x, uint32_t y, uint32_t z, biome_indices4
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool Maps::StopFeatures()
|
|
|
|
|
{
|
|
|
|
|
if(d->FeaturesStarted)
|
|
|
|
|
{
|
|
|
|
|
d->local_feature_store.clear();
|
|
|
|
|
d->v_global_feature.clear();
|
|
|
|
|
d->m_local_feature.clear();
|
|
|
|
|
d->FeaturesStarted = false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Maps::StartFeatures()
|
|
|
|
|
{
|
|
|
|
@ -1092,7 +1103,7 @@ bool Maps::ReadGeology (vector < vector <uint16_t> >& assign)
|
|
|
|
|
|
|
|
|
|
bool Maps::ReadLocalFeatures( std::map <DFCoord, std::vector<t_feature *> > & local_features )
|
|
|
|
|
{
|
|
|
|
|
if(!d->FeaturesStarted)
|
|
|
|
|
StopFeatures();
|
|
|
|
|
StartFeatures();
|
|
|
|
|
if(d->FeaturesStarted)
|
|
|
|
|
{
|
|
|
|
@ -1104,7 +1115,7 @@ bool Maps::ReadLocalFeatures( std::map <DFCoord, std::vector<t_feature *> > & lo
|
|
|
|
|
|
|
|
|
|
bool Maps::ReadGlobalFeatures( std::vector <t_feature> & features)
|
|
|
|
|
{
|
|
|
|
|
if(!d->FeaturesStarted)
|
|
|
|
|
StopFeatures();
|
|
|
|
|
StartFeatures();
|
|
|
|
|
if(d->FeaturesStarted)
|
|
|
|
|
{
|
|
|
|
|