Merge branch 'xMAC94x/airship_voxels_common' into 'master'

move server.voxel for airship to common

See merge request veloren/veloren!3012
This commit is contained in:
Marcel 2021-11-15 23:29:58 +00:00
commit 82c867d95e
11 changed files with 3 additions and 3 deletions

View File

@ -207,10 +207,10 @@ pub mod figuredata {
for (_, spec) in (manifest.read().0).0.iter() { for (_, spec) in (manifest.read().0).0.iter() {
for bone in [&spec.bone0, &spec.bone1, &spec.bone2].iter() { for bone in [&spec.bone0, &spec.bone1, &spec.bone2].iter() {
// TODO: Currently both client and server load models and manifests from // TODO: Currently both client and server load models and manifests from
// "server.voxel.". In order to support CSG procedural airships, we probably // "common.voxel.". In order to support CSG procedural airships, we probably
// need to load them in the server and sync them as an ECS resource. // need to load them in the server and sync them as an ECS resource.
let vox = let vox =
cache.load::<DotVoxAsset>(&["server.voxel.", &bone.central.0].concat())?; cache.load::<DotVoxAsset>(&["common.voxel.", &bone.central.0].concat())?;
let dyna = Dyna::<Cell, (), ColumnAccess>::from_vox(&vox.read().0, false); let dyna = Dyna::<Cell, (), ColumnAccess>::from_vox(&vox.read().0, false);
let dyna = dyna.map_into(|cell| { let dyna = dyna.map_into(|cell| {
if let Some(rgb) = cell.get_color() { if let Some(rgb) = cell.get_color() {

View File

@ -4536,7 +4536,7 @@ fn mesh_ship_bone<K: fmt::Debug + Eq + Hash, V, F: Fn(&V) -> &ShipCentralSubSpec
}, },
}; };
let bone = f(spec); let bone = f(spec);
let central = graceful_load_segment_fullspec(&["server.voxel.", &bone.central.0].concat()); let central = graceful_load_segment_fullspec(&["common.voxel.", &bone.central.0].concat());
(central, Vec3::from(bone.offset)) (central, Vec3::from(bone.offset))
} }