strcpy(teamscores_label(i), ReadString());
teamscores_flags(i) = ReadByte();
}
- net_handle_ServerWelcome();
+ bool welcome_msg_too = ReadByte();
+ if (welcome_msg_too)
+ net_handle_ServerWelcome();
return = true;
Scoreboard_InitScores();
Gamemode_Init();
}
}
+.bool welcome_msg_already_sent_on_connection;
bool ScoreInfo_SendEntity(entity this, entity to, int sf)
{
float i;
WriteString(MSG_ENTITY, teamscores_label(i));
WriteByte(MSG_ENTITY, teamscores_flags(i));
}
- // for some reason ScoreInfo_SendEntity is called twice on client connection
- // FIXME send the welcome message only once
+ bool welcome_msg_too = (!to.welcome_msg_already_sent_on_connection);
+ WriteByte(MSG_ENTITY, welcome_msg_too);
// welcome message is sent here because it needs to know the gametype
- SendWelcomemessage_msg_type(this, false, MSG_ENTITY);
+ if (welcome_msg_too)
+ {
+ SendWelcomemessage_msg_type(this, false, MSG_ENTITY);
+ to.welcome_msg_already_sent_on_connection = true;
+ }
return true;
}