mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'sharp/fix-redundant-code' into 'master'
Removed redundant code missed in auth merge. See merge request veloren/veloren!1404
This commit is contained in:
commit
98c8240879
@ -1,6 +1,5 @@
|
||||
use crate::{
|
||||
client::Client, persistence::PersistedComponents, settings::ServerSettings,
|
||||
sys::sentinel::DeletedEntities, SpawnPoint,
|
||||
client::Client, persistence::PersistedComponents, sys::sentinel::DeletedEntities, SpawnPoint,
|
||||
};
|
||||
use common::{
|
||||
character::CharacterId,
|
||||
@ -192,18 +191,6 @@ impl StateExt for State {
|
||||
player.character_id = Some(character_id);
|
||||
});
|
||||
|
||||
// Give the Admin component to the player if their name exists in admin list
|
||||
if self.ecs().fetch::<ServerSettings>().admins.contains(
|
||||
&self
|
||||
.ecs()
|
||||
.read_storage::<comp::Player>()
|
||||
.get(entity)
|
||||
.expect("Failed to fetch entity.")
|
||||
.alias,
|
||||
) {
|
||||
self.write_component(entity, comp::Admin);
|
||||
}
|
||||
|
||||
// Tell the client its request was successful.
|
||||
if let Some(client) = self.ecs().write_storage::<Client>().get_mut(entity) {
|
||||
client.allow_state(ClientState::Character);
|
||||
|
Loading…
Reference in New Issue
Block a user