Send the flag from the server

This commit is contained in:
Learath 2019-07-19 11:21:32 +03:00
parent 25ec19b70b
commit 78ac5ce030
4 changed files with 10 additions and 4 deletions

View file

@ -51,7 +51,7 @@ enum
enum
{
GAMEINFO_CURVERSION=2,
GAMEINFO_CURVERSION=3,
};
'''

View file

@ -1006,7 +1006,6 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
CGameInfo Info;
Info.m_FlagStartsRace = FastCap;
Info.m_TimeScore = Race;
Info.m_Race = Race || DDRace;
Info.m_UnlimitedAmmo = Race;
Info.m_DDRaceRecordMessage = DDRace;
Info.m_RaceRecordMessage = Race && !DDRace;
@ -1026,6 +1025,7 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
Info.m_EntitiesRace = Race;
Info.m_EntitiesFNG = FNG;
Info.m_EntitiesVanilla = Vanilla;
Info.m_Race = Race || DDRace;
if(Version >= 0)
{
@ -1054,6 +1054,10 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
Info.m_EntitiesFNG = Flags&GAMEINFOFLAG_ENTITIES_FNG;
Info.m_EntitiesVanilla = Flags&GAMEINFOFLAG_ENTITIES_VANILLA;
}
if(Version >= 3)
{
Info.m_Race = Flags&GAMEINFOFLAG_RACE;
}
return Info;
}

View file

@ -64,7 +64,6 @@ class CGameInfo
public:
bool m_FlagStartsRace;
bool m_TimeScore;
bool m_Race;
bool m_UnlimitedAmmo;
bool m_DDRaceRecordMessage;
bool m_RaceRecordMessage;
@ -88,6 +87,8 @@ public:
bool m_EntitiesRace;
bool m_EntitiesFNG;
bool m_EntitiesVanilla;
bool m_Race;
};
class CGameClient : public IGameClient

View file

@ -555,7 +555,8 @@ void IGameController::Snap(int SnappingClient)
| GAMEINFOFLAG_PREDICT_DDRACE_TILES
| GAMEINFOFLAG_ENTITIES_DDNET
| GAMEINFOFLAG_ENTITIES_DDRACE
| GAMEINFOFLAG_ENTITIES_RACE;
| GAMEINFOFLAG_ENTITIES_RACE
| GAMEINFOFLAG_RACE;
pGameInfoEx->m_Version = GAMEINFO_CURVERSION;
}