mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
not much point using a map
This commit is contained in:
parent
27e631d546
commit
e73d9dea0d
2 changed files with 4 additions and 3 deletions
|
@ -160,7 +160,8 @@ bool Sapphire::HousingZone::init()
|
||||||
obj.pos_y = Util::floatToUInt16( pos.y );
|
obj.pos_y = Util::floatToUInt16( pos.y );
|
||||||
obj.pos_z = Util::floatToUInt16( pos.z );
|
obj.pos_z = Util::floatToUInt16( pos.z );
|
||||||
|
|
||||||
m_yardObjects[ yardMapIndex ][ item.first + arrayBounds.first ] = obj;
|
auto idx = item.first + arrayBounds.first;
|
||||||
|
m_yardObjects[ yardMapIndex ][ idx ] = obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace Sapphire
|
||||||
private:
|
private:
|
||||||
using LandPtrMap = std::unordered_map< uint8_t, Sapphire::LandPtr >;
|
using LandPtrMap = std::unordered_map< uint8_t, Sapphire::LandPtr >;
|
||||||
using YardObjectArray = std::array< Common::YardObject, 800 >;
|
using YardObjectArray = std::array< Common::YardObject, 800 >;
|
||||||
using YardObjectMap = std::map< uint8_t, YardObjectArray >;
|
using YardObjectSubdivisionArray = std::array< YardObjectArray, 2 >;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Maps the start and end index of the yard object array for a specific plot
|
* @brief Maps the start and end index of the yard object array for a specific plot
|
||||||
|
@ -78,7 +78,7 @@ namespace Sapphire
|
||||||
uint32_t m_landSetId;
|
uint32_t m_landSetId;
|
||||||
uint32_t m_territoryTypeId;
|
uint32_t m_territoryTypeId;
|
||||||
|
|
||||||
YardObjectMap m_yardObjects;
|
YardObjectSubdivisionArray m_yardObjects;
|
||||||
YardObjectArrayBoundsArray m_yardObjectArrayBounds;
|
YardObjectArrayBoundsArray m_yardObjectArrayBounds;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue