mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'treeco/home-removes-waypoint' into 'master'
Made home command reset waypoint to world spawn See merge request veloren/veloren!1520
This commit is contained in:
commit
d72c981808
@ -374,7 +374,12 @@ fn handle_home(
|
|||||||
.is_some()
|
.is_some()
|
||||||
{
|
{
|
||||||
let home_pos = server.state.ecs().read_resource::<SpawnPoint>().0;
|
let home_pos = server.state.ecs().read_resource::<SpawnPoint>().0;
|
||||||
|
let time = *server.state.ecs().read_resource::<common::state::Time>();
|
||||||
|
|
||||||
server.state.write_component(target, comp::Pos(home_pos));
|
server.state.write_component(target, comp::Pos(home_pos));
|
||||||
|
server
|
||||||
|
.state
|
||||||
|
.write_component(target, comp::Waypoint::new(home_pos, time));
|
||||||
server.state.write_component(target, comp::ForceUpdate);
|
server.state.write_component(target, comp::ForceUpdate);
|
||||||
} else {
|
} else {
|
||||||
server.notify_client(
|
server.notify_client(
|
||||||
|
Loading…
Reference in New Issue
Block a user