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

all 20 css maps decoded

This commit is contained in:
Quaternions 2025-02-16 15:11:30 -08:00
commit b2983d9ac1

View file

@ -243,6 +243,8 @@ pub enum Entity<'a> {
InfoParticleSystem(InfoParticleSystem<'a>), InfoParticleSystem(InfoParticleSystem<'a>),
#[serde(rename = "info_player_counterterrorist")] #[serde(rename = "info_player_counterterrorist")]
InfoPlayerCounterterrorist(InfoPlayerCounterterrorist), InfoPlayerCounterterrorist(InfoPlayerCounterterrorist),
#[serde(rename = "info_player_logo")]
InfoPlayerLogo(InfoPlayerLogo),
#[serde(rename = "info_player_start")] #[serde(rename = "info_player_start")]
InfoPlayerStart(InfoPlayerStart), InfoPlayerStart(InfoPlayerStart),
#[serde(rename = "info_player_terrorist")] #[serde(rename = "info_player_terrorist")]
@ -327,6 +329,9 @@ pub enum Entity<'a> {
#[serde(rename = "phys_thruster")] #[serde(rename = "phys_thruster")]
#[serde(borrow)] #[serde(borrow)]
PhysThruster(PhysThruster<'a>), PhysThruster(PhysThruster<'a>),
#[serde(rename = "phys_torque")]
#[serde(borrow)]
PhysTorque(PhysTorque<'a>),
#[serde(rename = "player_speedmod")] #[serde(rename = "player_speedmod")]
#[serde(borrow)] #[serde(borrow)]
PlayerSpeedmod(PlayerSpeedmod<'a>), PlayerSpeedmod(PlayerSpeedmod<'a>),
@ -348,6 +353,9 @@ pub enum Entity<'a> {
#[serde(rename = "point_spotlight")] #[serde(rename = "point_spotlight")]
#[serde(borrow)] #[serde(borrow)]
PointSpotlight(PointSpotlight<'a>), PointSpotlight(PointSpotlight<'a>),
#[serde(rename = "point_surroundtest")]
#[serde(borrow)]
PointSurroundtest(PointSurroundtest<'a>),
#[serde(rename = "point_template")] #[serde(rename = "point_template")]
#[serde(borrow)] #[serde(borrow)]
PointTemplate(PointTemplate<'a>), PointTemplate(PointTemplate<'a>),
@ -548,14 +556,24 @@ pub struct AmbientGeneric<'a> {
pub struct Cycler<'a> { pub struct Cycler<'a> {
pub angles: Angles, pub angles: Angles,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub disablereceiveshadows: bool, pub disablereceiveshadows: bool,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub disableshadows: bool,
pub model: &'a str, pub model: &'a str,
pub origin: Vector, pub origin: Vector,
pub renderamt: u8, pub renderamt: u8,
pub rendercolor: Color, pub rendercolor: Color,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub sequence: bool,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub skin: bool, pub skin: bool,
pub spawnflags: u32, pub spawnflags: u32,
#[serde(default)]
pub targetname: Option<&'a str>,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct EnvBeam<'a> { pub struct EnvBeam<'a> {
@ -672,6 +690,8 @@ pub struct EnvFade<'a> {
pub struct EnvFire<'a> { pub struct EnvFire<'a> {
pub damagescale: f32, pub damagescale: f32,
pub fireattack: u8, pub fireattack: u8,
#[serde(default)]
pub firedecay: Option<u8>,
pub firesize: u16, pub firesize: u16,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
@ -782,9 +802,8 @@ pub struct EnvLightglow {
pub maxdist: u16, pub maxdist: u16,
pub mindist: u16, pub mindist: u16,
pub origin: Vector, pub origin: Vector,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub outermaxdist: bool, pub outermaxdist: Option<u16>,
pub rendercolor: Color, pub rendercolor: Color,
#[serde(default)] #[serde(default)]
pub spawnflags: Option<u32>, pub spawnflags: Option<u32>,
@ -1140,9 +1159,11 @@ pub struct EnvTonemapController<'a> {
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct EnvWind { pub struct EnvWind {
pub angles: Angles, #[serde(default)]
pub angles: Option<Angles>,
pub gustdirchange: u8, pub gustdirchange: u8,
pub gustduration: u8, #[serde(default)]
pub gustduration: Option<u8>,
pub maxgust: u8, pub maxgust: u8,
pub maxgustdelay: u8, pub maxgustdelay: u8,
pub maxwind: u8, pub maxwind: u8,
@ -1255,10 +1276,12 @@ pub struct FuncBreakable<'a> {
#[serde(default)] #[serde(default)]
pub exploderadius: Option<u16>, pub exploderadius: Option<u16>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub explosion: bool, pub explosion: bool,
pub gibdir: Vector, pub gibdir: Vector,
pub health: u32, pub health: u32,
pub material: u8, #[serde(default)]
pub material: Option<u8>,
#[serde(default)] #[serde(default)]
pub minhealthdmg: Option<u8>, pub minhealthdmg: Option<u8>,
pub model: &'a str, pub model: &'a str,
@ -1326,7 +1349,8 @@ pub struct FuncBreakableSurf<'a> {
pub performancemode: bool, pub performancemode: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub pressuredelay: bool, pub pressuredelay: bool,
pub propdata: u8, #[serde(default)]
pub propdata: Option<u8>,
pub renderamt: u8, pub renderamt: u8,
pub rendercolor: Color, pub rendercolor: Color,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
@ -1339,6 +1363,8 @@ pub struct FuncBreakableSurf<'a> {
pub spawnobject: bool, pub spawnobject: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub surfacetype: bool, pub surfacetype: bool,
#[serde(default)]
pub targetname: Option<&'a str>,
pub upperleft: Vector, pub upperleft: Vector,
pub upperright: Vector, pub upperright: Vector,
} }
@ -1552,17 +1578,18 @@ pub struct FuncDoorRotating<'a> {
pub distance: u8, pub distance: u8,
pub dmg: u32, pub dmg: u32,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub forceclosed: bool, pub forceclosed: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub health: bool, pub health: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub ignoredebris: bool, pub ignoredebris: bool,
#[serde(deserialize_with = "bool_from_int")] pub lip: u8,
pub lip: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub locked_sentence: bool, pub locked_sentence: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub loopmovesound: bool, pub loopmovesound: bool,
pub model: &'a str, pub model: &'a str,
#[serde(default)] #[serde(default)]
@ -1583,6 +1610,7 @@ pub struct FuncDoorRotating<'a> {
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub rendermode: bool, pub rendermode: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub solidbsp: bool, pub solidbsp: bool,
pub spawnflags: u32, pub spawnflags: u32,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
@ -1684,9 +1712,8 @@ pub struct FuncIllusionary<'a> {
pub targetname: Option<&'a str>, pub targetname: Option<&'a str>,
#[serde(default)] #[serde(default)]
pub wait: Option<u8>, pub wait: Option<u8>,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub zhlt_lightflags: bool, pub zhlt_lightflags: Option<u8>,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct FuncLod<'a> { pub struct FuncLod<'a> {
@ -1700,6 +1727,7 @@ pub struct FuncMonitor<'a> {
#[serde(default)] #[serde(default)]
pub _minlight: Option<f32>, pub _minlight: Option<f32>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub disablereceiveshadows: bool, pub disablereceiveshadows: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
@ -1712,24 +1740,29 @@ pub struct FuncMonitor<'a> {
pub invert_exclusion: bool, pub invert_exclusion: bool,
pub model: &'a str, pub model: &'a str,
pub origin: Vector, pub origin: Vector,
#[serde(default)]
pub parentname: Option<&'a str>,
pub renderamt: u8, pub renderamt: u8,
pub rendercolor: Color, pub rendercolor: Color,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub renderfx: bool, pub renderfx: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(default)]
pub rendermode: bool, pub rendermode: Option<u8>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub solidbsp: bool, pub solidbsp: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub solidity: bool, pub solidity: bool,
pub spawnflags: u32, #[serde(default)]
pub spawnflags: Option<u32>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub startdisabled: bool, pub startdisabled: bool,
pub target: &'a str, pub target: &'a str,
pub targetname: &'a str, #[serde(default)]
pub targetname: Option<&'a str>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub vrad_brush_cast_shadows: bool, pub vrad_brush_cast_shadows: bool,
@ -1776,12 +1809,15 @@ pub struct FuncOccluder<'a> {
pub occludernumber: u8, pub occludernumber: u8,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub startactive: bool, pub startactive: bool,
#[serde(default)]
pub targetname: Option<&'a str>,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct FuncPhysbox<'a> { pub struct FuncPhysbox<'a> {
#[serde(default)] #[serde(default)]
pub _minlight: Option<f32>, pub _minlight: Option<f32>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub damagetoenablemotion: bool, pub damagetoenablemotion: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub damagetype: bool, pub damagetype: bool,
@ -1790,33 +1826,46 @@ pub struct FuncPhysbox<'a> {
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub disableshadows: bool, pub disableshadows: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub explodedamage: bool, pub explodedamage: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub explodemagnitude: bool, pub explodemagnitude: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub exploderadius: bool, pub exploderadius: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub explosion: bool, pub explosion: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub forcetoenablemotion: bool, pub forcetoenablemotion: bool,
pub gibdir: Vector, pub gibdir: Vector,
pub health: u16, #[serde(default)]
pub massscale: f32, pub health: Option<u16>,
pub material: u8, #[serde(default)]
pub massscale: Option<f32>,
#[serde(default)]
pub material: Option<u8>,
pub model: &'a str, pub model: &'a str,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub nodamageforces: bool, pub nodamageforces: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub notsolid: bool, pub notsolid: bool,
pub origin: Vector, pub origin: Vector,
#[serde(default)] #[serde(default)]
pub parentname: Option<&'a str>, pub parentname: Option<&'a str>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub performancemode: bool, pub performancemode: bool,
pub preferredcarryangles: Angles, pub preferredcarryangles: Angles,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub pressuredelay: bool, pub pressuredelay: bool,
pub propdata: u8, #[serde(default)]
pub propdata: Option<u8>,
pub renderamt: u8, pub renderamt: u8,
pub rendercolor: Color, pub rendercolor: Color,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
@ -1887,10 +1936,13 @@ pub struct FuncPhysboxMultiplayer<'a> {
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct FuncPrecipitation<'a> { pub struct FuncPrecipitation<'a> {
pub model: &'a str, pub model: &'a str,
pub preciptype: u8, #[serde(default)]
pub preciptype: Option<u8>,
pub renderamt: u16, pub renderamt: u16,
pub rendercolor: Color, pub rendercolor: Color,
#[serde(default)] #[serde(default)]
pub renderfx: Option<u8>,
#[serde(default)]
pub targetname: Option<&'a str>, pub targetname: Option<&'a str>,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
@ -1938,6 +1990,7 @@ pub struct FuncRotating<'a> {
pub renderfx: bool, pub renderfx: bool,
pub rendermode: u8, pub rendermode: u8,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub solidbsp: bool, pub solidbsp: bool,
pub spawnflags: u32, pub spawnflags: u32,
#[serde(default)] #[serde(default)]
@ -1991,8 +2044,7 @@ pub struct FuncTracktrain<'a> {
pub movesoundminpitch: u8, pub movesoundminpitch: u8,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub movesoundmintime: bool, pub movesoundmintime: bool,
#[serde(deserialize_with = "bool_from_int")] pub orientationtype: u8,
pub orientationtype: bool,
pub origin: Vector, pub origin: Vector,
pub renderamt: u8, pub renderamt: u8,
pub rendercolor: Color, pub rendercolor: Color,
@ -2009,9 +2061,8 @@ pub struct FuncTracktrain<'a> {
pub stopsound: Option<&'a str>, pub stopsound: Option<&'a str>,
pub target: &'a str, pub target: &'a str,
pub targetname: &'a str, pub targetname: &'a str,
#[serde(deserialize_with = "bool_from_int")] pub velocitytype: u8,
pub velocitytype: bool, pub volume: f32,
pub volume: u8,
pub wheels: u8, pub wheels: u8,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
@ -2262,6 +2313,7 @@ pub struct InfoMapParameters {
pub angles: Option<Angles>, pub angles: Option<Angles>,
pub bombradius: u16, pub bombradius: u16,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub buying: bool, pub buying: bool,
pub origin: Vector, pub origin: Vector,
#[serde(default)] #[serde(default)]
@ -2323,6 +2375,11 @@ pub struct InfoPlayerCounterterrorist {
pub origin: Vector, pub origin: Vector,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct InfoPlayerLogo {
pub angles: Angles,
pub origin: Vector,
}
#[derive(Debug, Clone, Deserialize)]
pub struct InfoPlayerStart { pub struct InfoPlayerStart {
pub angles: Angles, pub angles: Angles,
pub origin: Vector, pub origin: Vector,
@ -2410,7 +2467,7 @@ pub struct KeyframeRope<'a> {
pub subdiv: u8, pub subdiv: u8,
pub targetname: &'a str, pub targetname: &'a str,
pub texturescale: u8, pub texturescale: u8,
pub width: u8, pub width: f32,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct Light<'a> { pub struct Light<'a> {
@ -2434,6 +2491,8 @@ pub struct Light<'a> {
#[serde(default)] #[serde(default)]
pub _zero_percent_distance: Option<f32>, pub _zero_percent_distance: Option<f32>,
#[serde(default)] #[serde(default)]
pub angles: Option<Angles>,
#[serde(default)]
pub defaultstyle: Option<u8>, pub defaultstyle: Option<u8>,
#[serde(default)] #[serde(default)]
pub ontimer: Option<&'a str>, pub ontimer: Option<&'a str>,
@ -2483,7 +2542,7 @@ pub struct LightSpot<'a> {
#[serde(default)] #[serde(default)]
pub _constant_attn: Option<f32>, pub _constant_attn: Option<f32>,
#[serde(default)] #[serde(default)]
pub _distance: Option<u16>, pub _distance: Option<u32>,
pub _exponent: f32, pub _exponent: f32,
#[serde(default)] #[serde(default)]
pub _fifty_percent_distance: Option<f32>, pub _fifty_percent_distance: Option<f32>,
@ -2709,9 +2768,8 @@ pub struct MoveRope<'a> {
#[serde(default)] #[serde(default)]
pub parentname: Option<&'a str>, pub parentname: Option<&'a str>,
pub positioninterpolator: u8, pub positioninterpolator: u8,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub r#type: bool, pub r#type: Option<u8>,
pub ropematerial: &'a str, pub ropematerial: &'a str,
pub slack: u8, pub slack: u8,
#[serde(default)] #[serde(default)]
@ -2727,8 +2785,9 @@ pub struct PathTrack<'a> {
pub angles: Angles, pub angles: Angles,
#[serde(default)] #[serde(default)]
pub onpass: Option<&'a str>, pub onpass: Option<&'a str>,
#[serde(deserialize_with = "bool_from_int")] #[serde(default)]
pub orientationtype: bool, pub onuser1: Option<&'a str>,
pub orientationtype: u8,
pub origin: Vector, pub origin: Vector,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
@ -2789,7 +2848,8 @@ pub struct PhysHinge<'a> {
pub spawnflags: u32, pub spawnflags: u32,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub systemloadscale: bool, pub systemloadscale: bool,
pub targetname: &'a str, #[serde(default)]
pub targetname: Option<&'a str>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub torquelimit: bool, pub torquelimit: bool,
} }
@ -2897,6 +2957,17 @@ pub struct PhysThruster<'a> {
pub targetname: &'a str, pub targetname: &'a str,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct PhysTorque<'a> {
pub attach1: &'a str,
pub axis: Vector,
pub force: u16,
#[serde(deserialize_with = "bool_from_int")]
pub forcetime: bool,
pub origin: Vector,
pub spawnflags: u32,
pub targetname: &'a str,
}
#[derive(Debug, Clone, Deserialize)]
pub struct PlayerSpeedmod<'a> { pub struct PlayerSpeedmod<'a> {
pub origin: Vector, pub origin: Vector,
#[serde(default)] #[serde(default)]
@ -2912,6 +2983,9 @@ pub struct PlayerWeaponstrip<'a> {
pub struct PointCamera<'a> { pub struct PointCamera<'a> {
pub angles: Angles, pub angles: Angles,
pub fogcolor: Color, pub fogcolor: Color,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub fogenable: bool,
pub fogend: u16, pub fogend: u16,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
@ -2920,6 +2994,8 @@ pub struct PointCamera<'a> {
pub fov: u8, pub fov: u8,
pub origin: Vector, pub origin: Vector,
#[serde(default)] #[serde(default)]
pub resolution: Option<u16>,
#[serde(default)]
pub spawnflags: Option<u32>, pub spawnflags: Option<u32>,
pub targetname: &'a str, pub targetname: &'a str,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
@ -2934,7 +3010,8 @@ pub struct PointClientcommand<'a> {
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct PointDevshotCamera<'a> { pub struct PointDevshotCamera<'a> {
pub angles: Angles, pub angles: Angles,
pub cameraname: &'a str, #[serde(default)]
pub cameraname: Option<&'a str>,
pub fov: u8, pub fov: u8,
pub origin: Vector, pub origin: Vector,
} }
@ -2974,6 +3051,14 @@ pub struct PointSpotlight<'a> {
pub targetname: Option<&'a str>, pub targetname: Option<&'a str>,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct PointSurroundtest<'a> {
pub on2speakers: &'a str,
pub on4speakers: &'a str,
pub on51speakers: &'a str,
pub origin: Vector,
pub targetname: &'a str,
}
#[derive(Debug, Clone, Deserialize)]
pub struct PointTemplate<'a> { pub struct PointTemplate<'a> {
#[serde(default)] #[serde(default)]
pub boltwidth: Option<u8>, pub boltwidth: Option<u8>,
@ -3056,6 +3141,8 @@ pub struct PointViewcontrol<'a> {
#[serde(default)] #[serde(default)]
pub interpolatepositiontoplayer: bool, pub interpolatepositiontoplayer: bool,
pub origin: Vector, pub origin: Vector,
#[serde(default)]
pub parentname: Option<&'a str>,
pub spawnflags: u32, pub spawnflags: u32,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
@ -3076,9 +3163,15 @@ pub struct PropDoorRotating<'a> {
pub distance: u8, pub distance: u8,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub dmg: bool,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub forceclosed: bool, pub forceclosed: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
pub hardware: bool, pub hardware: bool,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub health: bool,
pub model: &'a str, pub model: &'a str,
#[serde(default)] #[serde(default)]
pub onclose: Option<&'a str>, pub onclose: Option<&'a str>,
@ -3088,7 +3181,7 @@ pub struct PropDoorRotating<'a> {
#[serde(default)] #[serde(default)]
pub opendir: bool, pub opendir: bool,
pub origin: Vector, pub origin: Vector,
pub returndelay: u8, pub returndelay: i32,
pub skin: u8, pub skin: u8,
#[serde(default)] #[serde(default)]
pub soundcloseoverride: Option<&'a str>, pub soundcloseoverride: Option<&'a str>,
@ -3097,8 +3190,12 @@ pub struct PropDoorRotating<'a> {
#[serde(default)] #[serde(default)]
pub soundopenoverride: Option<&'a str>, pub soundopenoverride: Option<&'a str>,
pub spawnflags: u32, pub spawnflags: u32,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub spawnpos: bool,
pub speed: u8, pub speed: u8,
pub targetname: &'a str, #[serde(default)]
pub targetname: Option<&'a str>,
} }
#[derive(Debug, Clone, Deserialize)] #[derive(Debug, Clone, Deserialize)]
pub struct PropDynamic<'a> { pub struct PropDynamic<'a> {
@ -3129,9 +3226,13 @@ pub struct PropDynamic<'a> {
pub fademaxdist: Option<f32>, pub fademaxdist: Option<f32>,
pub fademindist: f32, pub fademindist: f32,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub fadescale: bool, pub fadescale: bool,
#[serde(default)] #[serde(default)]
pub globalname: Option<&'a str>, pub globalname: Option<&'a str>,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub health: bool,
#[serde(default)] #[serde(default)]
pub lightingoriginhack: Option<&'a str>, pub lightingoriginhack: Option<&'a str>,
pub maxanimtime: u8, pub maxanimtime: u8,
@ -3249,6 +3350,7 @@ pub struct PropDynamicOverride<'a> {
#[serde(default)] #[serde(default)]
pub setbodygroup: bool, pub setbodygroup: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub skin: bool, pub skin: bool,
pub solid: u8, pub solid: u8,
#[serde(default)] #[serde(default)]
@ -3286,6 +3388,7 @@ pub struct PropPhysics<'a> {
pub fademaxdist: Option<u16>, pub fademaxdist: Option<u16>,
pub fademindist: i32, pub fademindist: i32,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub fadescale: bool, pub fadescale: bool,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
@ -3361,10 +3464,13 @@ pub struct PropPhysicsMultiplayer<'a> {
#[serde(default)] #[serde(default)]
pub fademaxdist: Option<u16>, pub fademaxdist: Option<u16>,
pub fademindist: i32, pub fademindist: i32,
#[serde(deserialize_with = "bool_from_int")] #[serde(default)]
pub fadescale: bool, pub fadescale: Option<f32>,
#[serde(default)] #[serde(default)]
pub forcetoenablemotion: Option<u16>, pub forcetoenablemotion: Option<u16>,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub health: bool,
pub inertiascale: f32, pub inertiascale: f32,
#[serde(default)] #[serde(default)]
pub massscale: Option<f32>, pub massscale: Option<f32>,
@ -3416,6 +3522,8 @@ pub struct PropPhysicsMultiplayer<'a> {
pub shadowcastdist: bool, pub shadowcastdist: bool,
#[serde(default)] #[serde(default)]
pub skin: Option<u8>, pub skin: Option<u8>,
#[serde(default)]
pub solid: Option<u8>,
pub spawnflags: u32, pub spawnflags: u32,
#[serde(default)] #[serde(default)]
pub targetname: Option<&'a str>, pub targetname: Option<&'a str>,
@ -3507,6 +3615,12 @@ pub struct PropRagdoll<'a> {
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub fadescale: bool, pub fadescale: bool,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub maxdxlevel: bool,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub mindxlevel: bool,
pub model: &'a str, pub model: &'a str,
#[serde(default)] #[serde(default)]
pub modelscale: Option<f32>, pub modelscale: Option<f32>,
@ -3638,6 +3752,7 @@ pub struct TriggerMultiple<'a> {
#[serde(default)] #[serde(default)]
pub speed: Option<u16>, pub speed: Option<u16>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub startdisabled: bool, pub startdisabled: bool,
#[serde(default)] #[serde(default)]
pub target: Option<&'a str>, pub target: Option<&'a str>,
@ -4356,6 +4471,8 @@ pub struct Worldspawn<'a> {
pub coldworld: bool, pub coldworld: bool,
#[serde(default)] #[serde(default)]
pub comment: Option<&'a str>, pub comment: Option<&'a str>,
#[serde(default)]
pub csg_options: Option<&'a str>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub defaultteam: bool, pub defaultteam: bool,
@ -4363,6 +4480,19 @@ pub struct Worldspawn<'a> {
pub detailmaterial: Option<&'a str>, pub detailmaterial: Option<&'a str>,
#[serde(default)] #[serde(default)]
pub detailvbsp: Option<&'a str>, pub detailvbsp: Option<&'a str>,
#[serde(default)]
pub fogcolor: Option<Color>,
#[serde(default)]
pub fogcolor2: Option<Color>,
#[serde(default)]
pub fogdir: Option<Vector>,
#[serde(deserialize_with = "bool_from_int")]
#[serde(default)]
pub fogenable: bool,
#[serde(default)]
pub fogend: Option<f32>,
#[serde(default)]
pub fogstart: Option<u16>,
#[serde(deserialize_with = "bool_from_int")] #[serde(deserialize_with = "bool_from_int")]
#[serde(default)] #[serde(default)]
pub gametitle: bool, pub gametitle: bool,