mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Merge #3434
3434: Add F-DDrace entities r=heinrich5991 a=fokkonaut ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
This commit is contained in:
commit
0b2eda2bd9
|
@ -1025,6 +1025,7 @@ set(EXPECTED_DATA
|
|||
editor/entities_clear/blockworlds.png
|
||||
editor/entities_clear/ddnet.png
|
||||
editor/entities_clear/ddrace.png
|
||||
editor/entities_clear/f-ddrace.png
|
||||
editor/entities_clear/fng.png
|
||||
editor/entities_clear/race.png
|
||||
editor/entities_clear/vanilla.png
|
||||
|
|
BIN
data/editor/entities_clear/f-ddrace.png
Normal file
BIN
data/editor/entities_clear/f-ddrace.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 415 KiB |
|
@ -21,7 +21,7 @@ GameInfoFlags = [
|
|||
# Full, use GameInfoFlags2 for more flags
|
||||
]
|
||||
GameInfoFlags2 = [
|
||||
"ALLOW_X_SKINS", "GAMETYPE_CITY",
|
||||
"ALLOW_X_SKINS", "GAMETYPE_CITY", "GAMETYPE_FDDRACE", "ENTITIES_FDDRACE",
|
||||
]
|
||||
ExPlayerFlags = ["AFK", "PAUSED", "SPEC"]
|
||||
|
||||
|
@ -56,7 +56,7 @@ enum
|
|||
|
||||
enum
|
||||
{
|
||||
GAMEINFO_CURVERSION=5,
|
||||
GAMEINFO_CURVERSION=6,
|
||||
};
|
||||
'''
|
||||
|
||||
|
|
|
@ -155,7 +155,9 @@ IGraphics::CTextureHandle CMapImages::GetEntities(EMapImageEntityLayerType Entit
|
|||
EMapImageModType EntitiesModType = MAP_IMAGE_MOD_TYPE_DDNET;
|
||||
bool EntitesAreMasked = !GameClient()->m_GameInfo.m_DontMaskEntities;
|
||||
|
||||
if(GameClient()->m_GameInfo.m_EntitiesDDNet)
|
||||
if(GameClient()->m_GameInfo.m_EntitiesFDDrace)
|
||||
EntitiesModType = MAP_IMAGE_MOD_TYPE_FDDRACE;
|
||||
else if(GameClient()->m_GameInfo.m_EntitiesDDNet)
|
||||
EntitiesModType = MAP_IMAGE_MOD_TYPE_DDNET;
|
||||
else if(GameClient()->m_GameInfo.m_EntitiesDDRace)
|
||||
EntitiesModType = MAP_IMAGE_MOD_TYPE_DDRACE;
|
||||
|
|
|
@ -24,6 +24,7 @@ enum EMapImageModType
|
|||
MAP_IMAGE_MOD_TYPE_BLOCKWORLDS,
|
||||
MAP_IMAGE_MOD_TYPE_FNG,
|
||||
MAP_IMAGE_MOD_TYPE_VANILLA,
|
||||
MAP_IMAGE_MOD_TYPE_FDDRACE,
|
||||
|
||||
MAP_IMAGE_MOD_TYPE_COUNT,
|
||||
};
|
||||
|
@ -34,7 +35,8 @@ static const char *const gs_aModEntitiesNames[] = {
|
|||
"race",
|
||||
"blockworlds",
|
||||
"fng",
|
||||
"vanilla"};
|
||||
"vanilla",
|
||||
"f-ddrace"};
|
||||
|
||||
class CMapImages : public CComponent
|
||||
{
|
||||
|
|
|
@ -1053,6 +1053,7 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
|
|||
bool City;
|
||||
bool Vanilla;
|
||||
bool Plus;
|
||||
bool FDDrace;
|
||||
if(Version < 1)
|
||||
{
|
||||
Race = IsRace(pFallbackServerInfo);
|
||||
|
@ -1064,6 +1065,7 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
|
|||
City = IsCity(pFallbackServerInfo);
|
||||
Vanilla = IsVanilla(pFallbackServerInfo);
|
||||
Plus = IsPlus(pFallbackServerInfo);
|
||||
FDDrace = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1076,9 +1078,10 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
|
|||
Vanilla = Flags & GAMEINFOFLAG_GAMETYPE_VANILLA;
|
||||
Plus = Flags & GAMEINFOFLAG_GAMETYPE_PLUS;
|
||||
City = Version >= 5 && Flags2 & GAMEINFOFLAG2_GAMETYPE_CITY;
|
||||
FDDrace = Version >= 6 && Flags2 & GAMEINFOFLAG2_GAMETYPE_FDDRACE;
|
||||
|
||||
// Ensure invariants upheld by the server info parsing business.
|
||||
DDRace = DDRace || DDNet;
|
||||
DDRace = DDRace || DDNet || FDDrace;
|
||||
Race = Race || FastCap || DDRace;
|
||||
}
|
||||
|
||||
|
@ -1108,6 +1111,7 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
|
|||
Info.m_Race = Race;
|
||||
Info.m_DontMaskEntities = !DDNet;
|
||||
Info.m_AllowXSkins = false;
|
||||
Info.m_EntitiesFDDrace = FDDrace;
|
||||
|
||||
if(Version >= 0)
|
||||
{
|
||||
|
@ -1149,6 +1153,10 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
|
|||
{
|
||||
Info.m_AllowXSkins = Flags2 & GAMEINFOFLAG2_ALLOW_X_SKINS;
|
||||
}
|
||||
if(Version >= 6)
|
||||
{
|
||||
Info.m_EntitiesFDDrace = Flags2 & GAMEINFOFLAG2_ENTITIES_FDDRACE;
|
||||
}
|
||||
return Info;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ public:
|
|||
bool m_EntitiesFNG;
|
||||
bool m_EntitiesVanilla;
|
||||
bool m_EntitiesBW;
|
||||
bool m_EntitiesFDDrace;
|
||||
|
||||
bool m_Race;
|
||||
|
||||
|
|
Loading…
Reference in a new issue