mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-18 18:50:58 +00:00
Buddy rework, adjustments, and fixes
I cleaned up the code a bit (I'll clean it up more as I make more progress) and fixed a bug with buddy slots. Now buddies aren't overwritten! A few reworks and adjustments I reworked the buddyIDs array to store only player UIDs instead of IDs. I also reworked buddy deleting so that it deletes buddies from the array. Code cleanup Cleaned up some of the code. I mainly just removed useless helper methods.
This commit is contained in:
@@ -293,6 +293,9 @@ 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