diff --git a/common/src/cmd.rs b/common/src/cmd.rs index adafa0a2ce..ddc319baf3 100644 --- a/common/src/cmd.rs +++ b/common/src/cmd.rs @@ -272,7 +272,6 @@ pub enum ServerChatCommand { GroupPromote, Health, Help, - Home, JoinFaction, Jump, Kick, @@ -294,6 +293,7 @@ pub enum ServerChatCommand { Region, ReloadChunks, RemoveLights, + Respawn, RevokeBuild, RevokeBuildAll, Safezone, @@ -487,7 +487,7 @@ impl ServerChatCommand { "Display information about commands", None, ), - ServerChatCommand::Home => cmd(vec![], "Return to the home town", Some(Moderator)), + ServerChatCommand::Respawn => cmd(vec![], "Teleport to your waypoint", Some(Moderator)), ServerChatCommand::JoinFaction => ChatCommandData::new( vec![Any("faction", Optional)], "Join/leave the specified faction", @@ -762,7 +762,7 @@ impl ServerChatCommand { ServerChatCommand::GroupLeave => "group_leave", ServerChatCommand::Health => "health", ServerChatCommand::Help => "help", - ServerChatCommand::Home => "home", + ServerChatCommand::Respawn => "respawn", ServerChatCommand::JoinFaction => "join_faction", ServerChatCommand::Jump => "jump", ServerChatCommand::Kick => "kick", diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 1cf15deb33..b5fc33e1d1 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -13,7 +13,7 @@ use crate::{ weather::WeatherSim, wiring, wiring::OutputFormula, - Server, Settings, SpawnPoint, StateExt, + Server, Settings, StateExt, }; use assets::AssetExt; use authc::Uuid; @@ -150,7 +150,7 @@ fn do_command( ServerChatCommand::GroupPromote => handle_group_promote, ServerChatCommand::Health => handle_health, ServerChatCommand::Help => handle_help, - ServerChatCommand::Home => handle_home, + ServerChatCommand::Respawn => handle_respawn, ServerChatCommand::JoinFaction => handle_join_faction, ServerChatCommand::Jump => handle_jump, ServerChatCommand::Kick => handle_kick, @@ -874,25 +874,23 @@ fn handle_site( Ok(()) } -fn handle_home( +fn handle_respawn( server: &mut Server, _client: EcsEntity, target: EcsEntity, _args: Vec, _action: &ServerChatCommand, ) -> CmdResult<()> { - let home_pos = server.state.mut_resource::().0; - let time = *server.state.mut_resource::