fixes
This commit is contained in:
parent
fa7e7d58bf
commit
2262c6feac
@ -313,7 +313,7 @@ fn collect_spacial_blocks(
|
||||
model_count+=1;
|
||||
models.push(model);
|
||||
});
|
||||
let id=BlockId::new(block_headers.len() as u32);
|
||||
let id=BlockId::new(block_headers.len() as u32+1);
|
||||
block_headers.push(SpacialBlockHeader{
|
||||
id,
|
||||
extents,
|
||||
@ -362,7 +362,7 @@ pub fn write_map<W:BinWriterExt>(mut writer:W,map:strafesnet_common::map::Comple
|
||||
let mut sequential_block_data=Vec::new();
|
||||
let mut cursor_to_data=std::io::Cursor::new(&mut sequential_block_data);
|
||||
collect_spacial_blocks(&mut block_location,&mut spacial_blocks,&mut cursor_to_data,bvh)?;
|
||||
let mut block_count=spacial_blocks.len() as u32;//continue block id
|
||||
let mut block_count=spacial_blocks.len() as u32+1;//continue block id
|
||||
let mut resource_blocks=Vec::new();//for map header
|
||||
//meshes
|
||||
for mesh in map.meshes.into_iter(){
|
||||
@ -400,9 +400,6 @@ pub fn write_map<W:BinWriterExt>(mut writer:W,map:strafesnet_common::map::Comple
|
||||
attributes:map.attributes.into_iter().map(Into::into).collect(),
|
||||
render_configs:map.render_configs.into_iter().map(Into::into).collect(),
|
||||
};
|
||||
//the map header is a block!
|
||||
block_count+=1;
|
||||
assert_eq!(block_count as usize+1,block_location.len());
|
||||
let mut file_header=crate::file::Header{
|
||||
fourcc:crate::file::FourCC::Map,
|
||||
version:0,
|
||||
|
Loading…
Reference in New Issue
Block a user