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

@@ -627,9 +627,6 @@ void PlayerManager::setSpecialPlayer(CNSocket* sock, CNPacketData* data) {
sP_CL2FE_GM_REQ_PC_SET_VALUE* setData = (sP_CL2FE_GM_REQ_PC_SET_VALUE*)data->buf;
Player *plr = PlayerManager::getPlayer(sock);
if (plr == nullptr)
return;
INITSTRUCT(sP_FE2CL_GM_REP_PC_SET_VALUE, response);
DEBUGLOG(
@@ -696,9 +693,6 @@ void PlayerManager::revivePlayer(CNSocket* sock, CNPacketData* data) {
Player *plr = PlayerManager::getPlayer(sock);
if (plr == nullptr)
return;
WarpLocation* target = PlayerManager::getRespawnPoint(plr);
sP_CL2FE_REQ_PC_REGEN* reviveData = (sP_CL2FE_REQ_PC_REGEN*)data->buf;
@@ -934,9 +928,6 @@ void PlayerManager::setSpecialState(CNSocket* sock, CNPacketData* data) {
Player *plr = getPlayer(sock);
if (plr == nullptr)
return;
sP_CL2FE_GM_REQ_PC_SPECIAL_STATE_SWITCH* setData = (sP_CL2FE_GM_REQ_PC_SPECIAL_STATE_SWITCH*)data->buf;
// HACK: work around the invisible weapon bug