mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Show join message after selecting a character
This commit is contained in:
parent
ab2c2dd940
commit
0236e2e8f2
@ -431,12 +431,6 @@ impl Server {
|
||||
match client.client_state {
|
||||
ClientState::Connected => {
|
||||
Self::initialize_player(state, entity, client, player);
|
||||
if let Some(player) =
|
||||
state.ecs().read_storage::<comp::Player>().get(entity)
|
||||
{
|
||||
new_chat_msgs
|
||||
.push((None, format!("{} logged in", &player.alias)));
|
||||
}
|
||||
}
|
||||
// Use RequestState instead (No need to send `player` again).
|
||||
_ => client.error_state(RequestStateError::Impossible),
|
||||
@ -464,7 +458,12 @@ impl Server {
|
||||
ClientState::Registered
|
||||
| ClientState::Spectator
|
||||
| ClientState::Dead => {
|
||||
Self::create_player_character(state, entity, client, name, body)
|
||||
Self::create_player_character(state, entity, client, name, body);
|
||||
if let Some(player) =
|
||||
state.ecs().read_storage::<comp::Player>().get(entity)
|
||||
{
|
||||
new_chat_msgs.push((None, format!("{} joined", &player.alias)));
|
||||
}
|
||||
}
|
||||
ClientState::Character => {
|
||||
client.error_state(RequestStateError::Already)
|
||||
|
Loading…
Reference in New Issue
Block a user