1mod generated;
2
3pub use generated::*;
4use vbsp_common::{AsPropPlacement, PropPlacement};
5
6impl<'a> AsPropPlacement<'a> for PropDynamic<'a> {
7 fn as_prop_placement(&self) -> PropPlacement<'a> {
8 PropPlacement {
9 model: self.model,
10 rotation: self.angles.as_quaternion(),
11 scale: self.modelscale.unwrap_or(1.0),
12 origin: self.origin,
13 skin: self.skin as i32,
14 }
15 }
16}
17
18impl<'a> AsPropPlacement<'a> for PropDynamicOverride<'a> {
19 fn as_prop_placement(&self) -> PropPlacement<'a> {
20 PropPlacement {
21 model: self.model,
22 rotation: self.angles.as_quaternion(),
23 scale: self.modelscale.unwrap_or(1.0),
24 origin: self.origin,
25 skin: 0,
26 }
27 }
28}
29
30impl<'a> AsPropPlacement<'a> for PropPhysics<'a> {
31 fn as_prop_placement(&self) -> PropPlacement<'a> {
32 PropPlacement {
33 model: self.model,
34 rotation: self.angles.as_quaternion(),
35 scale: 1.0,
36 origin: self.origin,
37 skin: self.skin.unwrap_or_default() as i32,
38 }
39 }
40}