| 1 | #ifndef ENGINE_SHARED_TRANSLATION_CONTEXT_H |
| 2 | #define ENGINE_SHARED_TRANSLATION_CONTEXT_H |
| 3 | |
| 4 | #include <engine/client/enums.h> |
| 5 | #include <engine/shared/protocol.h> |
| 6 | |
| 7 | #include <generated/protocol7.h> |
| 8 | |
| 9 | class CTranslationContext |
| 10 | { |
| 11 | public: |
| 12 | CTranslationContext() |
| 13 | { |
| 14 | Reset(); |
| 15 | } |
| 16 | |
| 17 | void Reset(); |
| 18 | |
| 19 | // this class is not used |
| 20 | // it could be used in the in game menu |
| 21 | // to grey out buttons and similar |
| 22 | // |
| 23 | // but that can not be done without mixing it |
| 24 | // into the 0.6 code so it is out of scope for ddnet |
| 25 | class CServerSettings |
| 26 | { |
| 27 | public: |
| 28 | bool m_KickVote; |
| 29 | int m_KickMin; |
| 30 | bool m_SpecVote; |
| 31 | bool m_TeamLock; |
| 32 | bool m_TeamBalance; |
| 33 | int m_PlayerSlots; |
| 34 | |
| 35 | CServerSettings() |
| 36 | { |
| 37 | Reset(); |
| 38 | } |
| 39 | |
| 40 | void Reset() |
| 41 | { |
| 42 | m_KickVote = false; |
| 43 | m_KickMin = 0; |
| 44 | m_SpecVote = false; |
| 45 | m_TeamLock = false; |
| 46 | m_TeamBalance = false; |
| 47 | m_PlayerSlots = 0; |
| 48 | } |
| 49 | |
| 50 | } m_ServerSettings; |
| 51 | |
| 52 | class CClientData |
| 53 | { |
| 54 | public: |
| 55 | CClientData() |
| 56 | { |
| 57 | Reset(); |
| 58 | } |
| 59 | |
| 60 | void Reset() |
| 61 | { |
| 62 | m_Active = false; |
| 63 | |
| 64 | m_aName[0] = '\0'; |
| 65 | m_aClan[0] = '\0'; |
| 66 | m_Country = 0; |
| 67 | m_Team = 0; |
| 68 | m_PlayerFlags7 = 0; |
| 69 | } |
| 70 | |
| 71 | bool m_Active; |
| 72 | |
| 73 | char m_aName[MAX_NAME_LENGTH]; |
| 74 | char m_aClan[MAX_CLAN_LENGTH]; |
| 75 | int m_Country; |
| 76 | int m_Team; |
| 77 | int m_PlayerFlags7; |
| 78 | }; |
| 79 | |
| 80 | const protocol7::CNetObj_PlayerInfoRace *m_apPlayerInfosRace[MAX_CLIENTS]; |
| 81 | CClientData m_aClients[MAX_CLIENTS]; |
| 82 | int m_aDamageTaken[MAX_CLIENTS]; |
| 83 | float m_aDamageTakenTick[MAX_CLIENTS]; |
| 84 | |
| 85 | int m_aLocalClientId[NUM_DUMMIES]; |
| 86 | |
| 87 | bool m_ShouldSendGameInfo; |
| 88 | int m_GameStateFlags7; |
| 89 | // 0.7 game flags |
| 90 | // use in combination with protocol7::GAMEFLAG_* |
| 91 | // for example protocol7::GAMEFLAG_TEAMS |
| 92 | int m_GameFlags; |
| 93 | int m_ScoreLimit; |
| 94 | int m_TimeLimit; |
| 95 | int m_MatchNum; |
| 96 | int m_MatchCurrent; |
| 97 | |
| 98 | int m_MapdownloadTotalsize; |
| 99 | int m_MapDownloadChunkSize; |
| 100 | int m_MapDownloadChunksPerRequest; |
| 101 | |
| 102 | int m_FlagCarrierBlue; |
| 103 | int m_FlagCarrierRed; |
| 104 | int m_TeamscoreRed; |
| 105 | int m_TeamscoreBlue; |
| 106 | |
| 107 | int m_GameStartTick7; |
| 108 | int m_GameStateEndTick7; |
| 109 | }; |
| 110 | |
| 111 | #endif |
| 112 | |