mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #1842
1842: [WIP] Fix timer r=heinrich5991 a=Learath2 I'm really unsure about this one. DEPENDS on #1839 Co-authored-by: Learath <learath2@gmail.com>
This commit is contained in:
commit
cd8994147c
|
@ -17,7 +17,7 @@ GameInfoFlags = [
|
|||
"BUG_DDRACE_INPUT", "BUG_FNG_LASER_RANGE", "BUG_VANILLA_BOUNCE",
|
||||
"PREDICT_FNG", "PREDICT_DDRACE", "PREDICT_DDRACE_TILES", "PREDICT_VANILLA",
|
||||
"ENTITIES_DDNET", "ENTITIES_DDRACE", "ENTITIES_RACE", "ENTITIES_FNG",
|
||||
"ENTITIES_VANILLA",
|
||||
"ENTITIES_VANILLA", "RACE_SHOW_RECORD",
|
||||
]
|
||||
|
||||
Emoticons = ["OOP", "EXCLAMATION", "HEARTS", "DROP", "DOTDOT", "MUSIC", "SORRY", "GHOST", "SUSHI", "SPLATTEE", "DEVILTEE", "ZOMG", "ZZZ", "WTF", "EYES", "QUESTION"]
|
||||
|
|
|
@ -126,7 +126,7 @@ void CHud::RenderGameTimer()
|
|||
str_format(aBuf, sizeof(aBuf), "00:00.0");
|
||||
else if(Time <= 0)
|
||||
str_format(aBuf, sizeof(aBuf), "00:00");
|
||||
else if(GameClient()->m_GameInfo.m_RaceRecordMessage && m_ServerRecord >= 0)
|
||||
else if(GameClient()->m_GameInfo.m_RaceShowRecord && GameClient()->m_GameInfo.m_RaceRecordMessage && m_ServerRecord >= 0)
|
||||
str_format(aBuf, sizeof(aBuf), "%02d:%02d", (int)(m_ServerRecord*100)/60, ((int)(m_ServerRecord*100)%60));
|
||||
else if(g_Config.m_ClShowDecisecs)
|
||||
str_format(aBuf, sizeof(aBuf), "%02d:%02d.%d", Time/60, Time%60, m_DDRaceTick/10);
|
||||
|
|
|
@ -1007,8 +1007,8 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
|
|||
Info.m_FlagStartsRace = FastCap;
|
||||
Info.m_TimeScore = Race;
|
||||
Info.m_UnlimitedAmmo = Race;
|
||||
Info.m_DDRaceRecordMessage = DDRace;
|
||||
Info.m_RaceRecordMessage = Race && !DDRace;
|
||||
Info.m_DDRaceRecordMessage = DDRace && !DDNet;
|
||||
Info.m_RaceRecordMessage = DDNet || (Race && !DDRace);
|
||||
Info.m_AllowEyeWheel = DDRace || BlockWorlds || Plus;
|
||||
Info.m_AllowHookColl = DDRace;
|
||||
Info.m_AllowZoom = Race || BlockWorlds;
|
||||
|
@ -1025,7 +1025,8 @@ 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;
|
||||
Info.m_Race = Race;
|
||||
Info.m_RaceShowRecord = Race && !DDRace;
|
||||
|
||||
if(Version >= 0)
|
||||
{
|
||||
|
@ -1057,6 +1058,7 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
|
|||
if(Version >= 3)
|
||||
{
|
||||
Info.m_Race = Flags&GAMEINFOFLAG_RACE;
|
||||
Info.m_RaceShowRecord = Flags&GAMEINFOFLAG_RACE_SHOW_RECORD;
|
||||
}
|
||||
return Info;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ public:
|
|||
bool m_EntitiesVanilla;
|
||||
|
||||
bool m_Race;
|
||||
bool m_RaceShowRecord;
|
||||
};
|
||||
|
||||
class CGameClient : public IGameClient
|
||||
|
|
|
@ -545,7 +545,7 @@ void IGameController::Snap(int SnappingClient)
|
|||
| GAMEINFOFLAG_GAMETYPE_DDRACE
|
||||
| GAMEINFOFLAG_GAMETYPE_DDNET
|
||||
| GAMEINFOFLAG_UNLIMITED_AMMO
|
||||
| GAMEINFOFLAG_DDRACE_RECORD_MESSAGE
|
||||
| GAMEINFOFLAG_RACE_RECORD_MESSAGE
|
||||
| GAMEINFOFLAG_ALLOW_EYE_WHEEL
|
||||
| GAMEINFOFLAG_ALLOW_HOOK_COLL
|
||||
| GAMEINFOFLAG_ALLOW_ZOOM
|
||||
|
|
Loading…
Reference in a new issue