Removed redundant checks for a nullptr from PlayerManager::getPlayer()

These were written in desparation and never should have been there in
the first place.
This commit is contained in:
2020-12-01 20:18:01 +01:00
parent c43a3d64fb
commit 1e822f7a6c
10 changed files with 21 additions and 161 deletions

View File

@@ -74,13 +74,6 @@ void CNShardServer::_killConnection(CNSocket* cns) {
Player* plr = PlayerManager::getPlayer(cns);
if (plr == nullptr) { // this shouldn't happen if everything works correctly...
PlayerManager::removePlayer(cns);
// also, hopefully the player's progress was already saved since the last db save interval, but rip those 2 mins of progress lol
return;
}
int64_t key = plr->SerialKey;
PlayerManager::removePlayer(cns); // removes the player from the list and saves it to DB