1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-04 02:54:08 +02:00

more object convert work

This commit is contained in:
Robin Appelman 2020-06-28 15:04:23 +02:00
commit bdaa8fe6bc
3 changed files with 56 additions and 44 deletions

View file

@ -1,5 +1,5 @@
mod bspfile;
mod data;
pub mod data;
mod reader;
use crate::bspfile::LumpType;
@ -371,6 +371,25 @@ impl<'a> Handle<'a, Face> {
EdgeDirection::LastToFirst => edge.end_index,
})
}
pub fn is_visible(&self) -> bool {
self.texture()
.map(|texture| {
!texture.flags.intersects(
TextureFlags::LIGHT
| TextureFlags::SKY2D
| TextureFlags::SKY
| TextureFlags::WARP
| TextureFlags::TRANS
| TextureFlags::TRIGGER
| TextureFlags::HINT
| TextureFlags::SKIP
| TextureFlags::NODRAW
| TextureFlags::HITBOX,
)
})
.unwrap_or_default()
}
}
impl Handle<'_, Node> {