mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-01-12 19:40:04 +00:00
[WIP] Convert all chunk-related logic to the new system's semantics
Replaced all references to chunk->players and chunk->NPCs with chunk->entities and all instances of the old NPCClass enum with EntityType. The server compiles but will not yet run properly.
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
|
||||
class Chunk {
|
||||
public:
|
||||
std::set<CNSocket*> players;
|
||||
std::set<int32_t> NPCs;
|
||||
//std::set<CNSocket*> players;
|
||||
//std::set<int32_t> NPCs;
|
||||
std::set<EntityRef> entities;
|
||||
int nplayers = 0;
|
||||
};
|
||||
@@ -41,18 +41,4 @@ namespace Chunking {
|
||||
bool inPopulatedChunks(std::set<Chunk*>* chnks);
|
||||
void createInstance(uint64_t);
|
||||
void destroyInstanceIfEmpty(uint64_t);
|
||||
|
||||
// death row below this point
|
||||
//void updatePlayerChunk(CNSocket* sock, ChunkPos from, ChunkPos to);
|
||||
//void updateNPCChunk(int32_t id, ChunkPos from, ChunkPos to);
|
||||
|
||||
//void trackPlayer(ChunkPos chunkPos, CNSocket* sock);
|
||||
//void trackNPC(ChunkPos chunkPos, int32_t id);
|
||||
//void untrackPlayer(ChunkPos chunkPos, CNSocket* sock);
|
||||
//void untrackNPC(ChunkPos chunkPos, int32_t id);
|
||||
|
||||
//void addPlayerToChunks(std::set<Chunk*> chnks, CNSocket* sock);
|
||||
//void addNPCToChunks(std::set<Chunk*> chnks, int32_t id);
|
||||
//void removePlayerFromChunks(std::set<Chunk*> chnks, CNSocket* sock);
|
||||
//void removeNPCFromChunks(std::set<Chunk*> chnks, int32_t id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user