mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix respawn position
Former-commit-id: c4dabc71a1c7af538e2c30acbf463340a4618cc9
This commit is contained in:
parent
1826a2b4f9
commit
1dbca8b994
@ -19,9 +19,8 @@ const STATS_SYS: &str = "stats_sys";
|
||||
pub fn add_local_systems(dispatch_builder: &mut DispatcherBuilder) {
|
||||
dispatch_builder.add(agent::Sys, AGENT_SYS, &[]);
|
||||
dispatch_builder.add(phys::Sys, PHYS_SYS, &[]);
|
||||
dispatch_builder.add(action::Sys, ACTION_SYS, &[]);
|
||||
dispatch_builder.add(inputs::Sys, INPUTS_SYS, &[]);
|
||||
dispatch_builder.add(actions::Sys, ACTIONS_SYS, &[]);
|
||||
dispatch_builder.add(inputs::Sys, INPUTS_SYS, &[]);
|
||||
dispatch_builder.add(animation::Sys, ANIMATION_SYS, &[]);
|
||||
dispatch_builder.add(stats::Sys, STATS_SYS, &[INPUTS_SYS]);
|
||||
}
|
||||
|
@ -240,7 +240,11 @@ impl Server {
|
||||
self.state.ecs_mut().write_storage::<comp::Respawn>().remove(entity);
|
||||
self.state.write_component(entity, comp::Stats::default());
|
||||
self.state.write_component(entity, comp::Actions::default());
|
||||
self.state.write_component(entity, comp::phys::Pos(Vec3::new(0.0, 0.0, 64.0)));
|
||||
self.state
|
||||
.ecs_mut()
|
||||
.write_storage::<comp::phys::Pos>()
|
||||
.get_mut(entity)
|
||||
.map(|pos| pos.0.z += 100.0);
|
||||
self.state.write_component(entity, comp::phys::Vel(Vec3::zero()));
|
||||
self.state.write_component(entity, comp::phys::ForceUpdate);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user