mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Always send all tunings
It doesn't hurt since tunings after the last one are simply ignored. This also stops future coders from introducing more and more cases in this `if` chain.
This commit is contained in:
parent
cedb3a90f9
commit
bc1d293e30
|
@ -108,13 +108,11 @@ enum
|
||||||
VERSION_DDNET_OLD = 2,
|
VERSION_DDNET_OLD = 2,
|
||||||
VERSION_DDNET_WHISPER = 217,
|
VERSION_DDNET_WHISPER = 217,
|
||||||
VERSION_DDNET_GOODHOOK = 221,
|
VERSION_DDNET_GOODHOOK = 221,
|
||||||
VERSION_DDNET_EXTRATUNES = 302,
|
|
||||||
VERSION_DDNET_RCONPROTECT = 408,
|
VERSION_DDNET_RCONPROTECT = 408,
|
||||||
VERSION_DDNET_ANTIPING_PROJECTILE = 604,
|
VERSION_DDNET_ANTIPING_PROJECTILE = 604,
|
||||||
VERSION_DDNET_HOOKDURATION_TUNE = 607,
|
|
||||||
VERSION_DDNET_FIREDELAY_TUNE = 701,
|
|
||||||
VERSION_DDNET_UPDATER_FIXED = 707,
|
VERSION_DDNET_UPDATER_FIXED = 707,
|
||||||
VERSION_DDNET_GAMETICK = 10042,
|
VERSION_DDNET_GAMETICK = 10042,
|
||||||
|
VERSION_DDNET_EARLY_VERSION = 13020,
|
||||||
VERSION_DDNET_MSG_LEGACY = 15040,
|
VERSION_DDNET_MSG_LEGACY = 15040,
|
||||||
VERSION_DDNET_SWITCH = 15060,
|
VERSION_DDNET_SWITCH = 15060,
|
||||||
VERSION_DDNET_INDEPENDENT_SPECTATORS_TEAM = 16000,
|
VERSION_DDNET_INDEPENDENT_SPECTATORS_TEAM = 16000,
|
||||||
|
|
|
@ -758,19 +758,7 @@ void CGameContext::SendTuningParams(int ClientID, int Zone)
|
||||||
else
|
else
|
||||||
pParams = (int *)&(m_aTuningList[Zone]);
|
pParams = (int *)&(m_aTuningList[Zone]);
|
||||||
|
|
||||||
unsigned int Last = sizeof(m_Tuning) / sizeof(int);
|
for(unsigned i = 0; i < sizeof(m_Tuning) / sizeof(int); i++)
|
||||||
if(m_apPlayers[ClientID])
|
|
||||||
{
|
|
||||||
int ClientVersion = m_apPlayers[ClientID]->GetClientVersion();
|
|
||||||
if(ClientVersion < VERSION_DDNET_EXTRATUNES)
|
|
||||||
Last = 33;
|
|
||||||
else if(ClientVersion < VERSION_DDNET_HOOKDURATION_TUNE)
|
|
||||||
Last = 37;
|
|
||||||
else if(ClientVersion < VERSION_DDNET_FIREDELAY_TUNE)
|
|
||||||
Last = 38;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(unsigned i = 0; i < Last; i++)
|
|
||||||
{
|
{
|
||||||
if(m_apPlayers[ClientID] && m_apPlayers[ClientID]->GetCharacter())
|
if(m_apPlayers[ClientID] && m_apPlayers[ClientID]->GetCharacter())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue