Skip to content

Commit

Permalink
the player should get the player list which in the same group
Browse files Browse the repository at this point in the history
  • Loading branch information
ketoo committed Apr 14, 2017
1 parent b8a27dc commit 6607ae6
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions NFComm/NFKernelPlugin/NFCKernelModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1057,21 +1057,25 @@ bool NFCKernelModule::GetGroupObjectList(const int nSceneID, const int nGroupID,
{
NFGUID ident = NFGUID();
NF_SHARE_PTR<int> pRet = pGroupInfo->mxPlayerList.First(ident);
while (!ident.IsNull() && noSelf != ident)
for (; pRet; pRet = pGroupInfo->mxPlayerList.Next(ident))
{
list.Add(ident);
if (!ident.IsNull() && ident != noSelf)
{
list.Add(ident);
}

ident = NFGUID();
pRet = pGroupInfo->mxPlayerList.Next(ident);
}

pRet = pGroupInfo->mxOtherList.First(ident);
while (!ident.IsNull() && noSelf != ident)
for (; pRet; pRet = pGroupInfo->mxOtherList.Next(ident))
{
list.Add(ident);
if (!ident.IsNull() && ident != noSelf)
{
list.Add(ident);
}

ident = NFGUID();
pRet = pGroupInfo->mxOtherList.Next(ident);
}

return true;
Expand Down Expand Up @@ -1169,24 +1173,28 @@ bool NFCKernelModule::GetGroupObjectList(const int nSceneID, const int nGroupID,
{
NFGUID ident = NFGUID();
NF_SHARE_PTR<int> pRet = pGroupInfo->mxPlayerList.First(ident);
while (!ident.IsNull() && ident != noSelf)
for (; pRet; pRet = pGroupInfo->mxPlayerList.Next(ident))
{
list.Add(ident);
if (!ident.IsNull() && ident != noSelf)
{
list.Add(ident);
}

ident = NFGUID();
pRet = pGroupInfo->mxPlayerList.Next(ident);
}
}
else
{
NFGUID ident = NFGUID();
NF_SHARE_PTR<int> pRet = pGroupInfo->mxOtherList.First(ident);
while (!ident.IsNull() && ident != noSelf)
for (; pRet; pRet = pGroupInfo->mxOtherList.Next(ident))
{
list.Add(ident);
if (!ident.IsNull() && ident != noSelf)
{
list.Add(ident);
}

ident = NFGUID();
pRet = pGroupInfo->mxOtherList.Next(ident);
}
}

Expand Down

0 comments on commit 6607ae6

Please sign in to comment.