| @@ -29,9 +29,9 @@ pub struct ShipsData<'a> { | |||||
| struct Processor<'a> { | struct Processor<'a> { | ||||
| delta: f32, | delta: f32, | ||||
| positions: &'a ReadStorage<'a, Position>, | |||||
| meeting_points: &'a ReadStorage<'a, MeetingPoint>, | |||||
| fleets_orbiting: &'a ReadStorage<'a, FleetOrbiting>, | |||||
| positions: ReadStorage<'a, Position>, | |||||
| meeting_points: ReadStorage<'a, MeetingPoint>, | |||||
| fleets_orbiting: ReadStorage<'a, FleetOrbiting>, | |||||
| } | } | ||||
| impl<'a> System<'a> for ShipsOrbiting { | impl<'a> System<'a> for ShipsOrbiting { | ||||
| @@ -51,14 +51,19 @@ impl<'a> System<'a> for ShipsOrbiting { | |||||
| /* update ships */ | /* update ships */ | ||||
| let processor = Processor { | let processor = Processor { | ||||
| delta: global.delta * global.world_speed, | delta: global.delta * global.world_speed, | ||||
| positions: &positions, | |||||
| fleets_orbiting: &fleets_orbiting, | |||||
| meeting_points: &meeting_points, | |||||
| positions, | |||||
| fleets_orbiting, | |||||
| meeting_points, | |||||
| }; | }; | ||||
| ships.set_event_emission(false); | ships.set_event_emission(false); | ||||
| let data = (&positions, &fleet_owned, &mut ships, &mut ships_orbiting); | |||||
| let data = ( | |||||
| &processor.positions, | |||||
| &fleet_owned, | |||||
| &mut ships, | |||||
| &mut ships_orbiting, | |||||
| ); | |||||
| data.par_join() | data.par_join() | ||||
| .for_each(|(position, fleet_owned, ship, ship_orbiting)| { | .for_each(|(position, fleet_owned, ship, ship_orbiting)| { | ||||