rust/lib-hedgewars-engine/src/world.rs
changeset 14732 40809bfd44af
parent 14731 946df0bb3b28
child 14734 cc6ab1e3f7d5
child 14735 4df1aac5f090
equal deleted inserted replaced
14731:946df0bb3b28 14732:40809bfd44af
    46 
    46 
    47         use mapgen::{theme::Theme, MapGenerator};
    47         use mapgen::{theme::Theme, MapGenerator};
    48         use std::path::Path;
    48         use std::path::Path;
    49 
    49 
    50         if let Some(ref state) = self.game_state {
    50         if let Some(ref state) = self.game_state {
       
    51             self.camera.position = state.land.play_box().center();
       
    52             
    51             let theme =
    53             let theme =
    52                 Theme::load(Path::new("../../share/hedgewars/Data/Themes/Cheese/")).unwrap();
    54                 Theme::load(Path::new("../../share/hedgewars/Data/Themes/Cheese/")).unwrap();
    53             let texture = MapGenerator::new().make_texture(&state.land, &theme);
    55             let texture = MapGenerator::new().make_texture(&state.land, &theme);
    54             if let Some(ref mut renderer) = self.renderer {
    56             if let Some(ref mut renderer) = self.renderer {
    55                 renderer.init(&texture);
    57                 renderer.init(&texture);