mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-01-27 16:50:06 +00:00
QoL improvements.
* Use macros for extracting map numbers and player IDs from instance IDs * Add docstrings to all commands * Remove /test command * Sync with tdata
This commit is contained in:
@@ -202,7 +202,7 @@ bool ChunkManager::inPopulatedChunks(int posX, int posY, uint64_t instanceID) {
|
||||
|
||||
void ChunkManager::createInstance(uint64_t instanceID) {
|
||||
|
||||
std::vector<std::tuple<int, int, uint64_t>> templateChunks = ChunkManager::getChunksInMap(instanceID & 0xffffffff); // base instance chunks
|
||||
std::vector<std::tuple<int, int, uint64_t>> templateChunks = ChunkManager::getChunksInMap(MAPNUM(instanceID)); // base instance chunks
|
||||
if (ChunkManager::getChunksInMap(instanceID).size() == 0) { // only instantiate if the instance doesn't exist already
|
||||
std::cout << "Creating instance " << instanceID << std::endl;
|
||||
for (std::tuple<int, int, uint64_t> &coords : templateChunks) {
|
||||
|
||||
Reference in New Issue
Block a user