Replace inPopulatedChunks with player counter for NPCs

This commit is contained in:
Gent S
2020-11-22 15:24:34 -05:00
parent 71d4f331b5
commit d1baa0d9f9
3 changed files with 19 additions and 1 deletions

View File

@@ -11,6 +11,8 @@ public:
ChunkPos chunkPos;
std::set<Chunk*>* viewableChunks;
int playersInView;
BaseNPC() {};
BaseNPC(int x, int y, int z, int angle, uint64_t iID, int type, int id) {
appearanceData.iX = x;
@@ -27,6 +29,7 @@ public:
chunkPos = std::make_tuple(0, 0, 0);
viewableChunks = new std::set<Chunk*>();
playersInView = 0;
};
BaseNPC(int x, int y, int z, int angle, uint64_t iID, int type, int id, NPCClass classType) : BaseNPC(x, y, z, angle, iID, type, id) {
npcClass = classType;