get client language from login command instead of player data
This commit is contained in:
+1
-4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user