Bump version for the new protocol to DDNet 15.4

This fixes interoperability with DDNet 15.3 which did in the end not
support the new messages.
This commit is contained in:
heinrich5991 2021-02-24 17:09:39 +01:00
parent 908646eea5
commit 794d768ccb
3 changed files with 4 additions and 4 deletions

View file

@ -114,7 +114,7 @@ enum
VERSION_DDNET_FIREDELAY_TUNE = 701,
VERSION_DDNET_UPDATER_FIXED = 707,
VERSION_DDNET_GAMETICK = 10042,
VERSION_DDNET_MSG_LEGACY = 15025,
VERSION_DDNET_MSG_LEGACY = 15040,
};
#endif

View file

@ -325,7 +325,7 @@ void CProjectile::Snap(int SnappingClient)
CNetObj_DDNetProjectile DDNetProjectile;
if(SnappingClientVersion >= VERSION_DDNET_ANTIPING_PROJECTILE && FillExtraInfo(&DDNetProjectile))
{
int Type = SnappingClientVersion <= VERSION_DDNET_MSG_LEGACY ? (int)NETOBJTYPE_PROJECTILE : NETOBJTYPE_DDNETPROJECTILE;
int Type = SnappingClientVersion < VERSION_DDNET_MSG_LEGACY ? (int)NETOBJTYPE_PROJECTILE : NETOBJTYPE_DDNETPROJECTILE;
void *pProj = Server()->SnapNewItem(Type, GetID(), sizeof(DDNetProjectile));
if(!pProj)
{

View file

@ -437,7 +437,7 @@ void CGameTeams::SendTeamsState(int ClientID)
Server()->SendMsg(&Msg, MSGFLAG_VITAL, ClientID);
int ClientVersion = m_pGameContext->m_apPlayers[ClientID]->GetClientVersion();
if(!Server()->IsSixup(ClientID) && VERSION_DDRACE < ClientVersion && ClientVersion <= VERSION_DDNET_MSG_LEGACY)
if(!Server()->IsSixup(ClientID) && VERSION_DDRACE < ClientVersion && ClientVersion < VERSION_DDNET_MSG_LEGACY)
{
Server()->SendMsg(&MsgLegacy, MSGFLAG_VITAL, ClientID);
}
@ -651,7 +651,7 @@ void CGameTeams::OnFinish(CPlayer *Player, float Time, const char *pTimestamp)
}
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, ClientID);
if(!Server()->IsSixup(ClientID) && VERSION_DDRACE <= Player->GetClientVersion() && Player->GetClientVersion() <= VERSION_DDNET_MSG_LEGACY)
if(!Server()->IsSixup(ClientID) && VERSION_DDRACE <= Player->GetClientVersion() && Player->GetClientVersion() < VERSION_DDNET_MSG_LEGACY)
{
Server()->SendPackMsg(&MsgLegacy, MSGFLAG_VITAL, ClientID);
}