/
dieoska
/
ddnet
Обзор
Документация
Войти
/
dieoska
/
ddnet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/engine/shared/translation_context.h
111 строк
2 KB
Robert Müller
Fix client assertion crash on 0.7 servers with high ping
07 окт 2025, 23:43
07 окт 2025, 23:43
febd5e2
Код
Авторство
О чём код?
#ifndef ENGINE_SHARED_TRANSLATION_CONTEXT_H #define ENGINE_SHARED_TRANSLATION_CONTEXT_H #include <engine/client/enums.h> #include <engine/shared/protocol.h> #include <generated/protocol7.h> class CTranslationContext { public: CTranslationContext() { Reset(); } void Reset(); // this class is not used // it could be used in the in game menu // to grey out buttons and similar // // but that can not be done without mixing it // into the 0.6 code so it is out of scope for ddnet class CServerSettings { public: bool m_KickVote; int m_KickMin; bool m_SpecVote; bool m_TeamLock; bool m_TeamBalance; int m_PlayerSlots; CServerSettings() { Reset(); } void Reset() { m_KickVote = false; m_KickMin = 0; m_SpecVote = false; m_TeamLock = false; m_TeamBalance = false; m_PlayerSlots = 0; } } m_ServerSettings; class CClientData { public: CClientData() { Reset(); } void Reset() { m_Active = false; m_aName[0] = '\0'; m_aClan[0] = '\0'; m_Country = 0; m_Team = 0; m_PlayerFlags7 = 0; } bool m_Active; char m_aName[MAX_NAME_LENGTH]; char m_aClan[MAX_CLAN_LENGTH]; int m_Country; int m_Team; int m_PlayerFlags7; }; const protocol7::CNetObj_PlayerInfoRace *m_apPlayerInfosRace[MAX_CLIENTS]; CClientData m_aClients[MAX_CLIENTS]; int m_aDamageTaken[MAX_CLIENTS]; float m_aDamageTakenTick[MAX_CLIENTS]; int m_aLocalClientId[NUM_DUMMIES]; bool m_ShouldSendGameInfo; int m_GameStateFlags7; // 0.7 game flags // use in combination with protocol7::GAMEFLAG_* // for example protocol7::GAMEFLAG_TEAMS int m_GameFlags; int m_ScoreLimit; int m_TimeLimit; int m_MatchNum; int m_MatchCurrent; int m_MapdownloadTotalsize; int m_MapDownloadChunkSize; int m_MapDownloadChunksPerRequest; int m_FlagCarrierBlue; int m_FlagCarrierRed; int m_TeamscoreRed; int m_TeamscoreBlue; int m_GameStartTick7; int m_GameStateEndTick7; }; #endif