mirror of
https://codeberg.org/icewind/vbsp.git
synced 2026-06-03 10:44:07 +02:00
change StaticPropLump angles field visibility to pub
This commit is contained in:
parent
76918206da
commit
bc6cf3157e
3 changed files with 3 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use serde::Deserializer;
|
||||
use serde::de::{Error, Unexpected};
|
||||
use serde::Deserializer;
|
||||
use std::fmt;
|
||||
|
||||
struct BoolVisitor;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ use crate::error::UnsupportedLumpVersion;
|
|||
use crate::{lzma_decompress_with_header, Angles, BspError, FixedString, Vector};
|
||||
use binrw::{BinRead, BinReaderExt, BinResult, Endian};
|
||||
use bitflags::bitflags;
|
||||
use cgmath::Quaternion;
|
||||
use std::borrow::Cow;
|
||||
use std::io::{Cursor, Read, Seek};
|
||||
|
||||
|
|
@ -120,7 +119,7 @@ pub struct StaticPropLumps {
|
|||
#[derive(Debug, Clone, Default)]
|
||||
pub struct StaticPropLump {
|
||||
pub origin: Vector,
|
||||
angles: Angles,
|
||||
pub angles: Angles,
|
||||
pub prop_type: u16,
|
||||
pub first_leaf: u16,
|
||||
pub leaf_count: u16,
|
||||
|
|
@ -136,13 +135,6 @@ pub struct StaticPropLump {
|
|||
pub lightmap_resolution: [u16; 2],
|
||||
}
|
||||
|
||||
impl StaticPropLump {
|
||||
/// Get the rotation of the prop as quaternion
|
||||
pub fn rotation(&self) -> Quaternion<f32> {
|
||||
self.angles.as_quaternion()
|
||||
}
|
||||
}
|
||||
|
||||
impl BinRead for StaticPropLump {
|
||||
type Args<'a> = (u16,);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ impl<'a> AsPropPlacement<'a> for Handle<'a, StaticPropLump> {
|
|||
fn as_prop_placement(&self) -> PropPlacement<'a> {
|
||||
PropPlacement {
|
||||
model: self.model(),
|
||||
rotation: self.rotation(),
|
||||
rotation: self.angles.as_quaternion(),
|
||||
scale: 1.0,
|
||||
origin: self.origin,
|
||||
skin: self.skin,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue