From 923d4b7d2f470904a165e690112694a4d2a540b7 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 14 Feb 2025 20:20:36 -0800 Subject: [PATCH] increase maps sample size --- src/data/entity/css.rs | 1338 ++++++++++++++++++++++++++++++++++------ 1 file changed, 1154 insertions(+), 184 deletions(-) diff --git a/src/data/entity/css.rs b/src/data/entity/css.rs index 7879c1a..d025c03 100644 --- a/src/data/entity/css.rs +++ b/src/data/entity/css.rs @@ -9,6 +9,9 @@ pub enum Entity<'a> { #[serde(rename = "ambient_generic")] #[serde(borrow)] AmbientGeneric(AmbientGeneric<'a>), + #[serde(rename = "cycler")] + #[serde(borrow)] + Cycler(Cycler<'a>), #[serde(rename = "env_beam")] #[serde(borrow)] EnvBeam(EnvBeam<'a>), @@ -20,6 +23,9 @@ pub enum Entity<'a> { #[serde(rename = "env_entity_maker")] #[serde(borrow)] EnvEntityMaker(EnvEntityMaker<'a>), + #[serde(rename = "env_explosion")] + #[serde(borrow)] + EnvExplosion(EnvExplosion<'a>), #[serde(rename = "env_fade")] #[serde(borrow)] EnvFade(EnvFade<'a>), @@ -28,6 +34,8 @@ pub enum Entity<'a> { #[serde(rename = "env_fire_trail")] #[serde(borrow)] EnvFireTrail(EnvFireTrail<'a>), + #[serde(rename = "env_firesource")] + EnvFiresource(EnvFiresource), #[serde(rename = "env_fog_controller")] #[serde(borrow)] EnvFogController(EnvFogController<'a>), @@ -39,6 +47,15 @@ pub enum Entity<'a> { EnvLaser(EnvLaser<'a>), #[serde(rename = "env_lightglow")] EnvLightglow(EnvLightglow), + #[serde(rename = "env_physexplosion")] + #[serde(borrow)] + EnvPhysexplosion(EnvPhysexplosion<'a>), + #[serde(rename = "env_projectedtexture")] + #[serde(borrow)] + EnvProjectedtexture(EnvProjectedtexture<'a>), + #[serde(rename = "env_screenoverlay")] + #[serde(borrow)] + EnvScreenoverlay(EnvScreenoverlay<'a>), #[serde(rename = "env_shake")] #[serde(borrow)] EnvShake(EnvShake<'a>), @@ -104,6 +121,9 @@ pub enum Entity<'a> { #[serde(rename = "func_buyzone")] #[serde(borrow)] FuncBuyzone(FuncBuyzone<'a>), + #[serde(rename = "func_clip_vphysics")] + #[serde(borrow)] + FuncClipVphysics(FuncClipVphysics<'a>), #[serde(rename = "func_conveyor")] #[serde(borrow)] FuncConveyor(FuncConveyor<'a>), @@ -119,12 +139,24 @@ pub enum Entity<'a> { #[serde(rename = "func_dustmotes")] #[serde(borrow)] FuncDustmotes(FuncDustmotes<'a>), + #[serde(rename = "func_fish_pool")] + #[serde(borrow)] + FuncFishPool(FuncFishPool<'a>), #[serde(rename = "func_illusionary")] #[serde(borrow)] FuncIllusionary(FuncIllusionary<'a>), + #[serde(rename = "func_lod")] + #[serde(borrow)] + FuncLod(FuncLod<'a>), + #[serde(rename = "func_monitor")] + #[serde(borrow)] + FuncMonitor(FuncMonitor<'a>), #[serde(rename = "func_movelinear")] #[serde(borrow)] FuncMovelinear(FuncMovelinear<'a>), + #[serde(rename = "func_occluder")] + #[serde(borrow)] + FuncOccluder(FuncOccluder<'a>), #[serde(rename = "func_physbox")] #[serde(borrow)] FuncPhysbox(FuncPhysbox<'a>), @@ -146,6 +178,9 @@ pub enum Entity<'a> { #[serde(rename = "func_tracktrain")] #[serde(borrow)] FuncTracktrain(FuncTracktrain<'a>), + #[serde(rename = "func_train")] + #[serde(borrow)] + FuncTrain(FuncTrain<'a>), #[serde(rename = "func_wall")] #[serde(borrow)] FuncWall(FuncWall<'a>), @@ -158,12 +193,18 @@ pub enum Entity<'a> { #[serde(rename = "game_player_equip")] #[serde(borrow)] GamePlayerEquip(GamePlayerEquip<'a>), + #[serde(rename = "game_text")] + #[serde(borrow)] + GameText(GameText<'a>), #[serde(rename = "game_ui")] #[serde(borrow)] GameUi(GameUi<'a>), #[serde(rename = "game_weapon_manager")] #[serde(borrow)] GameWeaponManager(GameWeaponManager<'a>), + #[serde(rename = "info_camera_link")] + #[serde(borrow)] + InfoCameraLink(InfoCameraLink<'a>), #[serde(rename = "info_ladder")] InfoLadder(InfoLadder), #[serde(rename = "info_particle_system")] @@ -199,6 +240,18 @@ pub enum Entity<'a> { #[serde(rename = "logic_auto")] #[serde(borrow)] LogicAuto(LogicAuto<'a>), + #[serde(rename = "logic_branch")] + #[serde(borrow)] + LogicBranch(LogicBranch<'a>), + #[serde(rename = "logic_case")] + #[serde(borrow)] + LogicCase(LogicCase<'a>), + #[serde(rename = "logic_compare")] + #[serde(borrow)] + LogicCompare(LogicCompare<'a>), + #[serde(rename = "logic_measure_movement")] + #[serde(borrow)] + LogicMeasureMovement(LogicMeasureMovement<'a>), #[serde(rename = "logic_relay")] #[serde(borrow)] LogicRelay(LogicRelay<'a>), @@ -217,12 +270,39 @@ pub enum Entity<'a> { #[serde(rename = "phys_ballsocket")] #[serde(borrow)] PhysBallsocket(PhysBallsocket<'a>), + #[serde(rename = "phys_constraint")] + #[serde(borrow)] + PhysConstraint(PhysConstraint<'a>), + #[serde(rename = "phys_constraintsystem")] + #[serde(borrow)] + PhysConstraintsystem(PhysConstraintsystem<'a>), + #[serde(rename = "phys_hinge")] + #[serde(borrow)] + PhysHinge(PhysHinge<'a>), + #[serde(rename = "phys_keepupright")] + #[serde(borrow)] + PhysKeepupright(PhysKeepupright<'a>), + #[serde(rename = "phys_lengthconstraint")] + #[serde(borrow)] + PhysLengthconstraint(PhysLengthconstraint<'a>), + #[serde(rename = "phys_pulleyconstraint")] + #[serde(borrow)] + PhysPulleyconstraint(PhysPulleyconstraint<'a>), + #[serde(rename = "phys_ragdollconstraint")] + #[serde(borrow)] + PhysRagdollconstraint(PhysRagdollconstraint<'a>), + #[serde(rename = "phys_thruster")] + #[serde(borrow)] + PhysThruster(PhysThruster<'a>), #[serde(rename = "player_speedmod")] #[serde(borrow)] PlayerSpeedmod(PlayerSpeedmod<'a>), #[serde(rename = "player_weaponstrip")] #[serde(borrow)] PlayerWeaponstrip(PlayerWeaponstrip<'a>), + #[serde(rename = "point_camera")] + #[serde(borrow)] + PointCamera(PointCamera<'a>), #[serde(rename = "point_clientcommand")] #[serde(borrow)] PointClientcommand(PointClientcommand<'a>), @@ -235,9 +315,15 @@ pub enum Entity<'a> { #[serde(rename = "point_template")] #[serde(borrow)] PointTemplate(PointTemplate<'a>), + #[serde(rename = "point_tesla")] + #[serde(borrow)] + PointTesla(PointTesla<'a>), #[serde(rename = "point_viewcontrol")] #[serde(borrow)] PointViewcontrol(PointViewcontrol<'a>), + #[serde(rename = "prop_door_rotating")] + #[serde(borrow)] + PropDoorRotating(PropDoorRotating<'a>), #[serde(rename = "prop_dynamic")] #[serde(borrow)] PropDynamic(PropDynamic<'a>), @@ -275,6 +361,9 @@ pub enum Entity<'a> { #[serde(rename = "trigger_once")] #[serde(borrow)] TriggerOnce(TriggerOnce<'a>), + #[serde(rename = "trigger_proximity")] + #[serde(borrow)] + TriggerProximity(TriggerProximity<'a>), #[serde(rename = "trigger_push")] #[serde(borrow)] TriggerPush(TriggerPush<'a>), @@ -284,8 +373,15 @@ pub enum Entity<'a> { #[serde(rename = "trigger_teleport")] #[serde(borrow)] TriggerTeleport(TriggerTeleport<'a>), + #[serde(rename = "trigger_vphysics_motion")] + #[serde(borrow)] + TriggerVphysicsMotion(TriggerVphysicsMotion<'a>), + #[serde(rename = "trigger_wind")] + #[serde(borrow)] + TriggerWind(TriggerWind<'a>), #[serde(rename = "water_lod_control")] - WaterLodControl(WaterLodControl), + #[serde(borrow)] + WaterLodControl(WaterLodControl<'a>), #[serde(rename = "weapon_ak47")] #[serde(borrow)] WeaponAk47(WeaponAk47<'a>), @@ -293,7 +389,8 @@ pub enum Entity<'a> { #[serde(borrow)] WeaponAwp(WeaponAwp<'a>), #[serde(rename = "weapon_deagle")] - WeaponDeagle(WeaponDeagle), + #[serde(borrow)] + WeaponDeagle(WeaponDeagle<'a>), #[serde(rename = "weapon_elite")] #[serde(borrow)] WeaponElite(WeaponElite<'a>), @@ -359,9 +456,15 @@ pub struct AmbientGeneric<'a> { pub cspinup: bool, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] + pub fadein: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub fadeinsecs: bool, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] + pub fadeout: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub fadeoutsecs: bool, pub health: u8, #[serde(deserialize_with = "bool_from_int")] @@ -399,30 +502,59 @@ pub struct AmbientGeneric<'a> { pub volstart: Option, } #[derive(Debug, Clone, Deserialize)] +pub struct Cycler<'a> { + pub angles: Angles, + #[serde(deserialize_with = "bool_from_int")] + pub disablereceiveshadows: bool, + pub model: &'a str, + pub origin: Vector, + pub renderamt: u8, + pub rendercolor: Color, + #[serde(deserialize_with = "bool_from_int")] + pub skin: bool, + pub spawnflags: u32, +} +#[derive(Debug, Clone, Deserialize)] pub struct EnvBeam<'a> { - pub boltwidth: u8, - pub decalname: &'a str, - pub hdrcolorscale: f32, + pub boltwidth: f32, + #[serde(default)] + pub damage: Option, + #[serde(default)] + pub decalname: Option<&'a str>, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub framestart: bool, + #[serde(default)] + pub hdrcolorscale: Option, pub life: f32, pub lightningend: &'a str, pub lightningstart: &'a str, - pub noiseamplitude: u8, + #[serde(default)] + pub noiseamplitude: Option, pub origin: Vector, - pub radius: u16, + #[serde(default)] + pub parentname: Option<&'a str>, + pub radius: f32, pub renderamt: u8, pub rendercolor: Color, - pub spawnflags: u32, #[serde(deserialize_with = "bool_from_int")] - pub striketime: bool, - pub targetname: &'a str, + #[serde(default)] + pub renderfx: bool, + pub spawnflags: u32, + pub striketime: f32, + #[serde(default)] + pub targetname: Option<&'a str>, pub texture: &'a str, pub texturescroll: u8, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub touchtype: bool, } #[derive(Debug, Clone, Deserialize)] pub struct EnvDetailController { pub angles: Angles, pub fademaxdist: u16, - pub fademindist: u8, + pub fademindist: u16, pub origin: Vector, } #[derive(Debug, Clone, Deserialize)] @@ -453,6 +585,20 @@ pub struct EnvEntityMaker<'a> { pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] +pub struct EnvExplosion<'a> { + pub fireballsprite: &'a str, + pub imagnitude: u8, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub iradiusoverride: bool, + pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, + pub rendermode: u8, + pub spawnflags: u32, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] pub struct EnvFade<'a> { pub duration: f32, pub holdtime: f32, @@ -470,7 +616,7 @@ pub struct EnvFire { #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub firetype: bool, - pub health: u8, + pub health: u16, pub ignitionpoint: u8, pub origin: Vector, pub spawnflags: u32, @@ -485,6 +631,13 @@ pub struct EnvFireTrail<'a> { pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] +pub struct EnvFiresource { + pub firedamage: u8, + pub fireradius: u8, + pub origin: Vector, + pub spawnflags: u32, +} +#[derive(Debug, Clone, Deserialize)] pub struct EnvFogController<'a> { pub angles: Angles, pub farz: i32, @@ -498,17 +651,22 @@ pub struct EnvFogController<'a> { pub fogend: f32, #[serde(default)] pub foglerptime: Option, - pub fogmaxdensity: f32, + #[serde(default)] + pub fogmaxdensity: Option, pub fogstart: f32, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub maxdxlevel: bool, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub mindxlevel: bool, pub origin: Vector, - pub spawnflags: u32, + #[serde(default)] + pub spawnflags: Option, #[serde(default)] pub targetname: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub use_angles: bool, } #[derive(Debug, Clone, Deserialize)] @@ -521,40 +679,104 @@ pub struct EnvHudhint<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct EnvLaser<'a> { + #[serde(default)] + pub angles: Option, #[serde(deserialize_with = "bool_from_int")] - pub damage: bool, + #[serde(default)] + pub current: bool, + pub damage: f32, + #[serde(default)] + pub density: Option, pub dissolvetype: &'a str, + #[serde(default)] + pub frequency: Option, + #[serde(default)] + pub hdrcolorscale: Option, pub lasertarget: &'a str, #[serde(default)] - pub noiseamplitude: Option, + pub noiseamplitude: Option, pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, pub renderamt: u8, pub rendercolor: Color, pub spawnflags: u32, + #[serde(default)] + pub targetname: Option<&'a str>, pub texture: &'a str, pub texturescroll: u8, - pub width: u8, + pub width: f32, } #[derive(Debug, Clone, Deserialize)] pub struct EnvLightglow { pub angles: Angles, - #[serde(deserialize_with = "bool_from_int")] - pub glowproxysize: bool, - pub hdrcolorscale: f32, - pub horizontalglowsize: u8, + pub glowproxysize: f32, + #[serde(default)] + pub hdrcolorscale: Option, + pub horizontalglowsize: u16, pub maxdist: u16, - pub mindist: u8, + pub mindist: u16, pub origin: Vector, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub outermaxdist: bool, pub rendercolor: Color, + #[serde(default)] + pub spawnflags: Option, + pub verticalglowsize: u16, +} +#[derive(Debug, Clone, Deserialize)] +pub struct EnvPhysexplosion<'a> { + pub magnitude: u16, + pub origin: Vector, + pub radius: u16, pub spawnflags: u32, - pub verticalglowsize: u8, + pub targetentityname: &'a str, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] +pub struct EnvProjectedtexture<'a> { + pub angles: Angles, + #[serde(deserialize_with = "bool_from_int")] + pub cameraspace: bool, + #[serde(deserialize_with = "bool_from_int")] + pub enableshadows: bool, + pub farz: u16, + pub lightcolor: LightColor, + pub lightfov: f32, + #[serde(deserialize_with = "bool_from_int")] + pub lightonlytarget: bool, + #[serde(deserialize_with = "bool_from_int")] + pub lightworld: bool, + pub nearz: f32, + pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, + #[serde(deserialize_with = "bool_from_int")] + pub shadowquality: bool, + pub spawnflags: u32, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] +pub struct EnvScreenoverlay<'a> { + pub origin: Vector, + pub overlayname1: &'a str, + pub overlaytime1: f32, + pub overlaytime10: f32, + pub overlaytime2: f32, + pub overlaytime3: f32, + pub overlaytime4: f32, + pub overlaytime5: f32, + pub overlaytime6: f32, + pub overlaytime7: f32, + pub overlaytime8: f32, + pub overlaytime9: f32, + pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] pub struct EnvShake<'a> { pub amplitude: u8, - pub duration: u8, + pub duration: f32, pub frequency: f32, pub origin: Vector, pub radius: u16, @@ -651,8 +873,11 @@ pub struct EnvSoundscapeTriggerable<'a> { pub struct EnvSpark<'a> { pub angles: Angles, pub magnitude: u8, - pub maxdelay: u8, + #[serde(default)] + pub maxdelay: Option, pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, pub spawnflags: u32, #[serde(default)] pub targetname: Option<&'a str>, @@ -660,14 +885,20 @@ pub struct EnvSpark<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct EnvSprite<'a> { + #[serde(default)] + pub _minlight: Option, #[serde(default)] pub angles: Option, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub disablereceiveshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub disableshadows: bool, pub framerate: f32, pub glowproxysize: f32, - pub hdrcolorscale: f32, + #[serde(default)] + pub hdrcolorscale: Option, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub maxdxlevel: bool, @@ -679,7 +910,7 @@ pub struct EnvSprite<'a> { #[serde(default)] pub parentname: Option<&'a str>, pub renderamt: u8, - pub rendercolor: Color, + pub rendercolor: &'a str, #[serde(default)] pub renderfx: Option, #[serde(default)] @@ -716,33 +947,46 @@ pub struct EnvSpritetrail<'a> { pub struct EnvSteam<'a> { pub angles: Angles, pub endsize: u8, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub initialstate: bool, pub jetlength: u16, pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub r#type: bool, pub rate: u8, pub renderamt: u8, pub rendercolor: Color, - pub rollspeed: u8, - pub spawnflags: u32, + #[serde(default)] + pub rollspeed: Option, + #[serde(default)] + pub spawnflags: Option, pub speed: u8, pub spreadspeed: u8, pub startsize: u8, - pub targetname: &'a str, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct EnvSun<'a> { pub angles: Angles, - pub hdrcolorscale: f32, - pub material: &'a str, + #[serde(default)] + pub hdrcolorscale: Option, + #[serde(default)] + pub material: Option<&'a str>, pub origin: Vector, - pub overlaycolor: Color, - pub overlaymaterial: &'a str, - pub overlaysize: i32, + #[serde(default)] + pub overlaycolor: Option<&'a str>, + #[serde(default)] + pub overlaymaterial: Option<&'a str>, + #[serde(default)] + pub overlaysize: Option, #[serde(default)] pub pitch: Option, - pub rendercolor: Color, + pub rendercolor: &'a str, pub size: u8, #[serde(default)] pub target: Option<&'a str>, @@ -790,15 +1034,16 @@ pub struct FilterActivatorName<'a> { #[derive(Debug, Clone, Deserialize)] pub struct FilterDamageType<'a> { pub damagetype: u8, - #[serde(deserialize_with = "bool_from_int")] - pub negated: bool, + pub negated: &'a str, pub origin: Vector, - pub targetname: &'a str, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct FilterMulti<'a> { pub filter01: &'a str, - pub filter02: &'a str, + #[serde(default)] + pub filter02: Option<&'a str>, #[serde(default)] pub filter03: Option<&'a str>, #[serde(default)] @@ -821,6 +1066,8 @@ pub struct FuncAreaportal<'a> { pub startopen: bool, #[serde(default)] pub target: Option<&'a str>, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct FuncAreaportalwindow<'a> { @@ -836,6 +1083,8 @@ pub struct FuncAreaportalwindow<'a> { pub struct FuncBreakable<'a> { #[serde(default)] pub _minlight: Option, + #[serde(default)] + pub angles: Option, #[serde(deserialize_with = "bool_from_int")] pub disablereceiveshadows: bool, #[serde(deserialize_with = "bool_from_int")] @@ -855,28 +1104,31 @@ pub struct FuncBreakable<'a> { pub gibdir: Vector, pub health: u16, pub material: u8, - #[serde(deserialize_with = "bool_from_int")] - pub minhealthdmg: bool, + pub minhealthdmg: u8, pub model: &'a str, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub nodamageforces: bool, + #[serde(default)] + pub onbreak: Option<&'a str>, pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub performancemode: bool, pub physdamagescale: f32, #[serde(deserialize_with = "bool_from_int")] pub pressuredelay: bool, - #[serde(deserialize_with = "bool_from_int")] - pub propdata: bool, + pub propdata: u8, pub renderamt: u8, pub rendercolor: Color, #[serde(deserialize_with = "bool_from_int")] pub renderfx: bool, #[serde(deserialize_with = "bool_from_int")] pub rendermode: bool, - pub spawnflags: u32, + #[serde(default)] + pub spawnflags: Option, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub spawnobject: bool, @@ -906,7 +1158,10 @@ pub struct FuncBrush<'a> { #[serde(deserialize_with = "bool_from_int")] pub solidbsp: bool, pub solidity: u8, - pub spawnflags: u32, + #[serde(default)] + pub spawnflags: Option, + #[serde(default)] + pub speed: Option, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub startdisabled: bool, @@ -915,6 +1170,8 @@ pub struct FuncBrush<'a> { #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub vrad_brush_cast_shadows: bool, + #[serde(default)] + pub wait: Option, } #[derive(Debug, Clone, Deserialize)] pub struct FuncButton<'a> { @@ -934,8 +1191,7 @@ pub struct FuncButton<'a> { #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub locked_sentence: bool, - #[serde(deserialize_with = "bool_from_int")] - pub locked_sound: bool, + pub locked_sound: u8, pub model: &'a str, pub movedir: Vector, #[serde(default)] @@ -944,7 +1200,10 @@ pub struct FuncButton<'a> { pub onin: Option<&'a str>, #[serde(default)] pub onout: Option<&'a str>, - pub onpressed: &'a str, + #[serde(default)] + pub onpressed: Option<&'a str>, + #[serde(default)] + pub onuselocked: Option<&'a str>, pub origin: Vector, #[serde(default)] pub parentname: Option<&'a str>, @@ -971,8 +1230,19 @@ pub struct FuncBuyzone<'a> { pub teamnum: u8, } #[derive(Debug, Clone, Deserialize)] +pub struct FuncClipVphysics<'a> { + pub model: &'a str, + #[serde(default)] + pub spawnflags: Option, + #[serde(default)] + pub targetname: Option<&'a str>, +} +#[derive(Debug, Clone, Deserialize)] pub struct FuncConveyor<'a> { - pub angles: Angles, + #[serde(default)] + pub _minlight: Option, + #[serde(default)] + pub angles: Option, #[serde(deserialize_with = "bool_from_int")] pub disablereceiveshadows: bool, #[serde(deserialize_with = "bool_from_int")] @@ -990,11 +1260,13 @@ pub struct FuncConveyor<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct FuncDoor<'a> { + #[serde(default)] + pub _minlight: Option, #[serde(deserialize_with = "bool_from_int")] pub disablereceiveshadows: bool, #[serde(deserialize_with = "bool_from_int")] pub disableshadows: bool, - pub dmg: u8, + pub dmg: u32, #[serde(deserialize_with = "bool_from_int")] pub forceclosed: bool, #[serde(deserialize_with = "bool_from_int")] @@ -1002,7 +1274,7 @@ pub struct FuncDoor<'a> { #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub ignoredebris: bool, - pub lip: i32, + pub lip: f32, #[serde(deserialize_with = "bool_from_int")] pub locked_sentence: bool, #[serde(deserialize_with = "bool_from_int")] @@ -1014,16 +1286,19 @@ pub struct FuncDoor<'a> { #[serde(default)] pub noise2: Option<&'a str>, #[serde(default)] + pub onclose: Option<&'a str>, + #[serde(default)] pub onfullyclosed: Option<&'a str>, #[serde(default)] pub onfullyopen: Option<&'a str>, + #[serde(default)] + pub onopen: Option<&'a str>, pub origin: Vector, #[serde(default)] pub parentname: Option<&'a str>, pub renderamt: u8, pub rendercolor: Color, - #[serde(deserialize_with = "bool_from_int")] - pub renderfx: bool, + pub renderfx: u8, pub rendermode: u8, pub spawnflags: u32, #[serde(deserialize_with = "bool_from_int")] @@ -1038,19 +1313,22 @@ pub struct FuncDoor<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct FuncDoorRotating<'a> { + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub _minlight: bool, pub angles: Angles, #[serde(deserialize_with = "bool_from_int")] pub disablereceiveshadows: bool, #[serde(deserialize_with = "bool_from_int")] pub disableshadows: bool, pub distance: u8, - #[serde(deserialize_with = "bool_from_int")] - pub dmg: bool, + pub dmg: u32, #[serde(deserialize_with = "bool_from_int")] pub forceclosed: bool, #[serde(deserialize_with = "bool_from_int")] pub health: bool, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub ignoredebris: bool, #[serde(deserialize_with = "bool_from_int")] pub lip: bool, @@ -1059,7 +1337,13 @@ pub struct FuncDoorRotating<'a> { #[serde(deserialize_with = "bool_from_int")] pub loopmovesound: bool, pub model: &'a str, + #[serde(default)] + pub noise1: Option<&'a str>, + #[serde(default)] + pub noise2: Option<&'a str>, pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, pub renderamt: u8, pub rendercolor: Color, #[serde(deserialize_with = "bool_from_int")] @@ -1070,6 +1354,7 @@ pub struct FuncDoorRotating<'a> { pub solidbsp: bool, pub spawnflags: u32, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub spawnpos: bool, pub speed: u8, #[serde(default)] @@ -1107,12 +1392,22 @@ pub struct FuncDustmotes<'a> { pub model: &'a str, pub sizemax: u8, pub sizemin: u8, - pub spawnrate: u8, + pub spawnrate: u16, pub speedmax: u8, #[serde(deserialize_with = "bool_from_int")] pub startdisabled: bool, } #[derive(Debug, Clone, Deserialize)] +pub struct FuncFishPool<'a> { + pub fish_count: u8, + pub max_range: u8, + pub model: &'a str, + pub origin: Vector, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub skin: bool, +} +#[derive(Debug, Clone, Deserialize)] pub struct FuncIllusionary<'a> { #[serde(default)] pub _minlight: Option, @@ -1125,17 +1420,68 @@ pub struct FuncIllusionary<'a> { pub origin: Vector, pub renderamt: u8, pub rendercolor: Color, - #[serde(deserialize_with = "bool_from_int")] - pub renderfx: bool, + pub renderfx: u8, pub rendermode: u8, #[serde(default)] pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] -pub struct FuncMovelinear<'a> { - pub blockdamage: f32, +pub struct FuncLod<'a> { + pub disappeardist: u16, + pub model: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub solid: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct FuncMonitor<'a> { + #[serde(default)] + pub _minlight: Option, #[serde(deserialize_with = "bool_from_int")] pub disablereceiveshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub disableshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub inputfilter: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub invert_exclusion: bool, + pub model: &'a str, + pub origin: Vector, + pub renderamt: u8, + pub rendercolor: Color, + #[serde(deserialize_with = "bool_from_int")] + pub renderfx: bool, + #[serde(deserialize_with = "bool_from_int")] + pub rendermode: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub solidbsp: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub solidity: bool, + pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub startdisabled: bool, + pub target: &'a str, + pub targetname: &'a str, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub vrad_brush_cast_shadows: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct FuncMovelinear<'a> { + #[serde(default)] + pub _minlight: Option, + #[serde(default)] + pub blockdamage: Option, + #[serde(deserialize_with = "bool_from_int")] + pub disablereceiveshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub disableshadows: bool, pub model: &'a str, pub movedir: Vector, pub movedistance: u16, @@ -1162,58 +1508,16 @@ pub struct FuncMovelinear<'a> { pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] -pub struct FuncPhysbox<'a> { - #[serde(deserialize_with = "bool_from_int")] - pub damagetoenablemotion: bool, - #[serde(deserialize_with = "bool_from_int")] - pub damagetype: bool, - #[serde(deserialize_with = "bool_from_int")] - pub disablereceiveshadows: bool, - #[serde(deserialize_with = "bool_from_int")] - pub disableshadows: bool, - #[serde(deserialize_with = "bool_from_int")] - pub explodedamage: bool, - #[serde(deserialize_with = "bool_from_int")] - pub explodemagnitude: bool, - #[serde(deserialize_with = "bool_from_int")] - pub exploderadius: bool, - #[serde(deserialize_with = "bool_from_int")] - pub explosion: bool, - #[serde(deserialize_with = "bool_from_int")] - pub forcetoenablemotion: bool, - pub gibdir: Vector, - #[serde(deserialize_with = "bool_from_int")] - pub health: bool, - #[serde(deserialize_with = "bool_from_int")] - pub massscale: bool, - pub material: u8, +pub struct FuncOccluder<'a> { pub model: &'a str, + pub occludernumber: u8, #[serde(deserialize_with = "bool_from_int")] - pub nodamageforces: bool, - #[serde(deserialize_with = "bool_from_int")] - pub notsolid: bool, - pub origin: Vector, - pub parentname: &'a str, - #[serde(deserialize_with = "bool_from_int")] - pub performancemode: bool, - pub preferredcarryangles: Angles, - #[serde(deserialize_with = "bool_from_int")] - pub pressuredelay: bool, - #[serde(deserialize_with = "bool_from_int")] - pub propdata: bool, - pub renderamt: u8, - pub rendercolor: Color, - #[serde(deserialize_with = "bool_from_int")] - pub renderfx: bool, - #[serde(deserialize_with = "bool_from_int")] - pub rendermode: bool, - pub spawnflags: u32, - #[serde(deserialize_with = "bool_from_int")] - pub spawnobject: bool, + pub startactive: bool, } #[derive(Debug, Clone, Deserialize)] -pub struct FuncPhysboxMultiplayer<'a> { - pub _minlight: u8, +pub struct FuncPhysbox<'a> { + #[serde(default)] + pub _minlight: Option, #[serde(deserialize_with = "bool_from_int")] pub damagetoenablemotion: bool, #[serde(deserialize_with = "bool_from_int")] @@ -1233,8 +1537,7 @@ pub struct FuncPhysboxMultiplayer<'a> { #[serde(deserialize_with = "bool_from_int")] pub forcetoenablemotion: bool, pub gibdir: Vector, - #[serde(deserialize_with = "bool_from_int")] - pub health: bool, + pub health: u16, pub massscale: f32, pub material: u8, pub model: &'a str, @@ -1243,6 +1546,8 @@ pub struct FuncPhysboxMultiplayer<'a> { #[serde(deserialize_with = "bool_from_int")] pub notsolid: bool, pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] pub performancemode: bool, pub preferredcarryangles: Angles, @@ -1258,6 +1563,61 @@ pub struct FuncPhysboxMultiplayer<'a> { pub rendermode: bool, pub spawnflags: u32, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub spawnobject: bool, + #[serde(default)] + pub targetname: Option<&'a str>, +} +#[derive(Debug, Clone, Deserialize)] +pub struct FuncPhysboxMultiplayer<'a> { + #[serde(default)] + pub _minlight: Option, + #[serde(deserialize_with = "bool_from_int")] + pub damagetoenablemotion: bool, + #[serde(deserialize_with = "bool_from_int")] + pub damagetype: bool, + #[serde(deserialize_with = "bool_from_int")] + pub disablereceiveshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + pub disableshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + pub explodedamage: bool, + #[serde(deserialize_with = "bool_from_int")] + pub explodemagnitude: bool, + #[serde(deserialize_with = "bool_from_int")] + pub exploderadius: bool, + #[serde(deserialize_with = "bool_from_int")] + pub explosion: bool, + #[serde(deserialize_with = "bool_from_int")] + pub forcetoenablemotion: bool, + pub gibdir: Vector, + pub health: u8, + pub massscale: f32, + pub material: u8, + pub model: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub nodamageforces: bool, + #[serde(deserialize_with = "bool_from_int")] + pub notsolid: bool, + #[serde(default)] + pub onawakened: Option<&'a str>, + pub origin: Vector, + #[serde(deserialize_with = "bool_from_int")] + pub performancemode: bool, + pub preferredcarryangles: Angles, + #[serde(deserialize_with = "bool_from_int")] + pub pressuredelay: bool, + #[serde(deserialize_with = "bool_from_int")] + pub propdata: bool, + pub renderamt: u8, + pub rendercolor: Color, + #[serde(deserialize_with = "bool_from_int")] + pub renderfx: bool, + #[serde(deserialize_with = "bool_from_int")] + pub rendermode: bool, + pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub spawnobject: bool, pub targetname: &'a str, } @@ -1265,13 +1625,15 @@ pub struct FuncPhysboxMultiplayer<'a> { pub struct FuncPrecipitation<'a> { pub model: &'a str, pub preciptype: u8, - pub renderamt: u8, + pub renderamt: u16, pub rendercolor: Color, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct FuncRotButton<'a> { pub angles: Angles, - pub distance: u8, + pub distance: i32, #[serde(deserialize_with = "bool_from_int")] pub health: bool, pub model: &'a str, @@ -1281,23 +1643,25 @@ pub struct FuncRotButton<'a> { pub spawnflags: u32, pub speed: u8, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub startdisabled: bool, - pub targetname: &'a str, - pub wait: u8, + #[serde(default)] + pub targetname: Option<&'a str>, + pub wait: i32, } #[derive(Debug, Clone, Deserialize)] pub struct FuncRotating<'a> { #[serde(default)] pub _minlight: Option, pub angles: Angles, - #[serde(deserialize_with = "bool_from_int")] - pub disablereceiveshadows: bool, - #[serde(deserialize_with = "bool_from_int")] + pub disablereceiveshadows: &'a str, #[serde(default)] - pub disableshadows: bool, + pub disableshadows: Option<&'a str>, pub dmg: f32, pub fanfriction: f32, pub maxspeed: f32, + #[serde(default)] + pub message: Option<&'a str>, pub model: &'a str, pub origin: Vector, #[serde(default)] @@ -1331,6 +1695,9 @@ pub struct FuncSmokevolume<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct FuncTracktrain<'a> { + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub _minlight: bool, #[serde(deserialize_with = "bool_from_int")] pub bank: bool, #[serde(deserialize_with = "bool_from_int")] @@ -1340,8 +1707,18 @@ pub struct FuncTracktrain<'a> { #[serde(deserialize_with = "bool_from_int")] pub dmg: bool, pub height: u8, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub manualaccelspeed: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub manualdecelspeed: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub manualspeedchanges: bool, pub model: &'a str, - pub movesound: &'a str, + #[serde(default)] + pub movesound: Option<&'a str>, pub movesoundmaxpitch: u8, #[serde(deserialize_with = "bool_from_int")] pub movesoundmaxtime: bool, @@ -1359,7 +1736,11 @@ pub struct FuncTracktrain<'a> { pub rendermode: bool, pub spawnflags: u32, pub speed: u16, + #[serde(default)] + pub startsound: Option<&'a str>, pub startspeed: u16, + #[serde(default)] + pub stopsound: Option<&'a str>, pub target: &'a str, pub targetname: &'a str, #[serde(deserialize_with = "bool_from_int")] @@ -1368,28 +1749,59 @@ pub struct FuncTracktrain<'a> { pub wheels: u8, } #[derive(Debug, Clone, Deserialize)] -pub struct FuncWall<'a> { +pub struct FuncTrain<'a> { + pub _minlight: f32, #[serde(deserialize_with = "bool_from_int")] pub disablereceiveshadows: bool, #[serde(deserialize_with = "bool_from_int")] pub disableshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + pub dmg: bool, pub model: &'a str, + pub origin: Vector, pub renderamt: u8, pub rendercolor: Color, #[serde(deserialize_with = "bool_from_int")] pub renderfx: bool, - pub rendermode: u8, + #[serde(deserialize_with = "bool_from_int")] + pub rendermode: bool, + pub spawnflags: u32, + pub speed: u16, + pub target: &'a str, + pub targetname: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub texframeindex: bool, + pub volume: f32, } #[derive(Debug, Clone, Deserialize)] -pub struct FuncWallToggle<'a> { - #[serde(deserialize_with = "bool_from_int")] +pub struct FuncWall<'a> { #[serde(default)] - pub _minlight: bool, + pub _minlight: Option, #[serde(deserialize_with = "bool_from_int")] pub disablereceiveshadows: bool, #[serde(deserialize_with = "bool_from_int")] pub disableshadows: bool, pub model: &'a str, + #[serde(default)] + pub origin: Option, + pub renderamt: u8, + pub rendercolor: Color, + pub renderfx: u8, + pub rendermode: u8, + #[serde(default)] + pub targetname: Option<&'a str>, +} +#[derive(Debug, Clone, Deserialize)] +pub struct FuncWallToggle<'a> { + #[serde(default)] + pub _minlight: Option, + #[serde(deserialize_with = "bool_from_int")] + pub disablereceiveshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + pub disableshadows: bool, + pub model: &'a str, + #[serde(default)] + pub origin: Option, pub renderamt: u8, pub rendercolor: Color, pub renderfx: u8, @@ -1408,8 +1820,10 @@ pub struct FuncWaterAnalog<'a> { #[serde(default)] pub disableshadows: bool, pub model: &'a str, - pub movedir: Vector, - pub movedistance: u8, + #[serde(default)] + pub movedir: Option, + #[serde(default)] + pub movedistance: Option, pub origin: Vector, #[serde(default)] pub parentname: Option<&'a str>, @@ -1420,17 +1834,32 @@ pub struct FuncWaterAnalog<'a> { #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub renderfx: bool, - #[serde(deserialize_with = "bool_from_int")] #[serde(default)] - pub rendermode: bool, - pub speed: u8, + pub rendermode: Option, + #[serde(default)] + pub speed: Option, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub startposition: bool, + #[serde(default)] + pub targetname: Option<&'a str>, pub waveheight: f32, } #[derive(Debug, Clone, Deserialize)] pub struct GamePlayerEquip<'a> { + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub ammo_338mag: bool, + #[serde(default)] + pub ammo_45acp: Option, + #[serde(default)] + pub ammo_50ae: Option, + #[serde(default)] + pub ammo_762mm: Option, + #[serde(default)] + pub ammo_9mm: Option, + #[serde(default)] + pub ammo_buckshot: Option, #[serde(default)] pub item_assaultsuit: Option, pub origin: Vector, @@ -1443,17 +1872,47 @@ pub struct GamePlayerEquip<'a> { pub weapon_awp: bool, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] + pub weapon_deagle: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub weapon_glock: bool, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub weapon_hegrenade: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub weapon_knife: bool, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] + pub weapon_m3: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub weapon_p90: bool, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] + pub weapon_scout: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub weapon_usp: bool, } #[derive(Debug, Clone, Deserialize)] +pub struct GameText<'a> { + pub channel: u8, + pub color: Color, + pub color2: Color, + pub effect: u8, + pub fadein: f32, + pub fadeout: f32, + pub fxtime: f32, + pub holdtime: u8, + pub message: &'a str, + pub origin: Vector, + pub spawnflags: u32, + pub targetname: &'a str, + pub x: i32, + pub y: f32, +} +#[derive(Debug, Clone, Deserialize)] pub struct GameUi<'a> { pub fieldofview: f32, pub origin: Vector, @@ -1479,6 +1938,12 @@ pub struct GameWeaponManager<'a> { pub weaponname: &'a str, } #[derive(Debug, Clone, Deserialize)] +pub struct InfoCameraLink<'a> { + pub origin: Vector, + pub pointcamera: &'a str, + pub target: &'a str, +} +#[derive(Debug, Clone, Deserialize)] pub struct InfoLadder { #[serde(rename = "maxs.x")] pub maxs_x: f32, @@ -1514,6 +1979,10 @@ pub struct InfoParticleSystem<'a> { #[serde(deserialize_with = "bool_from_int")] pub flag_as_weather: bool, pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, + #[serde(default)] + pub spawnflags: Option, #[serde(deserialize_with = "bool_from_int")] pub start_active: bool, #[serde(default)] @@ -1528,7 +1997,8 @@ pub struct InfoPlayerCounterterrorist { pub struct InfoPlayerStart { pub angles: Angles, pub origin: Vector, - pub spawnflags: u32, + #[serde(default)] + pub spawnflags: Option, } #[derive(Debug, Clone, Deserialize)] pub struct InfoPlayerTerrorist { @@ -1541,24 +2011,30 @@ pub struct InfoTarget<'a> { pub origin: Vector, #[serde(default)] pub spawnflags: Option, - pub targetname: &'a str, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct InfoTeleportDestination<'a> { pub angles: Angles, pub origin: Vector, - pub targetname: &'a str, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct Infodecal<'a> { #[serde(default)] pub angles: Option, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub lowpriority: bool, pub origin: Vector, pub texture: &'a str, } #[derive(Debug, Clone, Deserialize)] pub struct KeyframeRope<'a> { - pub angles: Angles, + #[serde(default)] + pub angles: Option, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub barbed: bool, @@ -1590,7 +2066,7 @@ pub struct KeyframeRope<'a> { #[serde(default)] pub r#type: bool, pub ropematerial: &'a str, - pub slack: u8, + pub slack: f32, #[serde(default)] pub spawnflags: Option, pub subdiv: u8, @@ -1607,18 +2083,22 @@ pub struct Light<'a> { pub _distance: Option, #[serde(default)] pub _fifty_percent_distance: Option, - #[serde(deserialize_with = "bool_from_int")] #[serde(default)] - pub _hardfalloff: bool, + pub _hardfalloff: Option, pub _light: &'a str, pub _lighthdr: &'a str, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub _lightscalehdr: bool, #[serde(default)] pub _linear_attn: Option, pub _quadratic_attn: f32, #[serde(default)] pub _zero_percent_distance: Option, + #[serde(default)] + pub defaultstyle: Option, + #[serde(default)] + pub ontimer: Option<&'a str>, pub origin: Vector, #[serde(default)] pub spawnflags: Option, @@ -1643,13 +2123,17 @@ pub struct LightEnvironment<'a> { pub origin: Vector, #[serde(default)] pub pitch: Option, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub style: bool, #[serde(default)] pub sunspreadangle: Option, } #[derive(Debug, Clone, Deserialize)] pub struct LightSpot<'a> { pub _cone: u8, - pub _constant_attn: f32, + #[serde(default)] + pub _constant_attn: Option, #[serde(default)] pub _distance: Option, pub _exponent: f32, @@ -1662,22 +2146,28 @@ pub struct LightSpot<'a> { pub _light: LightColor, pub _lighthdr: &'a str, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub _lightscalehdr: bool, - pub _linear_attn: f32, + #[serde(default)] + pub _linear_attn: Option, #[serde(deserialize_with = "bool_from_int")] pub _quadratic_attn: bool, #[serde(default)] pub _zero_percent_distance: Option, pub angles: Angles, pub origin: Vector, - pub pitch: i32, + pub pitch: f32, #[serde(default)] pub spawnflags: Option, #[serde(default)] pub style: Option, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct LogicAuto<'a> { + #[serde(default)] + pub onloadgame: Option<&'a str>, pub onmapspawn: &'a str, #[serde(default)] pub onnewgame: Option<&'a str>, @@ -1685,10 +2175,73 @@ pub struct LogicAuto<'a> { pub spawnflags: u32, } #[derive(Debug, Clone, Deserialize)] +pub struct LogicBranch<'a> { + #[serde(deserialize_with = "bool_from_int")] + pub initialvalue: bool, + #[serde(default)] + pub onfalse: Option<&'a str>, + pub ontrue: &'a str, + pub origin: Vector, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] +pub struct LogicCase<'a> { + #[serde(default)] + pub case01: Option, + #[serde(default)] + pub case02: Option, + #[serde(default)] + pub case03: Option, + #[serde(default)] + pub case04: Option, + #[serde(default)] + pub case05: Option, + pub oncase01: &'a str, + pub oncase02: &'a str, + pub oncase03: &'a str, + #[serde(default)] + pub oncase04: Option<&'a str>, + #[serde(default)] + pub oncase05: Option<&'a str>, + #[serde(default)] + pub oncase06: Option<&'a str>, + #[serde(default)] + pub oncase07: Option<&'a str>, + #[serde(default)] + pub oncase08: Option<&'a str>, + pub origin: Vector, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] +pub struct LogicCompare<'a> { + #[serde(deserialize_with = "bool_from_int")] + pub comparevalue: bool, + pub ongreaterthan: &'a str, + pub origin: Vector, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] +pub struct LogicMeasureMovement<'a> { + pub measurereference: &'a str, + pub measuretarget: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub measuretype: bool, + pub origin: Vector, + pub target: &'a str, + pub targetname: &'a str, + pub targetreference: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub targetscale: bool, +} +#[derive(Debug, Clone, Deserialize)] pub struct LogicRelay<'a> { pub ontrigger: &'a str, pub origin: Vector, - pub spawnflags: u32, + #[serde(default)] + pub spawnflags: Option, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub startdisabled: bool, pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] @@ -1696,10 +2249,15 @@ pub struct LogicTimer<'a> { #[serde(default)] pub lowerrandombound: Option, pub ontimer: &'a str, + #[serde(default)] + pub ontimerhigh: Option<&'a str>, + #[serde(default)] + pub ontimerlow: Option<&'a str>, pub origin: Vector, #[serde(default)] - pub refiretime: Option, - pub spawnflags: u32, + pub refiretime: Option, + #[serde(default)] + pub spawnflags: Option, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub startdisabled: bool, @@ -1713,12 +2271,14 @@ pub struct LogicTimer<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct MathCounter<'a> { - pub max: u8, + pub max: u16, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub min: bool, pub onhitmax: &'a str, pub origin: Vector, + #[serde(default)] + pub outvalue: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub startdisabled: bool, @@ -1767,7 +2327,8 @@ pub struct MoveRope<'a> { #[serde(default)] pub spawnflags: Option, pub subdiv: u8, - pub targetname: &'a str, + #[serde(default)] + pub targetname: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] pub texturescale: bool, pub width: u8, @@ -1775,12 +2336,20 @@ pub struct MoveRope<'a> { #[derive(Debug, Clone, Deserialize)] pub struct PathTrack<'a> { pub angles: Angles, + #[serde(default)] + pub onpass: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] pub orientationtype: bool, pub origin: Vector, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub radius: bool, #[serde(default)] pub spawnflags: Option, - pub target: &'a str, + #[serde(default)] + pub speed: Option, + #[serde(default)] + pub target: Option<&'a str>, pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] @@ -1790,6 +2359,133 @@ pub struct PhysBallsocket<'a> { pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] +pub struct PhysConstraint<'a> { + pub angles: Angles, + pub constraintsystem: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub forcelimit: bool, + pub origin: Vector, + pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + pub torquelimit: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PhysConstraintsystem<'a> { + #[serde(deserialize_with = "bool_from_int")] + pub additionaliterations: bool, + pub origin: Vector, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PhysHinge<'a> { + pub attach1: &'a str, + #[serde(default)] + pub breaksound: Option<&'a str>, + #[serde(default)] + pub constraintsystem: Option<&'a str>, + #[serde(deserialize_with = "bool_from_int")] + pub forcelimit: bool, + pub hingeaxis: Vector, + pub hingefriction: u16, + pub origin: Vector, + pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + pub systemloadscale: bool, + pub targetname: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub torquelimit: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PhysKeepupright<'a> { + pub angles: Angles, + pub angularlimit: u8, + pub attach1: &'a str, + pub origin: Vector, + pub spawnflags: u32, + #[serde(default)] + pub targetname: Option<&'a str>, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PhysLengthconstraint<'a> { + #[serde(deserialize_with = "bool_from_int")] + pub addlength: bool, + pub angles: Angles, + pub attach1: &'a str, + pub attachpoint: Vector, + pub constraintsystem: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub forcelimit: bool, + #[serde(deserialize_with = "bool_from_int")] + pub minlength: bool, + pub origin: Vector, + pub spawnflags: u32, + #[serde(default)] + pub targetname: Option<&'a str>, + #[serde(deserialize_with = "bool_from_int")] + pub torquelimit: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PhysPulleyconstraint<'a> { + #[serde(deserialize_with = "bool_from_int")] + pub addlength: bool, + pub angles: Angles, + #[serde(default)] + pub attach1: Option<&'a str>, + #[serde(default)] + pub attach2: Option<&'a str>, + #[serde(default)] + pub constraintsystem: Option<&'a str>, + #[serde(deserialize_with = "bool_from_int")] + pub forcelimit: bool, + #[serde(deserialize_with = "bool_from_int")] + pub gearratio: bool, + pub origin: Vector, + pub position2: Vector, + pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + pub torquelimit: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PhysRagdollconstraint<'a> { + pub angles: Angles, + pub attach1: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub forcelimit: bool, + pub origin: Vector, + pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + pub teleportfollowdistance: bool, + #[serde(deserialize_with = "bool_from_int")] + pub torquelimit: bool, + #[serde(deserialize_with = "bool_from_int")] + pub xfriction: bool, + pub xmax: u8, + pub xmin: i32, + #[serde(deserialize_with = "bool_from_int")] + pub yfriction: bool, + pub ymax: u8, + pub ymin: i32, + #[serde(deserialize_with = "bool_from_int")] + pub zfriction: bool, + #[serde(deserialize_with = "bool_from_int")] + pub zmax: bool, + #[serde(deserialize_with = "bool_from_int")] + pub zmin: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PhysThruster<'a> { + pub angles: Angles, + pub attach1: &'a str, + pub force: u16, + #[serde(deserialize_with = "bool_from_int")] + pub forcetime: bool, + pub origin: Vector, + #[serde(default)] + pub parentname: Option<&'a str>, + pub spawnflags: u32, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] pub struct PlayerSpeedmod<'a> { pub origin: Vector, #[serde(default)] @@ -1802,6 +2498,24 @@ pub struct PlayerWeaponstrip<'a> { pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] +pub struct PointCamera<'a> { + pub angles: Angles, + pub fogcolor: Color, + pub fogend: u16, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub fogmaxdensity: bool, + pub fogstart: u16, + pub fov: u8, + pub origin: Vector, + #[serde(default)] + pub spawnflags: Option, + pub targetname: &'a str, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub usescreenaspectratio: bool, +} +#[derive(Debug, Clone, Deserialize)] pub struct PointClientcommand<'a> { pub origin: Vector, pub targetname: &'a str, @@ -1817,7 +2531,8 @@ pub struct PointSpotlight<'a> { #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub disablereceiveshadows: bool, - pub hdrcolorscale: f32, + #[serde(default)] + pub hdrcolorscale: Option, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub maxdxlevel: bool, @@ -1825,14 +2540,16 @@ pub struct PointSpotlight<'a> { #[serde(default)] pub mindxlevel: bool, pub origin: Vector, - pub renderamt: u8, + #[serde(default)] + pub parentname: Option<&'a str>, + #[serde(default)] + pub renderamt: Option, pub rendercolor: Color, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub renderfx: bool, - #[serde(deserialize_with = "bool_from_int")] #[serde(default)] - pub rendermode: bool, + pub rendermode: Option, pub spawnflags: u32, pub spotlightlength: f32, pub spotlightwidth: f32, @@ -1841,10 +2558,43 @@ pub struct PointSpotlight<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct PointTemplate<'a> { + #[serde(default)] + pub boltwidth: Option, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub damage: bool, + #[serde(default)] + pub decalname: Option<&'a str>, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub framerate: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub framestart: bool, + #[serde(default)] + pub hdrcolorscale: Option, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub life: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub noiseamplitude: bool, #[serde(default)] pub onentityspawned: Option<&'a str>, pub origin: Vector, + #[serde(default)] + pub radius: Option, + #[serde(default)] + pub renderamt: Option, + #[serde(default)] + pub rendercolor: Option, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub renderfx: bool, pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub striketime: bool, pub targetname: &'a str, pub template01: &'a str, #[serde(default)] @@ -1855,6 +2605,30 @@ pub struct PointTemplate<'a> { pub template04: Option<&'a str>, #[serde(default)] pub template05: Option<&'a str>, + #[serde(default)] + pub texture: Option<&'a str>, + #[serde(default)] + pub texturescroll: Option, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub touchtype: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PointTesla<'a> { + pub beamcount_max: u8, + pub beamcount_min: u8, + pub interval_max: u8, + pub interval_min: f32, + pub lifetime_max: f32, + pub lifetime_min: f32, + pub m_color: Color, + pub m_flradius: u8, + pub m_soundname: &'a str, + pub origin: Vector, + pub targetname: &'a str, + pub texture: &'a str, + pub thick_max: u8, + pub thick_min: u8, } #[derive(Debug, Clone, Deserialize)] pub struct PointViewcontrol<'a> { @@ -1876,8 +2650,40 @@ pub struct PointViewcontrol<'a> { pub wait: f32, } #[derive(Debug, Clone, Deserialize)] -pub struct PropDynamic<'a> { +pub struct PropDoorRotating<'a> { + pub ajarangles: Angles, pub angles: Angles, + pub axis: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub disableshadows: bool, + pub distance: u8, + #[serde(deserialize_with = "bool_from_int")] + pub forceclosed: bool, + #[serde(deserialize_with = "bool_from_int")] + pub hardware: bool, + pub model: &'a str, + pub onclose: &'a str, + pub onopen: &'a str, + #[serde(deserialize_with = "bool_from_int")] + pub opendir: bool, + pub origin: Vector, + pub returndelay: u8, + pub skin: u8, + pub soundcloseoverride: &'a str, + pub soundmoveoverride: &'a str, + pub soundopenoverride: &'a str, + pub spawnflags: u32, + pub speed: u8, + pub targetname: &'a str, +} +#[derive(Debug, Clone, Deserialize)] +pub struct PropDynamic<'a> { + #[serde(default)] + pub _minlight: Option, + pub angles: Angles, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub body: bool, #[serde(default)] pub defaultanim: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] @@ -1896,8 +2702,8 @@ pub struct PropDynamic<'a> { #[serde(default)] pub exploderadius: bool, #[serde(default)] - pub fademaxdist: Option, - pub fademindist: i32, + pub fademaxdist: Option, + pub fademindist: f32, #[serde(deserialize_with = "bool_from_int")] pub fadescale: bool, pub maxanimtime: u8, @@ -1911,6 +2717,8 @@ pub struct PropDynamic<'a> { pub model: &'a str, #[serde(default)] pub modelscale: Option, + #[serde(default)] + pub ontakedamage: Option<&'a str>, pub origin: Vector, #[serde(default)] pub parentname: Option<&'a str>, @@ -1947,6 +2755,8 @@ pub struct PropDynamic<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct PropDynamicOverride<'a> { + #[serde(default)] + pub _minlight: Option, pub angles: Angles, #[serde(default)] pub defaultanim: Option<&'a str>, @@ -1983,7 +2793,8 @@ pub struct PropDynamicOverride<'a> { #[serde(default)] pub mindxlevel: bool, pub model: &'a str, - pub modelscale: f32, + #[serde(default)] + pub modelscale: Option, pub origin: Vector, #[serde(default)] pub parentname: Option<&'a str>, @@ -2035,7 +2846,7 @@ pub struct PropPhysics<'a> { #[serde(deserialize_with = "bool_from_int")] pub exploderadius: bool, pub fademaxdist: u16, - pub fademindist: u16, + pub fademindist: i32, #[serde(deserialize_with = "bool_from_int")] pub fadescale: bool, #[serde(deserialize_with = "bool_from_int")] @@ -2047,8 +2858,7 @@ pub struct PropPhysics<'a> { pub maxdxlevel: bool, #[serde(deserialize_with = "bool_from_int")] pub mindxlevel: bool, - #[serde(deserialize_with = "bool_from_int")] - pub minhealthdmg: bool, + pub minhealthdmg: u8, pub model: &'a str, #[serde(deserialize_with = "bool_from_int")] pub nodamageforces: bool, @@ -2069,11 +2879,18 @@ pub struct PropPhysics<'a> { #[serde(deserialize_with = "bool_from_int")] pub skin: bool, pub spawnflags: u32, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct PropPhysicsMultiplayer<'a> { + #[serde(default)] + pub _minlight: Option, pub angles: Angles, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub body: bool, + #[serde(deserialize_with = "bool_from_int")] pub damagetoenablemotion: bool, #[serde(deserialize_with = "bool_from_int")] pub damagetype: bool, @@ -2092,7 +2909,7 @@ pub struct PropPhysicsMultiplayer<'a> { pub fadescale: bool, pub forcetoenablemotion: u16, pub inertiascale: f32, - pub massscale: u8, + pub massscale: f32, #[serde(deserialize_with = "bool_from_int")] pub maxdxlevel: bool, #[serde(deserialize_with = "bool_from_int")] @@ -2101,9 +2918,13 @@ pub struct PropPhysicsMultiplayer<'a> { pub minhealthdmg: bool, pub model: &'a str, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub nodamageforces: bool, + #[serde(default)] + pub onbreak: Option<&'a str>, pub origin: Vector, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub performancemode: bool, pub physdamagescale: f32, #[serde(default)] @@ -2119,10 +2940,13 @@ pub struct PropPhysicsMultiplayer<'a> { #[serde(default)] pub rendermode: bool, #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] pub shadowcastdist: bool, #[serde(deserialize_with = "bool_from_int")] pub skin: bool, pub spawnflags: u32, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct PropPhysicsOverride<'a> { @@ -2259,8 +3083,13 @@ pub struct TriggerHurt<'a> { pub damagecap: f32, #[serde(deserialize_with = "bool_from_int")] pub damagemodel: bool, - pub damagetype: u8, + pub damagetype: u16, pub model: &'a str, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub nodmgforce: bool, + #[serde(default)] + pub onstarttouch: Option<&'a str>, pub origin: Vector, pub spawnflags: u32, #[serde(deserialize_with = "bool_from_int")] @@ -2288,7 +3117,8 @@ pub struct TriggerMultiple<'a> { pub angles: Option, #[serde(default)] pub filtername: Option<&'a str>, - pub model: &'a str, + #[serde(default)] + pub model: Option<&'a str>, #[serde(default)] pub onendtouch: Option<&'a str>, #[serde(default)] @@ -2302,6 +3132,8 @@ pub struct TriggerMultiple<'a> { #[serde(default)] pub parentname: Option<&'a str>, pub spawnflags: u32, + #[serde(default)] + pub speed: Option, #[serde(deserialize_with = "bool_from_int")] pub startdisabled: bool, #[serde(default)] @@ -2315,11 +3147,25 @@ pub struct TriggerOnce<'a> { #[serde(default)] pub angles: Option, pub model: &'a str, + #[serde(default)] + pub onstarttouch: Option<&'a str>, pub ontrigger: &'a str, pub origin: Vector, pub spawnflags: u32, #[serde(deserialize_with = "bool_from_int")] pub startdisabled: bool, + #[serde(default)] + pub wait: Option, +} +#[derive(Debug, Clone, Deserialize)] +pub struct TriggerProximity<'a> { + pub model: &'a str, + pub onstarttouch: &'a str, + pub origin: Vector, + pub radius: u16, + pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + pub startdisabled: bool, } #[derive(Debug, Clone, Deserialize)] pub struct TriggerPush<'a> { @@ -2331,6 +3177,10 @@ pub struct TriggerPush<'a> { #[serde(default)] pub filtername: Option<&'a str>, pub model: &'a str, + #[serde(default)] + pub onendtouch: Option<&'a str>, + #[serde(default)] + pub onstarttouch: Option<&'a str>, pub origin: Vector, #[serde(default)] pub parentname: Option<&'a str>, @@ -2347,6 +3197,8 @@ pub struct TriggerSoundscape<'a> { #[serde(default)] pub angles: Option, pub model: &'a str, + #[serde(default)] + pub onstarttouch: Option<&'a str>, pub origin: Vector, pub soundscape: &'a str, pub spawnflags: u32, @@ -2363,22 +3215,69 @@ pub struct TriggerTeleport<'a> { pub model: Option<&'a str>, #[serde(default)] pub onendtouch: Option<&'a str>, + #[serde(default)] + pub onstarttouch: Option<&'a str>, + #[serde(default)] + pub ontrigger: Option<&'a str>, pub origin: Vector, #[serde(default)] pub parentname: Option<&'a str>, pub spawnflags: u32, + #[serde(default)] + pub speed: Option, #[serde(deserialize_with = "bool_from_int")] pub startdisabled: bool, - pub target: &'a str, + #[serde(default)] + pub target: Option<&'a str>, #[serde(default)] pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] -pub struct WaterLodControl { +pub struct TriggerVphysicsMotion<'a> { + pub model: &'a str, + pub origin: Vector, + pub particletrailendsize: u8, + pub particletraillifetime: u8, + pub particletrailmaterial: &'a str, + pub particletrailstartsize: u8, + #[serde(deserialize_with = "bool_from_int")] + pub setadditionalairdensity: bool, + pub setangvelocitylimit: f32, + pub setangvelocityscale: f32, + pub setgravityscale: f32, + pub setlinearforce: f32, + pub setlinearforceangles: Angles, + pub setvelocitylimit: f32, + pub setvelocitylimitdelta: f32, + pub setvelocityscale: f32, + pub spawnflags: u32, + #[serde(deserialize_with = "bool_from_int")] + pub startdisabled: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct TriggerWind<'a> { + pub angles: Angles, + pub directionnoise: u8, + #[serde(deserialize_with = "bool_from_int")] + pub holdnoise: bool, + #[serde(deserialize_with = "bool_from_int")] + pub holdtime: bool, + pub model: &'a str, + pub origin: Vector, + pub spawnflags: u32, + pub speed: u16, + pub speednoise: u8, + #[serde(deserialize_with = "bool_from_int")] + pub startdisabled: bool, +} +#[derive(Debug, Clone, Deserialize)] +pub struct WaterLodControl<'a> { pub cheapwaterenddistance: f32, pub cheapwaterstartdistance: f32, #[serde(default)] pub origin: Option, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponAk47<'a> { @@ -2387,11 +3286,14 @@ pub struct WeaponAk47<'a> { #[serde(default)] pub onplayerpickup: Option<&'a str>, pub origin: Vector, - pub spawnflags: u32, + #[serde(default)] + pub spawnflags: Option, pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponAwp<'a> { + #[serde(default)] + pub _minlight: Option, #[serde(default)] pub ammo: Option, pub angles: Angles, @@ -2406,16 +3308,21 @@ pub struct WeaponAwp<'a> { pub renderamt: Option, #[serde(default)] pub rendercolor: Option, - pub spawnflags: u32, - pub targetname: &'a str, + #[serde(default)] + pub spawnflags: Option, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] -pub struct WeaponDeagle { - pub ammo: u16, +pub struct WeaponDeagle<'a> { + #[serde(default)] + pub ammo: Option, pub angles: Angles, pub origin: Vector, #[serde(default)] pub spawnflags: Option, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponElite<'a> { @@ -2432,8 +3339,10 @@ pub struct WeaponElite<'a> { pub renderamt: Option, #[serde(default)] pub rendercolor: Option, - pub spawnflags: u32, - pub targetname: &'a str, + #[serde(default)] + pub spawnflags: Option, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponFamas { @@ -2470,13 +3379,19 @@ pub struct WeaponFiveseven<'a> { #[derive(Debug, Clone, Deserialize)] pub struct WeaponFlashbang<'a> { pub angles: Angles, - pub fademaxdist: f32, - pub fademindist: f32, - pub fadescale: f32, + #[serde(default)] + pub fademaxdist: Option, + #[serde(default)] + pub fademindist: Option, + #[serde(default)] + pub fadescale: Option, pub origin: Vector, - pub renderamt: u8, - pub rendercolor: Color, - pub spawnflags: u32, + #[serde(default)] + pub renderamt: Option, + #[serde(default)] + pub rendercolor: Option, + #[serde(default)] + pub spawnflags: Option, pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] @@ -2505,15 +3420,29 @@ pub struct WeaponG3sg1 { } #[derive(Debug, Clone, Deserialize)] pub struct WeaponGlock<'a> { + #[serde(default)] + pub _minlight: Option, pub ammo: u16, pub angles: Angles, pub origin: Vector, + #[serde(default)] + pub renderamt: Option, + #[serde(default)] + pub rendercolor: Option, pub spawnflags: u32, pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponHegrenade<'a> { + #[serde(default)] + pub _minlight: Option, pub angles: Angles, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub disablereceiveshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub disableshadows: bool, #[serde(default)] pub fademaxdist: Option, #[serde(default)] @@ -2550,11 +3479,18 @@ pub struct WeaponHegrenade<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct WeaponKnife<'a> { + #[serde(default)] + pub _minlight: Option, pub angles: Angles, pub onplayerpickup: &'a str, pub origin: Vector, + #[serde(default)] + pub renderamt: Option, + #[serde(default)] + pub rendercolor: Option, pub spawnflags: u32, - pub targetname: &'a str, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponM249<'a> { @@ -2571,8 +3507,10 @@ pub struct WeaponM249<'a> { pub renderamt: Option, #[serde(default)] pub rendercolor: Option, - pub spawnflags: u32, - pub targetname: &'a str, + #[serde(default)] + pub spawnflags: Option, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponM3<'a> { @@ -2616,7 +3554,8 @@ pub struct WeaponM4a1<'a> { #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub shadowcastdist: bool, - pub spawnflags: u32, + #[serde(default)] + pub spawnflags: Option, #[serde(default)] pub targetname: Option<&'a str>, } @@ -2683,9 +3622,17 @@ pub struct WeaponP90<'a> { } #[derive(Debug, Clone, Deserialize)] pub struct WeaponScout<'a> { + #[serde(default)] + pub _minlight: Option, #[serde(default)] pub ammo: Option, pub angles: Angles, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub disablereceiveshadows: bool, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub disableshadows: bool, #[serde(default)] pub fademaxdist: Option, #[serde(default)] @@ -2699,8 +3646,14 @@ pub struct WeaponScout<'a> { pub renderamt: Option, #[serde(default)] pub rendercolor: Option, - pub spawnflags: u32, - pub targetname: &'a str, + #[serde(default)] + pub renderfx: Option, + #[serde(default)] + pub rendermode: Option, + #[serde(default)] + pub spawnflags: Option, + #[serde(default)] + pub targetname: Option<&'a str>, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponSg550 { @@ -2730,7 +3683,8 @@ pub struct WeaponSg550 { pub struct WeaponSmokegrenade<'a> { pub angles: Angles, pub origin: Vector, - pub spawnflags: u32, + #[serde(default)] + pub spawnflags: Option, pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] @@ -2783,15 +3737,24 @@ pub struct WeaponUmp45 { } #[derive(Debug, Clone, Deserialize)] pub struct WeaponUsp<'a> { - pub ammo: u16, + #[serde(default)] + pub _minlight: Option, + #[serde(default)] + pub ammo: Option, pub angles: Angles, + #[serde(default)] + pub onplayerpickup: Option<&'a str>, pub origin: Vector, + #[serde(default)] + pub renderamt: Option, + #[serde(default)] + pub rendercolor: Option, pub spawnflags: u32, pub targetname: &'a str, } #[derive(Debug, Clone, Deserialize)] pub struct WeaponXm1014<'a> { - pub ammo: u16, + pub ammo: u32, pub angles: Angles, #[serde(default)] pub fademaxdist: Option, @@ -2830,6 +3793,8 @@ pub struct WeaponXm1014<'a> { pub struct Worldspawn<'a> { #[serde(default)] pub _minlight: Option, + #[serde(default)] + pub chaptertitle: Option<&'a str>, #[serde(deserialize_with = "bool_from_int")] #[serde(default)] pub coldworld: bool, @@ -2843,9 +3808,14 @@ pub struct Worldspawn<'a> { pub maxoccludeearea: Option, pub maxpropscreenwidth: f32, #[serde(default)] + pub message: Option<&'a str>, + #[serde(default)] pub minoccluderarea: Option, #[serde(default)] pub minpropscreenwidth: Option, + #[serde(deserialize_with = "bool_from_int")] + #[serde(default)] + pub no_decomp: bool, pub skyname: &'a str, #[serde(deserialize_with = "bool_from_int")] #[serde(default)]