@@ 275,7 275,7 @@ pub async fn handle_client(
data_handle.rigid_body_set = rigid_body_set;
data_handle.collider_set = collider_set;
- /*let module_id = AttachedModule::attach_new(
+ let module_id = AttachedModule::attach_new(
&mut data_handle,
&mut e_write_handle,
player_id,
@@ 290,8 290,8 @@ pub async fn handle_client(
module_type: ModuleType::Cargo,
},
1,
- );*/
- /*let module_id = AttachedModule::attach_new(
+ );
+ let module_id = AttachedModule::attach_new(
&mut data_handle,
&mut e_write_handle,
module_id,
@@ 305,7 305,7 @@ pub async fn handle_client(
),
module_type: ModuleType::Cargo,
},
- 1,
+ 2,
);
let module_id = AttachedModule::attach_new(
&mut data_handle,
@@ 321,8 321,8 @@ pub async fn handle_client(
),
module_type: ModuleType::Hub,
},
- 1,
- );*/
+ 2,
+ );
}
}
MessageC2S::Goodbye(pkt) => {
@@ 175,16 175,11 @@ impl AttachedModule {
};
let relative_pos =
- vector![anchor.x * (rotation + parent_body.rotation().angle()).cos() +
- anchor.y * -(rotation + parent_body.rotation().angle()).sin(),
- anchor.x * (rotation + parent_body.rotation().angle()).sin() +
- anchor.y * (rotation + parent_body.rotation().angle()).cos()];
+ vector![anchor.x * (parent_body.rotation().angle()).cos() +
+ anchor.y * -(parent_body.rotation().angle()).sin(),
+ anchor.x * (parent_body.rotation().angle()).sin() +
+ anchor.y * (parent_body.rotation().angle()).cos()];
let module_pos = parent_pos + relative_pos;
- debug!("real pos: {}", parent_pos + relative_pos);
- debug!("parent pos: {}", parent_pos);
- debug!("relative pos: {}", relative_pos);
- debug!("real heading: {}", rotation.to_degrees() + parent_body.rotation().angle().to_degrees());
- debug!("parent heading: {}", parent_body.rotation().angle().to_degrees());
// create attachment module
let module_collider = ColliderBuilder::cuboid(25.0 / SCALE, 25.0 / SCALE)