diff --git a/voxygen/src/menu/char_selection/mod.rs b/voxygen/src/menu/char_selection/mod.rs index b60bfed85f..0793bd7ff1 100644 --- a/voxygen/src/menu/char_selection/mod.rs +++ b/voxygen/src/menu/char_selection/mod.rs @@ -284,13 +284,8 @@ impl PlayState for CharSelectionState { Self::get_humanoid_body_inventory(&self.char_selection_ui, &client); if let Some(mut first_pass) = drawer.first_pass() { - self.scene.render( - &mut first_pass, - client.get_tick(), - humanoid_body, - loadout, - &client, - ); + self.scene + .render(&mut first_pass, client.get_tick(), humanoid_body, loadout); } if let Some(mut volumetric_pass) = drawer.volumetric_pass() { diff --git a/voxygen/src/scene/simple.rs b/voxygen/src/scene/simple.rs index 047a94d6a4..825d00bd52 100644 --- a/voxygen/src/scene/simple.rs +++ b/voxygen/src/scene/simple.rs @@ -1,17 +1,11 @@ use crate::{ - mesh::{greedy::GreedyMesh, segment::generate_mesh_base_vol_figure}, render::{ - create_skybox_mesh, pipelines::FigureSpriteAtlasData, BoneMeshes, Consts, FigureModel, - FirstPassDrawer, GlobalModel, Globals, GlobalsBindGroup, Light, Mesh, Model, - PointLightMatrix, RainOcclusionLocals, Renderer, Shadow, ShadowLocals, SkyboxVertex, - TerrainVertex, + create_skybox_mesh, Consts, FirstPassDrawer, GlobalModel, Globals, GlobalsBindGroup, Light, + Model, PointLightMatrix, RainOcclusionLocals, Renderer, Shadow, ShadowLocals, SkyboxVertex, }, scene::{ camera::{self, Camera, CameraMode}, - figure::{ - load_mesh, FigureAtlas, FigureModelCache, FigureModelEntry, FigureState, - FigureUpdateCommonParameters, - }, + figure::{FigureAtlas, FigureModelCache, FigureState, FigureUpdateCommonParameters}, CloudsLocals, Lod, PostProcessLocals, }, window::{Event, PressState}, @@ -19,7 +13,6 @@ use crate::{ }; use anim::{ character::{CharacterSkeleton, IdleAnimation, SkeletonAttr}, - fixture::FixtureSkeleton, Animation, }; use client::Client; @@ -29,7 +22,6 @@ use common::{ inventory::{slot::EquipSlot, Inventory}, item::ItemKind, }, - figure::Segment, slowjob::SlowJobPool, terrain::{BlockKind, CoordinateConversions}, vol::{BaseVol, ReadVol}, @@ -48,18 +40,6 @@ impl ReadVol for VoidVol { fn get(&self, _pos: Vec3) -> Result<&'_ Self::Vox, Self::Error> { Ok(&()) } } -fn generate_mesh( - greedy: &mut GreedyMesh<'_, FigureSpriteAtlasData>, - mesh: &mut Mesh, - segment: Segment, - offset: Vec3, - bone_idx: u8, -) -> BoneMeshes { - let (opaque, _, /* shadow */ _, bounds) = - generate_mesh_base_vol_figure(segment, (greedy, mesh, offset, Vec3::one(), bone_idx)); - (opaque /* , shadow */, bounds) -} - struct Skybox { model: Model, } @@ -77,8 +57,7 @@ pub struct Scene { figure_model_cache: FigureModelCache, figure_state: Option>, - //turning_camera: bool, - turning_character: bool, + turning_camera: bool, char_pos: Vec3, } @@ -109,7 +88,7 @@ impl Scene { camera.set_distance(3.4); camera.set_orientation(Vec3::new(start_angle, 0.1, 0.0)); - let mut figure_atlas = FigureAtlas::new(renderer); + let figure_atlas = FigureAtlas::new(renderer); let data = GlobalModel { globals: renderer.create_consts(&[Globals::default()]), @@ -150,8 +129,7 @@ impl Scene { camera, - //turning_camera: false, - turning_character: false, + turning_camera: false, char_pos, } } @@ -173,16 +151,14 @@ impl Scene { }, Event::MouseButton(button, state) => { if state == PressState::Pressed { - //self.turning_camera = button == MouseButton::Right; - self.turning_character = button == MouseButton::Left; + self.turning_camera = button == MouseButton::Left; } else { - //self.turning_camera = false; - self.turning_character = false; + self.turning_camera = false; } true }, Event::CursorMove(delta) => { - if self.turning_character { + if self.turning_camera { self.camera.rotate_by(delta.with_z(0.0) * 0.01); } true @@ -341,7 +317,6 @@ impl Scene { tick: u64, body: Option, inventory: Option<&Inventory>, - client: &Client, ) { let mut figure_drawer = drawer.draw_figures(); if let Some(body) = body {