mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-17 10:30:05 +00:00
Buddy code cleanup
- Get rid of buddyCnt, self-nullptr checks, and redundant playermap loops in chat handlers - Add helper function to find available buddy slot - Reorganize a bit
This commit is contained in:
@@ -293,9 +293,6 @@ void PlayerManager::enterPlayer(CNSocket* sock, CNPacketData* data) {
|
||||
// TODO: check if serialkey exists, if it doesn't send sP_FE2CL_REP_PC_ENTER_FAIL
|
||||
Player plr = CNSharedData::getPlayer(enter->iEnterSerialKey);
|
||||
|
||||
plr.buddyCnt = 0;
|
||||
std::cout << "Buddy Count: " << plr.buddyCnt << std::endl;
|
||||
|
||||
plr.groupCnt = 1;
|
||||
plr.iIDGroup = plr.groupIDs[0] = plr.iID;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user