GameSpyPlayer.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /****************************************************************************
  2. ;
  3. ; MODULE: GAMESPYPLAYER (.H)
  4. ;
  5. ; PURPOSE: Game Spy Player Encapsulation Class
  6. ;
  7. ; HISTORY: 08/01/00 [blg] This file was created
  8. ;
  9. ; COMMENT: Copyright (c) 2000, LithTech, Inc.
  10. ;
  11. ****************************************************************************/
  12. #pragma once
  13. // Includes...
  14. #ifdef GSCM_LOCAL_BUILD
  15. #include "..\cengine\goaceng.h"
  16. #else
  17. #include "..\gamespy\cengine\goaceng.h"
  18. #endif
  19. // Classes...
  20. class CGameSpyPlayer
  21. {
  22. // Member functions...
  23. public:
  24. CGameSpyPlayer() { Clear(); }
  25. ~CGameSpyPlayer() { Term(); }
  26. BOOL Init(GServer pGServer, int nIndex);
  27. void Term();
  28. BOOL IsInitialized() { return(m_bInit); }
  29. char* GetName();
  30. int GetPing();
  31. int GetFrags();
  32. void* GetHandle() { return((void*)m_nIndex); }
  33. char* GetStringValue(char* sKey, char* sDefault = "");
  34. int GetIntValue(char* sKey, int nDefault = 0);
  35. float GetFloatValue(char* sKey, float fDefault = 0);
  36. protected:
  37. void Clear();
  38. // Member variables...
  39. private:
  40. GServer m_pGServer;
  41. int m_nIndex;
  42. BOOL m_bInit;
  43. };