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