mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-10-27 23:00:05 +00:00
Use a specialized null value for ChunkPos
This prevents logic errors related to being in chunk 0 0 0. Also: * Moved some duplicated chunk teleportation logic to a new helper function * Made ChunkPos into a proper class so it can default to INVALID_CHUNK when default-initialized * Reversed the inclusion order of Chunking.hpp and Entities.hpp to work around problems with type definitions
This commit is contained in:
@@ -41,9 +41,6 @@
|
||||
#define ARRLEN(x) (sizeof(x)/sizeof(*x))
|
||||
#define AUTOU16TOU8(x) U16toU8(x, ARRLEN(x))
|
||||
|
||||
// typedef for chunk position tuple
|
||||
typedef std::tuple<int, int, uint64_t> ChunkPos;
|
||||
|
||||
// TODO: rewrite U16toU8 & U8toU16 to not use codecvt
|
||||
|
||||
std::string U16toU8(char16_t* src, size_t max);
|
||||
|
||||
Reference in New Issue
Block a user