mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-01-11 19:20:14 +00:00
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:
@@ -69,8 +69,6 @@ void levelCommand(std::string full, std::vector<std::string>& args, CNSocket* so
|
||||
}
|
||||
|
||||
Player *plr = PlayerManager::getPlayer(sock);
|
||||
if (plr == nullptr)
|
||||
return;
|
||||
|
||||
char *tmp;
|
||||
int level = std::strtol(args[1].c_str(), &tmp, 10);
|
||||
@@ -210,7 +208,7 @@ void summonWCommand(std::string full, std::vector<std::string>& args, CNSocket*
|
||||
}
|
||||
|
||||
// permission & sanity check
|
||||
if (plr == nullptr || type >= 3314)
|
||||
if (type >= 3314)
|
||||
return;
|
||||
|
||||
int team = NPCManager::NPCData[type]["m_iTeam"];
|
||||
@@ -514,9 +512,6 @@ void eggCommand(std::string full, std::vector<std::string>& args, CNSocket* sock
|
||||
|
||||
Player* plr = PlayerManager::getPlayer(sock);
|
||||
|
||||
if (plr == nullptr)
|
||||
return;
|
||||
|
||||
// some math to place egg nicely in front of the player
|
||||
// temporarly disabled for sake of gruntwork
|
||||
int addX = 0; //-500.0f * sin(plr->angle / 180.0f * M_PI);
|
||||
|
||||
Reference in New Issue
Block a user