From 6ee4c8014a1d62bbf014335dadc92015b5e0324e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 23 Jul 2024 17:18:10 -0700 Subject: [PATCH] no try_calc --- src/file.rs | 2 +- src/map.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file.rs b/src/file.rs index b78405c..3381dff 100644 --- a/src/file.rs +++ b/src/file.rs @@ -58,7 +58,7 @@ struct Header{ priming:u64, /// uuid for this file resource:u128, - #[bw(try_calc(u32::try_from(block_location.len()-1)))] + //don't need try_calc: the struct will force field initialization anyways and it can be calculated there block_count:u32, #[br(count=block_count+1)] block_location:Vec, diff --git a/src/map.rs b/src/map.rs index 29cb710..89b39fc 100644 --- a/src/map.rs +++ b/src/map.rs @@ -89,7 +89,7 @@ struct BvhNode{ #[binrw] #[brw(little)] struct Region{ - #[bw(try_calc(u32::try_from(models.len())))] + //consider including a bvh in the region instead of needing to rebalance the physics bvh on the fly model_count:u32, #[br(count=model_count)] models:Vec,