do not include unused features

This commit is contained in:
Quaternions 2024-07-26 15:42:38 -07:00
parent 2262c6feac
commit 3e8c5167dc

View File

@ -144,7 +144,7 @@ struct ResourceExternalHeader{
struct MapHeader{ struct MapHeader{
num_spacial_blocks:u32, num_spacial_blocks:u32,
num_resource_blocks:u32, num_resource_blocks:u32,
num_resources_external:u32, //num_resources_external:u32,
num_modes:u32, num_modes:u32,
num_attributes:u32, num_attributes:u32,
num_render_configs:u32, num_render_configs:u32,
@ -152,8 +152,8 @@ struct MapHeader{
spacial_blocks:Vec<SpacialBlockHeader>, spacial_blocks:Vec<SpacialBlockHeader>,
#[br(count=num_resource_blocks)] #[br(count=num_resource_blocks)]
resource_blocks:Vec<ResourceBlockHeader>, resource_blocks:Vec<ResourceBlockHeader>,
#[br(count=num_resources_external)] //#[br(count=num_resources_external)]
external_resources:Vec<ResourceExternalHeader>, //external_resources:Vec<ResourceExternalHeader>,
#[br(count=num_modes)] #[br(count=num_modes)]
modes:Vec<newtypes::gameplay_modes::Mode>, modes:Vec<newtypes::gameplay_modes::Mode>,
#[br(count=num_attributes)] #[br(count=num_attributes)]
@ -389,13 +389,13 @@ pub fn write_map<W:BinWriterExt>(mut writer:W,map:strafesnet_common::map::Comple
let map_header=MapHeader{ let map_header=MapHeader{
num_spacial_blocks:spacial_blocks.len() as u32, num_spacial_blocks:spacial_blocks.len() as u32,
num_resource_blocks:resource_blocks.len() as u32, num_resource_blocks:resource_blocks.len() as u32,
num_resources_external:0, //num_resources_external:0,
num_modes:map.modes.modes.len() as u32, num_modes:map.modes.modes.len() as u32,
num_attributes:map.attributes.len() as u32, num_attributes:map.attributes.len() as u32,
num_render_configs:map.render_configs.len() as u32, num_render_configs:map.render_configs.len() as u32,
spacial_blocks, spacial_blocks,
resource_blocks, resource_blocks,
external_resources:Vec::new(), //external_resources:Vec::new(),
modes:map.modes.modes.into_iter().map(Into::into).collect(), modes:map.modes.modes.into_iter().map(Into::into).collect(),
attributes:map.attributes.into_iter().map(Into::into).collect(), attributes:map.attributes.into_iter().map(Into::into).collect(),
render_configs:map.render_configs.into_iter().map(Into::into).collect(), render_configs:map.render_configs.into_iter().map(Into::into).collect(),