get client language from login command instead of player data

This commit is contained in:
Martin Michelsen
2023-10-22 08:55:09 -07:00
parent ba7a3fc4c6
commit d2d96d9c0a
5 changed files with 29 additions and 25 deletions
+1 -4
View File
@@ -150,6 +150,7 @@ struct Client : public std::enable_shared_from_this<Client> {
// Lobby/positioning
ClientOptions options;
uint8_t language;
float x;
float z;
uint32_t area;
@@ -191,10 +192,6 @@ struct Client : public std::enable_shared_from_this<Client> {
void reschedule_ping_and_timeout_events();
inline uint8_t language() const {
auto p = this->game_data.player(true, false);
return p ? p->inventory.language : 1; // English by default
}
inline GameVersion version() const {
return this->channel.version;
}