Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef SERVER_H
  8. #define SERVER_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. //-----------------------------------------------------------------------------
  13. // Purpose: Data describing a single server
  14. //-----------------------------------------------------------------------------
  15. struct serveritem_t
  16. {
  17. serveritem_t()
  18. {
  19. pings[0] = 0;
  20. pings[1] = 0;
  21. pings[2] = 0;
  22. }
  23. unsigned char ip[4];
  24. int port;
  25. int received;
  26. float time;
  27. int ping; // current ping time, derived from pings[]
  28. int pings[3]; // last 3 ping times
  29. bool hadSuccessfulResponse; // server has responded successfully in the past
  30. bool doNotRefresh; // server is marked as not responding and should no longer be refreshed
  31. char gameDir[32]; // current game directory
  32. char map[32]; // current map
  33. char gameDescription[64]; // game description
  34. char name[64]; // server name
  35. int players;
  36. int maxPlayers;
  37. int botPlayers;
  38. bool proxy;
  39. bool password;
  40. unsigned int serverID;
  41. int listEntryID;
  42. char rconPassword[64]; // the rcon password for this server
  43. bool loadedFromFile; // true if this entry was loaded from file rather than comming from the master
  44. };
  45. #endif // SERVER_H