3 #[mt_derive(to = "clt", repr = "str")]
13 #[mt_derive(to = "clt")]
15 #[mt(const_before = "4u8")] // version
16 pub max_hp: u16, // player only
17 pub collide_with_nodes: bool,
18 pub weight: f32, // deprecated
19 pub collision_box: Aabb3<f32>,
20 pub selection_box: Aabb3<f32>,
22 pub visual: ObjVisual,
23 pub visual_size: Vector3<f32>,
24 pub textures: Vec<String>,
25 pub sprite_sheet_size: Vector2<i16>, // in sprites
26 pub sprite_pos: Point2<i16>, // in sprite sheet
28 pub make_footstep_sounds: bool,
29 pub rotate_speed: Rad<f32>, // per second
31 pub colors: Vec<Color>,
32 pub collide_with_objs: bool,
34 pub face_rotate_dir: bool,
35 pub face_rotate_dir_off: Deg<f32>,
36 pub backface_cull: bool,
38 pub nametag_color: Color,
39 pub face_rotate_speed: Deg<f32>, // per second
41 pub itemstring: String,
43 pub max_breath: u16, // player only
44 pub eye_height: f32, // player only
45 pub zoom_fov: Deg<f32>, // player only
46 pub use_texture_alpha: bool,
47 pub dmg_texture_mod: String, // suffix
49 pub show_on_minimap: bool,
50 pub nametag_bg: Color,
53 #[mt_derive(to = "clt")]
55 #[mt(multiplier = "BS")]
57 #[mt(multiplier = "BS")]
58 pub vel: Vector3<f32>,
59 #[mt(multiplier = "BS")]
60 pub acc: Vector3<f32>,
61 pub rot: Euler<Deg<f32>>,
62 pub interpolate: bool,
64 pub update_interval: f32,
67 #[mt_derive(to = "clt")]
68 pub struct ObjSprite {
69 pub frame_0: Point2<i16>,
71 pub frame_duration: f32,
72 pub view_angle_frames: bool,
75 #[mt_derive(to = "clt")]
77 pub frames: Vector2<i32>,
83 #[mt_derive(to = "clt")]
84 pub struct ObjBonePos {
86 pub rot: Euler<Deg<f32>>,
89 #[mt_derive(to = "clt")]
90 pub struct ObjAttach {
94 pub rot: Euler<Deg<f32>>,
95 pub force_visible: bool,
98 #[mt_derive(to = "clt")]
99 pub struct ObjPhysicsOverride {
103 // the following are player only
105 pub no_sneak_glitch: bool,
109 pub const GENERIC_CAO: u8 = 101;
111 #[mt_derive(to = "clt", repr = "u8", tag = "type", content = "data")]
113 Props(Box<ObjProps>) = 0,
116 #[serde(rename = "mod")]
124 armor: HashMap<String, u16>,
132 PhysicsOverride(ObjPhysicsOverride),
134 #[mt(const_after = "GENERIC_CAO")]
142 #[mt_derive(to = "clt")]
143 pub struct ObjIdMsg {
149 #[mt_derive(to = "clt")]
150 pub struct ObjInitMsg(#[mt(size = "u32")] pub ObjMsg);
152 #[mt_derive(to = "clt")]
153 pub struct ObjInitData {
154 #[mt(const_before = "1u8")] // version
158 #[mt(multiplier = "BS")]
159 pub pos: Point3<f32>,
160 pub rot: Euler<Deg<f32>>,
163 pub msgs: Vec<ObjInitMsg>,
166 #[mt_derive(to = "clt")]
169 #[mt(const_before = "GENERIC_CAO")]
171 pub init_data: ObjInitData,