mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-02-11 14:50:03 +00:00
[refactor] Sync with master
This was initially a merge commit that got ironed out by rebase cleanup. Notable changes are: - Copying EntityRef instead of referencing it - Some changes to includes
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "Entities.hpp"
|
||||
#include "EntityRef.hpp"
|
||||
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
struct EntityRef;
|
||||
|
||||
class Chunk {
|
||||
public:
|
||||
std::set<EntityRef> entities;
|
||||
@@ -34,13 +32,13 @@ namespace Chunking {
|
||||
|
||||
extern const ChunkPos INVALID_CHUNK;
|
||||
|
||||
void updateEntityChunk(const EntityRef& ref, ChunkPos from, ChunkPos to);
|
||||
void updateEntityChunk(const EntityRef ref, ChunkPos from, ChunkPos to);
|
||||
|
||||
void trackEntity(ChunkPos chunkPos, const EntityRef& ref);
|
||||
void untrackEntity(ChunkPos chunkPos, const EntityRef& ref);
|
||||
void trackEntity(ChunkPos chunkPos, const EntityRef ref);
|
||||
void untrackEntity(ChunkPos chunkPos, const EntityRef ref);
|
||||
|
||||
void addEntityToChunks(std::set<Chunk*> chnks, const EntityRef& ref);
|
||||
void removeEntityFromChunks(std::set<Chunk*> chnks, const EntityRef& ref);
|
||||
void addEntityToChunks(std::set<Chunk*> chnks, const EntityRef ref);
|
||||
void removeEntityFromChunks(std::set<Chunk*> chnks, const EntityRef ref);
|
||||
|
||||
bool chunkExists(ChunkPos chunk);
|
||||
ChunkPos chunkPosAt(int posX, int posY, uint64_t instanceID);
|
||||
|
||||
Reference in New Issue
Block a user