aboutsummaryrefslogtreecommitdiff
path: root/stockton-levels/src/q3/planes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stockton-levels/src/q3/planes.rs')
-rw-r--r--stockton-levels/src/q3/planes.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/stockton-levels/src/q3/planes.rs b/stockton-levels/src/q3/planes.rs
index 970ddde..dd4f3aa 100644
--- a/stockton-levels/src/q3/planes.rs
+++ b/stockton-levels/src/q3/planes.rs
@@ -45,10 +45,14 @@ pub fn from_data(data: &[u8]) -> Result<Box<[Plane]>> {
Ok(planes.into_boxed_slice())
}
-impl<'a> HasPlanes<'a> for Q3BSPFile {
- type PlanesIter = std::slice::Iter<'a, Plane>;
+impl HasPlanes for Q3BSPFile {
+ type PlanesIter<'a> = std::slice::Iter<'a, Plane>;
- fn planes_iter(&'a self) -> Self::PlanesIter {
+ fn planes_iter<'a>(&'a self) -> Self::PlanesIter<'a> {
self.planes.iter()
}
+
+ fn get_plane<'a>(&'a self, idx: u32) -> &'a Plane {
+ &self.planes[idx as usize]
+ }
} \ No newline at end of file