Initialize all members of all Entity-derived classes

Also moved some logic out of Mob into CombatNPC.
This commit is contained in:
2021-03-21 19:29:17 +01:00
parent 0c8e209360
commit 22678fcfc2
4 changed files with 109 additions and 112 deletions

View File

@@ -57,8 +57,8 @@ void PlayerManager::removePlayer(CNSocket* key) {
// save player to DB
Database::updatePlayer(plr);
EntityRef ref = {key};
// remove player visually and untrack
EntityRef ref = {key};
Chunking::removeEntityFromChunks(Chunking::getViewableChunks(plr->chunkPos), ref);
Chunking::untrackEntity(plr->chunkPos, ref);