mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +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_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:
|
||||
using LandPtrMap = std::unordered_map< uint8_t, Sapphire::LandPtr >;
|
||||
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
|
||||
|
@ -78,7 +78,7 @@ namespace Sapphire
|
|||
uint32_t m_landSetId;
|
||||
uint32_t m_territoryTypeId;
|
||||
|
||||
YardObjectMap m_yardObjects;
|
||||
YardObjectSubdivisionArray m_yardObjects;
|
||||
YardObjectArrayBoundsArray m_yardObjectArrayBounds;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue