rust/lib-hedgewars-engine/src/world.rs
changeset 14716 40809bfd44af
parent 14715 946df0bb3b28
child 14718 cc6ab1e3f7d5
child 14719 4df1aac5f090
equal deleted inserted replaced
14715:946df0bb3b28 14716: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);