OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4PlayerList Class Reference

#include <C4PlayerList.h>

Collaboration diagram for C4PlayerList:
[legend]

Public Member Functions

 C4PlayerList ()
 
 ~C4PlayerList ()
 
void Default ()
 
void Clear ()
 
void Execute ()
 
void DenumeratePointers ()
 
void ClearPointers (C4Object *pObj)
 
int GetCount () const
 
int GetCount (C4PlayerType eType) const
 
int GetIndex (C4Player *pPlr) const
 
int GetCountNotEliminated () const
 
int AverageScoreGain () const
 
C4PlayerGet (int iPlayer) const
 
C4PlayerGetByIndex (int iIndex) const
 
C4PlayerGetByIndex (int iIndex, C4PlayerType eType) const
 
C4PlayerGetByName (const char *szName, int iExcluding=NO_OWNER) const
 
C4PlayerGetLocalByIndex (int iIndex) const
 
C4PlayerGetAtClient (int iClient, int iIndex=0) const
 
C4PlayerGetAtClient (const char *szName, int iIndex=0) const
 
C4PlayerGetAtRemoteClient (int iIndex=0) const
 
C4PlayerGetByInfoID (int iInfoID) const
 
C4PlayerJoin (const char *szFilename, bool fScenarioInit, int iAtClient, const char *szAtClientName, class C4PlayerInfo *pInfo, C4ValueNumbers *)
 
void JoinNew (const char *szFilename)
 
bool CtrlJoin (const class C4Network2ResCore &ResCore, int iClientID, int idPlayerInfo)
 
bool FileInUse (const char *szFilename) const
 
bool Retire (C4Player *pPlr)
 
bool Evaluate ()
 
bool Save (bool fSaveLocalOnly)
 
bool Save (C4Group &hGroup, bool fStoreTiny, const C4PlayerInfoList &rStoreList)
 
bool Remove (int iPlayer, bool fDisonnected, bool fNoCalls)
 
bool RemoveUnjoined (int32_t iPlayer)
 
bool Remove (C4Player *pPlr, bool fDisonnected, bool fNoCalls)
 
bool RemoveAtRemoteClient (bool fDisonnected, bool fNoCalls)
 
bool RemoveLocal (bool fDisonnected, bool fNoCalls)
 
bool MouseControlTaken () const
 
bool RemoveAtClient (int iClient, bool fDisconnect)
 
bool RemoveAtClient (const char *szName, bool fDisconnect)
 
bool CtrlRemove (int iPlayer, bool fDisonnected)
 
bool CtrlRemoveAtClient (int iClient, bool fDisonnected)
 
bool CtrlRemoveAtClient (const char *szName, bool fDisonnected)
 
bool Valid (int iPlayer) const
 
bool Hostile (int iPlayer1, int iPlayer2) const
 
bool HostilityDeclared (int iPlayer1, int iPlayer2) const
 
bool PositionTaken (int iPosition) const
 
int CheckColorDw (DWORD dwColor, C4Player *pExclude)
 
bool SynchronizeLocalFiles ()
 
bool HasPlayerInTeamSelection ()
 

Public Attributes

C4PlayerFirst
 

Protected Member Functions

int GetFreeNumber () const
 
void RecheckPlayerSort (C4Player *pForPlayer)
 

Friends

class C4Player
 

Detailed Description

Definition at line 25 of file C4PlayerList.h.

Constructor & Destructor Documentation

C4PlayerList::C4PlayerList ( )

Definition at line 37 of file C4PlayerList.cpp.

References Default().

38 {
39  Default();
40 }

Here is the call graph for this function:

C4PlayerList::~C4PlayerList ( )

Definition at line 42 of file C4PlayerList.cpp.

References Clear().

43 {
44  Clear();
45 }

Here is the call graph for this function:

Member Function Documentation

int C4PlayerList::AverageScoreGain ( ) const

Definition at line 410 of file C4PlayerList.cpp.

References First, GetCount(), iResult, and C4Player::Next.

Referenced by C4Player::Evaluate().

411 {
412  int iResult=0;
413  if (First)
414  {
415  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
416  iResult+=std::max<int32_t>(pPlr->CurrentScore-pPlr->InitialScore,0);
417  iResult/=GetCount();
418  }
419  return iResult;
420 }
C4Player * First
Definition: C4PlayerList.h:31
int GetCount() const
int iResult
Definition: C4GroupMain.cpp:39
C4Player * Next
Definition: C4Player.h:144

Here is the call graph for this function:

Here is the caller graph for this function:

int C4PlayerList::CheckColorDw ( DWORD  dwColor,
C4Player pExclude 
)

Definition at line 118 of file C4PlayerList.cpp.

References Abs(), First, GetBlueValue, GetGreenValue, GetRedValue, and C4Player::Next.

119 {
120  // maximum difference
121  int iDiff=255+255+255;
122  // check all player's color difference
123  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next) if (pPlr != pExclude)
124  {
125  // get color
126  DWORD dwClr2=pPlr->ColorDw;
127  // assign difference, if less than smallest difference found
128  iDiff=std::min(iDiff,
129  Abs(GetBlueValue(dwColor) - GetBlueValue(dwClr2))
130  + Abs(GetGreenValue(dwColor) - GetGreenValue(dwClr2))
131  + Abs(GetRedValue(dwColor) - GetRedValue(dwClr2)));
132  }
133  // return the difference
134  return iDiff;
135 }
#define GetGreenValue(rgb)
Definition: StdColors.h:30
C4Player * First
Definition: C4PlayerList.h:31
#define GetRedValue(rgb)
Definition: StdColors.h:31
#define GetBlueValue(rgb)
Definition: StdColors.h:29
C4Player * Next
Definition: C4Player.h:144
T Abs(T val)
Definition: Standard.h:44
uint32_t DWORD

Here is the call graph for this function:

void C4PlayerList::Clear ( )

Definition at line 52 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Game::Clear(), and ~C4PlayerList().

53 {
54  C4Player *pPlr;
55  while ((pPlr = First))
56  { First = pPlr->Next; delete pPlr; }
57  First = nullptr;
58 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

void C4PlayerList::ClearPointers ( C4Object pObj)

Definition at line 72 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Game::ClearPointers(), and C4Object::GrabInfo().

73 {
74  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
75  pPlr->ClearPointers(pObj, false);
76 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

bool C4PlayerList::CtrlJoin ( const class C4Network2ResCore ResCore,
int  iClientID,
int  idPlayerInfo 
)
bool C4PlayerList::CtrlRemove ( int  iPlayer,
bool  fDisonnected 
)

Definition at line 492 of file C4PlayerList.cpp.

References C4Control::Add(), CID_RemovePlr, Game, and C4Game::Input.

Referenced by CtrlRemoveAtClient().

493 {
494  // Add packet to input
495  Game.Input.Add(CID_RemovePlr, new C4ControlRemovePlr(iPlayer, fDisconnect));
496  return true;
497 }
C4Game Game
Definition: C4Globals.cpp:52
void Add(C4PacketType eType, C4ControlPacket *pCtrl)
Definition: C4Control.h:82
C4Control & Input
Definition: C4Game.h:84

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::CtrlRemoveAtClient ( int  iClient,
bool  fDisonnected 
)

Definition at line 499 of file C4PlayerList.cpp.

References CtrlRemove(), First, and C4Player::Next.

500 {
501  // Get players
502  for (C4Player *pPlr = First; pPlr; pPlr = pPlr->Next)
503  if (pPlr->AtClient == iClient)
504  if (!CtrlRemove(pPlr->Number, fDisconnect))
505  return false;
506  return true;
507 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144
bool CtrlRemove(int iPlayer, bool fDisonnected)

Here is the call graph for this function:

bool C4PlayerList::CtrlRemoveAtClient ( const char *  szName,
bool  fDisonnected 
)

Definition at line 509 of file C4PlayerList.cpp.

References CtrlRemove(), First, C4Player::Next, and SEqual().

510 {
511  // Get players
512  for (C4Player *pPlr = First; pPlr; pPlr = pPlr->Next)
513  if (SEqual(pPlr->AtClientName, szName))
514  if (!CtrlRemove(pPlr->Number, fDisconnect))
515  return false;
516  return true;
517 }
C4Player * First
Definition: C4PlayerList.h:31
bool SEqual(const char *szStr1, const char *szStr2)
Definition: Standard.h:97
C4Player * Next
Definition: C4Player.h:144
bool CtrlRemove(int iPlayer, bool fDisonnected)

Here is the call graph for this function:

void C4PlayerList::Default ( )

Definition at line 47 of file C4PlayerList.cpp.

References First.

Referenced by C4PlayerList(), and C4Game::Default().

48 {
49  First=nullptr;
50 }
C4Player * First
Definition: C4PlayerList.h:31

Here is the caller graph for this function:

void C4PlayerList::DenumeratePointers ( )

Definition at line 588 of file C4PlayerList.cpp.

References First, and C4Player::Next.

589 {
590  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
591  pPlr->DenumeratePointers();
592 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144
bool C4PlayerList::Evaluate ( )

Definition at line 389 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Game::Evaluate().

390 {
391  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
392  pPlr->Evaluate();
393  return true;
394 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

void C4PlayerList::Execute ( )

Definition at line 60 of file C4PlayerList.cpp.

References C4Player::Eliminated, C4Player::Execute(), First, C4Player::Next, Retire(), and C4Player::RetireDelay.

Referenced by C4Game::Execute().

61 {
62  C4Player *pPlr;
63  // Execute
64  for (pPlr=First; pPlr; pPlr=pPlr->Next)
65  pPlr->Execute();
66  // Check retirement
67  for (pPlr=First; pPlr; pPlr=pPlr->Next)
68  if (pPlr->Eliminated && !pPlr->RetireDelay)
69  { Retire(pPlr); break; }
70 }
bool Retire(C4Player *pPlr)
C4Player * First
Definition: C4PlayerList.h:31
void Execute()
Definition: C4Player.cpp:164
int32_t Eliminated
Definition: C4Player.h:85
C4Player * Next
Definition: C4Player.h:144
int32_t RetireDelay
Definition: C4Player.h:97

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::FileInUse ( const char *  szFilename) const

Definition at line 431 of file C4PlayerList.cpp.

References _MAX_PATH, C4Game::Clients, C4Player::Filename, First, Game, GetFilename(), C4ClientList::getLocalName(), C4Network2::isEnabled(), ItemIdentical(), Network, C4Player::Next, SCopy(), SEqualNoCase(), and SetClientPrefix().

Referenced by C4MainMenu::ActivateNewPlayer(), and Join().

432 {
433  // Check original player files
434  C4Player *cPlr=First;
435  for (; cPlr; cPlr=cPlr->Next)
436  if (ItemIdentical(cPlr->Filename,szFilename))
437  return true;
438  // Compare to any network path player files with prefix (hack)
439  if (::Network.isEnabled())
440  {
441  char szWithPrefix[_MAX_PATH+1];
442  SCopy(GetFilename(szFilename),szWithPrefix);
443  SetClientPrefix(szWithPrefix, Game.Clients.getLocalName());
444  for (cPlr=First; cPlr; cPlr=cPlr->Next)
445  if (SEqualNoCase(GetFilename(cPlr->Filename),szWithPrefix))
446  return true;
447  }
448  // Not in use
449  return false;
450 }
char * GetFilename(char *szPath)
Definition: StdFile.cpp:55
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
Definition: Standard.cpp:122
bool ItemIdentical(const char *szFilename1, const char *szFilename2)
Definition: StdFile.cpp:865
C4Game Game
Definition: C4Globals.cpp:52
void SetClientPrefix(char *szFilename, const char *szClient)
char Filename[_MAX_PATH+1]
Definition: C4Player.h:82
bool SEqualNoCase(const char *szStr1, const char *szStr2, int iLen)
Definition: Standard.cpp:177
C4Player * First
Definition: C4PlayerList.h:31
#define _MAX_PATH
C4Network2 Network
Definition: C4Globals.cpp:53
const char * getLocalName() const
Definition: C4Client.h:170
bool isEnabled() const
Definition: C4Network2.h:203
C4Player * Next
Definition: C4Player.h:144
C4ClientList & Clients
Definition: C4Game.h:71

Here is the call graph for this function:

Here is the caller graph for this function:

C4Player * C4PlayerList::Get ( int  iPlayer) const

Definition at line 137 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4MainMenu::ActivateMain(), C4Viewport::AdjustPosition(), C4Object::AssignDeath(), C4Object::AssignInfo(), C4MouseControl::ButtonUpDragScript(), C4Viewport::CalculateZoom(), C4Object::ChangeDef(), ConsoleDlgProc(), C4ViewportList::CreateViewport(), C4MouseControl::DoMoveInput(), C4MainMenu::DoRefillInternal(), C4Viewport::Draw(), C4Viewport::DrawMenu(), C4Viewport::DrawPlayerStartup(), C4Viewport::EnableFoW(), C4Game::FindVisObject(), C4Object::GetDataString(), C4Object::GrabInfo(), C4Menu::HasMouse(), Hostile(), HostilityDeclared(), C4ViewportWindow::Init(), C4Object::Init(), C4Viewport::InitZoom(), C4Object::IsPlayerObject(), C4ObjectMenu::IsReadOnly(), C4Object::IsUserPlayerObject(), C4Viewport::IsViewportMenu(), C4MainMenu::MenuCommand(), C4MouseControl::Move(), C4Viewport::NextPlayer(), C4ChatInputDialog::OnChatCancel(), C4ChatInputDialog::OnChatInput(), Remove(), C4Player::SetHostility(), C4Viewport::SetOutputSize(), C4Object::SetOwner(), C4ViewportList::SortViewportsByPlayerControl(), C4MouseControl::UpdateCursorTarget(), C4Viewport::UpdateOutputSize(), and C4MouseControl::UpdateSingleSelection().

138 {
139  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
140  if (pPlr->Number==iNumber)
141  return pPlr;
142  return nullptr;
143 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

C4Player * C4PlayerList::GetAtClient ( int  iClient,
int  iIndex = 0 
) const

Definition at line 519 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Player::Eliminate(), C4MainMenu::MenuCommand(), C4MessageInput::ProcessCommand(), RemoveAtClient(), and C4Network2ClientList::UpdateClientActivity().

520 {
521  int cindex=0;
522  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
523  if (pPlr->AtClient == iClient)
524  {
525  if (cindex==iIndex) return pPlr;
526  cindex++;
527  }
528  return nullptr;
529 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

C4Player * C4PlayerList::GetAtClient ( const char *  szName,
int  iIndex = 0 
) const

Definition at line 531 of file C4PlayerList.cpp.

References First, C4Player::Next, and SEqualNoCase().

532 {
533  int cindex=0;
534  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
535  if (SEqualNoCase(pPlr->AtClientName,szName))
536  {
537  if (cindex==iIndex) return pPlr;
538  cindex++;
539  }
540  return nullptr;
541 }
bool SEqualNoCase(const char *szStr1, const char *szStr2, int iLen)
Definition: Standard.cpp:177
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the call graph for this function:

C4Player * C4PlayerList::GetAtRemoteClient ( int  iIndex = 0) const

Definition at line 557 of file C4PlayerList.cpp.

References C4GameControl::ClientID(), Control, First, and C4Player::Next.

Referenced by RemoveAtRemoteClient().

558 {
559  int cindex=0;
560  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
561  if (pPlr->AtClient != ::Control.ClientID())
562  {
563  if (cindex==iIndex) return pPlr;
564  cindex++;
565  }
566  return nullptr;
567 }
C4Player * First
Definition: C4PlayerList.h:31
C4GameControl Control
int32_t ClientID() const
C4Player * Next
Definition: C4Player.h:144

Here is the call graph for this function:

Here is the caller graph for this function:

C4Player * C4PlayerList::GetByIndex ( int  iIndex) const

Definition at line 154 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4MainMenu::DoRefillInternal(), C4Player::DrawHostility(), and C4Game::InitGameFinal().

155 {
156  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
157  if (!iIndex--)
158  return pPlr;
159  return nullptr;
160 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

C4Player * C4PlayerList::GetByIndex ( int  iIndex,
C4PlayerType  eType 
) const

Definition at line 162 of file C4PlayerList.cpp.

References First, and C4Player::Next.

163 {
164  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
165  if (pPlr->GetType() == eType)
166  if (!iIndex--)
167  return pPlr;
168  return nullptr;
169 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144
C4Player * C4PlayerList::GetByInfoID ( int  iInfoID) const

Definition at line 171 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Team::AddPlayer().

172 {
173  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
174  if (pPlr->ID == iInfoID) return pPlr;
175  return nullptr;
176 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

C4Player * C4PlayerList::GetByName ( const char *  szName,
int  iExcluding = NO_OWNER 
) const

Definition at line 422 of file C4PlayerList.cpp.

References First, C4Player::Next, and SEqual().

Referenced by C4MessageBoard::GetMessagePlayer(), and C4MessageInput::ProcessInput().

423 {
424  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
425  if (SEqual(pPlr->GetName(),szName))
426  if (pPlr->Number!=iExcluding)
427  return pPlr;
428  return nullptr;
429 }
C4Player * First
Definition: C4PlayerList.h:31
bool SEqual(const char *szStr1, const char *szStr2)
Definition: Standard.h:97
C4Player * Next
Definition: C4Player.h:144

Here is the call graph for this function:

Here is the caller graph for this function:

int C4PlayerList::GetCount ( ) const

Definition at line 178 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4MainMenu::ActivateMain(), C4MainMenu::ActivateNewPlayer(), AverageScoreGain(), C4Game::InitGameFinal(), Join(), C4Game::LoadScenarioSection(), and C4Game::OnPlayerJoinFinished().

179 {
180  int iCount = 0;
181  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
182  iCount++;
183  return iCount;
184 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

int C4PlayerList::GetCount ( C4PlayerType  eType) const

Definition at line 186 of file C4PlayerList.cpp.

References First, and C4Player::Next.

187 {
188  int iCount = 0;
189  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
190  if (pPlr->GetType() == eType)
191  iCount++;
192  return iCount;
193 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144
int C4PlayerList::GetCountNotEliminated ( ) const

Definition at line 603 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Game::GameOverCheck().

604 {
605  int iCount = 0;
606  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
607  if (!pPlr->Eliminated)
608  iCount++;
609  return iCount;
610 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

int C4PlayerList::GetFreeNumber ( ) const
protected

Definition at line 195 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by Join().

196 {
197  int iNumber=-1;
198  bool fFree;
199  do
200  {
201  iNumber++; fFree=true;
202  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
203  if (pPlr->Number==iNumber)
204  fFree=false;
205  }
206  while (!fFree);
207  return iNumber;
208 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

int C4PlayerList::GetIndex ( C4Player pPlr) const

Definition at line 145 of file C4PlayerList.cpp.

References First, and C4Player::Next.

146 {
147  int cindex=0;
148  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next, cindex++)
149  if (pPlr==tPlr)
150  return cindex;
151  return -1;
152 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144
C4Player * C4PlayerList::GetLocalByIndex ( int  iIndex) const

Definition at line 452 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Game::Abort(), C4Game::ActivateMenu(), C4MainMenu::MenuCommand(), C4GameControl::PrepareInput(), C4MessageInput::ProcessCommand(), and C4MessageInput::ProcessInput().

453 {
454  int cindex=0;
455  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
456  if (pPlr->LocalControl)
457  {
458  if (cindex==iIndex) return pPlr;
459  cindex++;
460  }
461  return nullptr;
462 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

bool C4PlayerList::HasPlayerInTeamSelection ( )

Definition at line 626 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Game::OnPlayerJoinFinished().

627 {
628  for (C4Player *pPlr = First; pPlr; pPlr = pPlr->Next)
629  if (pPlr->IsChosingTeam())
630  return true;
631  return false;
632 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

bool C4PlayerList::Hostile ( int  iPlayer1,
int  iPlayer2 
) const

Definition at line 86 of file C4PlayerList.cpp.

References Get(), C4Player::IsHostileTowards(), and C4Player::Number.

Referenced by C4Player::FindNewOwner(), and Hostile().

87 {
88  C4Player *pPlr1=Get(iPlayer1);
89  C4Player *pPlr2=Get(iPlayer2);
90  if (!pPlr1 || !pPlr2) return false;
91  if (pPlr1->Number==pPlr2->Number) return false;
92  if ( pPlr1->IsHostileTowards(pPlr2)
93  || pPlr2->IsHostileTowards(pPlr1) )
94  return true;
95  return false;
96 }
bool IsHostileTowards(const C4Player *opponent) const
Definition: C4Player.cpp:864
int32_t Number
Definition: C4Player.h:88
C4Player * Get(int iPlayer) const

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::HostilityDeclared ( int  iPlayer1,
int  iPlayer2 
) const

Definition at line 98 of file C4PlayerList.cpp.

References Get(), C4Player::IsHostileTowards(), and C4Player::Number.

Referenced by C4MainMenu::MenuCommand().

99 {
100  // check one-way-hostility
101  C4Player *pPlr1=Get(iPlayer1);
102  C4Player *pPlr2=Get(iPlayer2);
103  if (!pPlr1 || !pPlr2) return false;
104  if (pPlr1->Number==pPlr2->Number) return false;
105  if ( pPlr1->IsHostileTowards(pPlr2))
106  return true;
107  return false;
108 }
bool IsHostileTowards(const C4Player *opponent) const
Definition: C4Player.cpp:864
int32_t Number
Definition: C4Player.h:88
C4Player * Get(int iPlayer) const

Here is the call graph for this function:

Here is the caller graph for this function:

C4Player * C4PlayerList::Join ( const char *  szFilename,
bool  fScenarioInit,
int  iAtClient,
const char *  szAtClientName,
class C4PlayerInfo pInfo,
C4ValueNumbers numbers 
)

Definition at line 277 of file C4PlayerList.cpp.

References C4Player, FileInUse(), First, Game, GetCount(), GetFreeNumber(), C4PlayerInfo::GetName(), C4Player::Init(), LoadResStr(), Log(), LogF(), C4GameParameters::MaxPlayers, C4Player::Next, C4Game::Parameters, and Remove().

Referenced by C4Game::JoinPlayer(), and C4PlayerInfoList::RecreatePlayers().

278 {
279  assert(pInfo);
280  assert(fScenarioInit || numbers);
281 
282  // safeties
283  if (szFilename && !*szFilename) szFilename = nullptr;
284 
285  // Log
286  LogF(LoadResStr(fScenarioInit ? "IDS_PRC_JOINPLR" : "IDS_PRC_RECREATE"),pInfo->GetName());
287 
288  // Too many players
289  if (1) // replay needs to check, too!
291  {
292  LogF(LoadResStr("IDS_PRC_TOOMANYPLRS"),Game.Parameters.MaxPlayers);
293  return nullptr;
294  }
295 
296  // Check duplicate file usage
297  if (szFilename) if (FileInUse(szFilename))
298  { Log(LoadResStr("IDS_PRC_PLRFILEINUSE")); return nullptr; }
299 
300  // Create
301  C4Player *pPlr = new C4Player;
302 
303  // Append to player list
304  C4Player *pLast=First;
305  while (pLast && pLast->Next) pLast=pLast->Next;
306  if (pLast) pLast->Next=pPlr; else First = pPlr;
307 
308  // Init
309  if (!pPlr->Init(GetFreeNumber(),iAtClient,szAtClientName,szFilename,fScenarioInit,pInfo, numbers))
310  { Remove(pPlr, false, false); Log(LoadResStr("IDS_PRC_JOINFAIL")); return nullptr; }
311 
312  // Done
313  return pPlr;
314 }
bool FileInUse(const char *szFilename) const
C4Game Game
Definition: C4Globals.cpp:52
C4Player * First
Definition: C4PlayerList.h:31
int GetCount() const
C4GameParameters & Parameters
Definition: C4Game.h:69
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
int GetFreeNumber() const
friend class C4Player
Definition: C4PlayerList.h:82
bool Log(const char *szMessage)
Definition: C4Log.cpp:195
C4Player * Next
Definition: C4Player.h:144
bool LogF(const char *strMessage,...)
Definition: C4Log.cpp:253
bool Remove(int iPlayer, bool fDisonnected, bool fNoCalls)
bool Init(int32_t iNumber, int32_t iAtClient, const char *szAtClientName, const char *szFilename, bool fScenarioInit, class C4PlayerInfo *pInfo, C4ValueNumbers *)
Definition: C4Player.cpp:259

Here is the call graph for this function:

Here is the caller graph for this function:

void C4PlayerList::JoinNew ( const char *  szFilename)

Definition at line 317 of file C4PlayerList.cpp.

References C4PlayerInfoList::DoLocalNonNetworkPlayerJoin(), Game, C4Network2::isEnabled(), ItemExists(), C4Network2Players::JoinLocalPlayer(), Network, C4Game::PlayerInfos, and C4Network2::Players.

Referenced by C4MainMenu::MenuCommand(), and C4Console::PlayerJoin().

318 {
319  if (::Network.isEnabled())
320  {
321  ::Network.Players.JoinLocalPlayer(szFilename);
322  return;
323  }
324  // security
325  if (!ItemExists(szFilename)) return;
326  // join via player info
328 }
C4Game Game
Definition: C4Globals.cpp:52
C4Network2 Network
Definition: C4Globals.cpp:53
bool DoLocalNonNetworkPlayerJoin(const char *szPlayerFile)
bool isEnabled() const
Definition: C4Network2.h:203
C4PlayerInfoList & PlayerInfos
Definition: C4Game.h:73
C4Network2Players Players
Definition: C4Network2.h:119
bool JoinLocalPlayer(const char *szLocalPlayerFilename, bool initial=false)
bool ItemExists(const char *szItemName)
Definition: StdFile.h:75

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::MouseControlTaken ( ) const

Definition at line 594 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Player::InitControl(), and C4Player::ToggleMouseControl().

595 {
596  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
597  if (pPlr->MouseControl)
598  if (pPlr->LocalControl)
599  return true;
600  return false;
601 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

bool C4PlayerList::PositionTaken ( int  iPosition) const

Definition at line 110 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by C4Player::ScenarioInit().

111 {
112  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
113  if (pPlr->Position==iPosition)
114  return true;
115  return false;
116 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

void C4PlayerList::RecheckPlayerSort ( C4Player pForPlayer)
protected

Definition at line 634 of file C4PlayerList.cpp.

References First, C4Player::Next, and C4Player::Number.

Referenced by C4Player::Init().

635 {
636  if (!pForPlayer || !First) return;
637  int iNumber = pForPlayer->Number;
638  // get entry that should be the previous
639  // (use '<=' to run past pForPlayer itself)
640  C4Player *pPrev = First;
641  while (pPrev->Next && pPrev->Next->Number <= iNumber)
642  pPrev=pPrev->Next;
643  // if it's correctly sorted, pPrev should point to pForPlayer itself
644  if (pPrev == pForPlayer) return;
645  // otherwise, pPrev points to the entry that should be the new previous
646  // or to First if pForPlayer should be the head entry
647  // re-link it there
648  // first remove from old link pos
649  C4Player **pOldLink = &First;
650  while (*pOldLink && *pOldLink != pForPlayer) pOldLink = &((*pOldLink)->Next);
651  if (*pOldLink) *pOldLink = pForPlayer->Next;
652  // then link into new
653  if (pPrev == First && pPrev->Number > iNumber)
654  {
655  // at head
656  pForPlayer->Next = pPrev;
657  First = pForPlayer;
658  }
659  else
660  {
661  // after prev
662  pForPlayer->Next = pPrev->Next;
663  pPrev->Next = pForPlayer;
664  }
665 }
int32_t Number
Definition: C4Player.h:88
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

bool C4PlayerList::Remove ( int  iPlayer,
bool  fDisonnected,
bool  fNoCalls 
)

Definition at line 210 of file C4PlayerList.cpp.

References Get().

Referenced by C4Game::InitGameFinal(), Join(), RemoveAtClient(), RemoveAtRemoteClient(), RemoveLocal(), and Retire().

211 {
212  return Remove(Get(iPlayer), fDisconnect, fNoCalls);
213 }
C4Player * Get(int iPlayer) const
bool Remove(int iPlayer, bool fDisonnected, bool fNoCalls)

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::Remove ( C4Player pPlr,
bool  fDisonnected,
bool  fNoCalls 
)

Definition at line 225 of file C4PlayerList.cpp.

References C4ViewportList::CloseViewport(), Console, C4Player::CrewInfoList, C4ObjectInfoList::DetachFromObjects(), C4Player::Evaluated, C4RoundResults::EvaluatePlayer(), First, FullScreen, Game, C4PlayerInfoList::GetPlayerInfoByID(), C4Game::GRBroadcast(), C4Player::ID, C4Player::Next, C4Player::NotifyOwnedObjects(), C4Player::Number, Objects, C4Game::PlayerInfos, PSF_RemovePlayer, C4Player::RemoveCrewObjects(), C4Game::RoundResults, C4PlayerInfo::SetDisconnected(), C4PlayerInfo::SetRemoved(), C4Player::Team, C4Console::UpdateMenus(), C4GameObjects::ValidateOwners(), C4FullScreen::ViewportCheck(), and Viewports.

226 {
227  if (!pPlr) return false;
228 
229  // inform script
230  if (!fNoCalls)
232 
233  // Transfer ownership of other objects to team members
234  if (!fNoCalls) pPlr->NotifyOwnedObjects();
235 
236  // NET2: update player info list
237  if (pPlr->ID)
238  {
240  if (pInfo)
241  {
242  pInfo->SetRemoved();
243  if (fDisconnect)
244  pInfo->SetDisconnected();
245  }
246  // if player wasn't evaluated, store round results anyway
247  if (!pPlr->Evaluated) Game.RoundResults.EvaluatePlayer(pPlr);
248  }
249 
250  C4Player *pPrev=First;
251  while (pPrev && pPrev->Next!=pPlr) pPrev=pPrev->Next;
252  if (pPrev) pPrev->Next=pPlr->Next;
253  else First=pPlr->Next;
254 
255  // Remove eliminated crew
256  if (!fNoCalls) pPlr->RemoveCrewObjects();
257 
258  // Clear object info pointers
260 
261  // Clear viewports
262  ::Viewports.CloseViewport(pPlr->Number, fNoCalls);
263  // Check fullscreen viewports
265 
266  // Remove player
267  delete pPlr;
268 
269  // Validate object owners
271 
272  // Update console
274  return true;
275 }
void SetDisconnected()
Definition: C4PlayerInfo.h:203
int32_t Team
Definition: C4Player.h:90
C4Console Console
Definition: C4Globals.cpp:45
#define PSF_RemovePlayer
Definition: C4GameScript.h:46
C4Game Game
Definition: C4Globals.cpp:52
int32_t Number
Definition: C4Player.h:88
C4FullScreen FullScreen
Definition: C4Globals.cpp:46
C4Player * First
Definition: C4PlayerList.h:31
void UpdateMenus()
Definition: C4Console.cpp:509
C4PlayerInfo * GetPlayerInfoByID(int32_t id) const
void NotifyOwnedObjects()
Definition: C4Player.cpp:1315
C4Value GRBroadcast(const char *szFunction, C4AulParSet *pPars=0, bool fPassError=false, bool fRejectTest=false)
Definition: C4Game.cpp:3850
bool Evaluated
Definition: C4Player.h:87
C4RoundResults & RoundResults
Definition: C4Game.h:75
int32_t ID
Definition: C4Player.h:89
bool ViewportCheck()
C4PlayerInfoList & PlayerInfos
Definition: C4Game.h:73
C4ViewportList Viewports
Definition: C4Viewport.cpp:841
C4Player * Next
Definition: C4Player.h:144
void EvaluatePlayer(C4Player *pPlr)
bool CloseViewport(int32_t iPlayer, bool fSilent)
Definition: C4Viewport.cpp:964
C4ObjectInfoList CrewInfoList
Definition: C4Player.h:126
void RemoveCrewObjects()
Definition: C4Player.cpp:1275
C4GameObjects Objects
Definition: C4Globals.cpp:48

Here is the call graph for this function:

bool C4PlayerList::RemoveAtClient ( int  iClient,
bool  fDisconnect 
)

Definition at line 464 of file C4PlayerList.cpp.

References FormatString(), GetAtClient(), C4Player::GetName(), LoadResStr(), Log(), and Remove().

Referenced by C4Client::Remove().

465 {
466  C4Player *pPlr;
467  // Get players
468  while ((pPlr = GetAtClient(iClient)))
469  {
470  // Log
471  Log(FormatString(LoadResStr("IDS_PRC_REMOVEPLR"),pPlr->GetName()).getData());
472  // Remove
473  Remove(pPlr, fDisconnect, false);
474  }
475  return true;
476 }
C4Player * GetAtClient(int iClient, int iIndex=0) const
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
const char * GetName() const
Definition: C4Player.h:153
bool Log(const char *szMessage)
Definition: C4Log.cpp:195
bool Remove(int iPlayer, bool fDisonnected, bool fNoCalls)
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:277

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::RemoveAtClient ( const char *  szName,
bool  fDisconnect 
)

Definition at line 478 of file C4PlayerList.cpp.

References FormatString(), GetAtClient(), C4Player::GetName(), LoadResStr(), Log(), and Remove().

479 {
480  C4Player *pPlr;
481  // Get players
482  while ((pPlr = GetAtClient(szName)))
483  {
484  // Log
485  Log(FormatString(LoadResStr("IDS_PRC_REMOVEPLR"),pPlr->GetName()).getData());
486  // Remove
487  Remove(pPlr, fDisconnect, false);
488  }
489  return true;
490 }
C4Player * GetAtClient(int iClient, int iIndex=0) const
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
const char * GetName() const
Definition: C4Player.h:153
bool Log(const char *szMessage)
Definition: C4Log.cpp:195
bool Remove(int iPlayer, bool fDisonnected, bool fNoCalls)
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:277

Here is the call graph for this function:

bool C4PlayerList::RemoveAtRemoteClient ( bool  fDisonnected,
bool  fNoCalls 
)

Definition at line 543 of file C4PlayerList.cpp.

References FormatString(), GetAtRemoteClient(), C4Player::GetName(), LoadResStr(), Log(), and Remove().

Referenced by C4Game::Abort().

544 {
545  C4Player *pPlr;
546  // Get players
547  while ((pPlr = GetAtRemoteClient()))
548  {
549  // Log
550  Log(FormatString(LoadResStr("IDS_PRC_REMOVEPLR"),pPlr->GetName()).getData());
551  // Remove
552  Remove(pPlr, fDisconnect, fNoCalls);
553  }
554  return true;
555 }
C4Player * GetAtRemoteClient(int iIndex=0) const
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
const char * GetName() const
Definition: C4Player.h:153
bool Log(const char *szMessage)
Definition: C4Log.cpp:195
bool Remove(int iPlayer, bool fDisonnected, bool fNoCalls)
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:277

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::RemoveLocal ( bool  fDisonnected,
bool  fNoCalls 
)

Definition at line 569 of file C4PlayerList.cpp.

References First, FormatString(), C4Player::GetName(), LoadResStr(), C4Player::LocalControl, Log(), C4Player::Next, and Remove().

Referenced by C4Game::Abort().

570 {
571  // (used by league system the set local fate)
572  C4Player *pPlr;
573  do
574  for (pPlr = First; pPlr; pPlr = pPlr->Next)
575  if (pPlr->LocalControl)
576  {
577  // Log
578  Log(FormatString(LoadResStr("IDS_PRC_REMOVEPLR"),pPlr->GetName()).getData());
579  // Remove
580  Remove(pPlr, fDisconnect, fNoCalls);
581  break;
582  }
583  while (pPlr);
584 
585  return true;
586 }
C4Player * First
Definition: C4PlayerList.h:31
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
const char * GetName() const
Definition: C4Player.h:153
bool Log(const char *szMessage)
Definition: C4Log.cpp:195
C4Player * Next
Definition: C4Player.h:144
bool Remove(int iPlayer, bool fDisonnected, bool fNoCalls)
bool LocalControl
Definition: C4Player.h:101
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:277

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::RemoveUnjoined ( int32_t  iPlayer)

Definition at line 215 of file C4PlayerList.cpp.

References Objects.

Referenced by C4PlayerInfoList::RemoveUnassociatedPlayers().

216 {
217  // Savegame resume missing player: Remove player objects only
218  for (C4Object *pObj : Objects)
219  if (pObj->Status)
220  if (pObj->IsPlayerObject(iPlayer))
221  pObj->AssignRemoval(true);
222  return true;
223 }
C4GameObjects Objects
Definition: C4Globals.cpp:48

Here is the caller graph for this function:

bool C4PlayerList::Retire ( C4Player pPlr)

Definition at line 396 of file C4PlayerList.cpp.

References C4PT_Script, Control, C4Player::Evaluate(), C4Player::Evaluated, C4Player::GetType(), C4GameControl::isReplay(), Remove(), and C4Player::Save().

Referenced by Execute().

397 {
398  if (!pPlr) return false;
399 
400  if (!pPlr->Evaluated)
401  {
402  pPlr->Evaluate();
403  if (!::Control.isReplay() && pPlr->GetType() != C4PT_Script) pPlr->Save();
404  }
405  Remove(pPlr, false, false);
406 
407  return true;
408 }
C4GameControl Control
bool Evaluated
Definition: C4Player.h:87
void Evaluate()
Definition: C4Player.cpp:791
bool isReplay() const
Definition: C4GameControl.h:98
bool Save()
Definition: C4Player.cpp:417
bool Remove(int iPlayer, bool fDisonnected, bool fNoCalls)
C4PlayerType GetType() const
Definition: C4Player.cpp:1730

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::Save ( bool  fSaveLocalOnly)

Definition at line 376 of file C4PlayerList.cpp.

References C4PT_Script, C4Game::C4S, First, Game, C4Scenario::Head, C4Player::Next, and C4SHead::Replay.

Referenced by C4Game::Evaluate().

377 {
378  // do not save in replays
379  if (Game.C4S.Head.Replay) return true;
380  // Save to external player files
381  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
382  if (pPlr->GetType() != C4PT_Script)
383  if (!fSaveLocalOnly || pPlr->LocalControl)
384  if (!pPlr->Save())
385  return false;
386  return true;
387 }
C4Game Game
Definition: C4Globals.cpp:52
C4Scenario C4S
Definition: C4Game.h:76
bool Replay
Definition: C4Scenario.h:72
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144
C4SHead Head
Definition: C4Scenario.h:230

Here is the caller graph for this function:

bool C4PlayerList::Save ( C4Group hGroup,
bool  fStoreTiny,
const C4PlayerInfoList rStoreList 
)

Definition at line 345 of file C4PlayerList.cpp.

References C4Config::AtTempPath(), C4Group_CopyItem(), C4PT_User, C4Group::Close(), Config, StdStrBuf::Copy(), First, StdStrBuf::getData(), C4PlayerInfo::GetFilename(), C4PlayerInfoList::GetPlayerInfoByID(), C4PlayerInfo::GetType(), C4Group::Move(), C4Player::Next, and C4Group::Open().

346 {
347  StdStrBuf sTempFilename;
348  bool fSuccess = true;
349  // Save to external player files and add to group
350  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
351  {
352  // save only those in the list, and only those with a filename
353  C4PlayerInfo *pNfo = rStoreList.GetPlayerInfoByID(pPlr->ID);
354  if (!pNfo) continue;
355  if (!pNfo->GetFilename() || !*pNfo->GetFilename()) continue;;
356  // save over original file?
357  bool fStoreOnOriginal = (!fStoreTiny && pNfo->GetType() == C4PT_User);
358  // Create temporary file
359  sTempFilename.Copy(Config.AtTempPath(pNfo->GetFilename()));
360  if (fStoreOnOriginal)
361  if (!C4Group_CopyItem(pPlr->Filename, sTempFilename.getData()))
362  return false;
363  // Open group
364  C4Group PlrGroup;
365  if (!PlrGroup.Open(sTempFilename.getData(), !fStoreOnOriginal))
366  return false;
367  // Save player
368  if (!pPlr->Save(PlrGroup, true, fStoreOnOriginal)) return false;
369  PlrGroup.Close();
370  // Add temp file to group
371  if (!hGroup.Move(sTempFilename.getData(), pNfo->GetFilename())) return false;
372  }
373  return fSuccess;
374 }
const char * getData() const
Definition: StdBuf.h:450
C4Config Config
Definition: C4Config.cpp:837
C4Player * First
Definition: C4PlayerList.h:31
C4PlayerInfo * GetPlayerInfoByID(int32_t id) const
bool Move(const char *szFile, const char *szAddAs)
Definition: C4Group.cpp:1325
bool Open(const char *szGroupName, bool fCreate=false)
Definition: C4Group.cpp:514
bool C4Group_CopyItem(const char *szSource, const char *szTarget1, bool fNoSort, bool fResetAttributes)
Definition: C4Group.cpp:100
bool Close()
Definition: C4Group.cpp:755
const char * GetFilename() const
Definition: C4PlayerInfo.h:164
C4Player * Next
Definition: C4Player.h:144
C4PlayerType GetType() const
Definition: C4PlayerInfo.h:155
const char * AtTempPath(const char *szFilename)
Definition: C4Config.cpp:544
void Copy()
Definition: StdBuf.h:475

Here is the call graph for this function:

bool C4PlayerList::SynchronizeLocalFiles ( )

Definition at line 612 of file C4PlayerList.cpp.

References First, LoadResStr(), Log(), and C4Player::Next.

Referenced by C4GameSaveSavegame::OnSaving(), and C4Game::Synchronize().

613 {
614  // message
615  Log(LoadResStr("IDS_PRC_SYNCPLRS"));
616  bool fSuccess = true;
617  // check all players
618  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
619  // eliminated players will be saved soon, anyway
620  if (!pPlr->Eliminated)
621  if (!pPlr->LocalSync()) fSuccess = false;
622  // done
623  return fSuccess;
624 }
C4Player * First
Definition: C4PlayerList.h:31
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
bool Log(const char *szMessage)
Definition: C4Log.cpp:195
C4Player * Next
Definition: C4Player.h:144

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerList::Valid ( int  iPlayer) const

Definition at line 78 of file C4PlayerList.cpp.

References First, and C4Player::Next.

Referenced by ValidPlr().

79 {
80  for (C4Player *pPlr=First; pPlr; pPlr=pPlr->Next)
81  if (pPlr->Number==iPlayer)
82  return true;
83  return false;
84 }
C4Player * First
Definition: C4PlayerList.h:31
C4Player * Next
Definition: C4Player.h:144

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class C4Player
friend

Definition at line 82 of file C4PlayerList.h.

Referenced by Join().

Member Data Documentation


The documentation for this class was generated from the following files: