mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-10-20 20:30:19 +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:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "core/Core.hpp"
|
||||
#include "Chunking.hpp"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <set>
|
||||
@@ -15,8 +16,6 @@ enum class EntityType : uint8_t {
|
||||
BUS
|
||||
};
|
||||
|
||||
class Chunk;
|
||||
|
||||
struct Entity {
|
||||
EntityType type = EntityType::INVALID;
|
||||
int x = 0, y = 0, z = 0;
|
||||
|
Reference in New Issue
Block a user