From 72ff220f3efe944211511964c09d3dbe68798fcb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com>
Date: Wed, 21 Oct 2026 18:03:41 +0300
Subject: [PATCH 01/12] Fix weapon local data tables sending the field instead
of the weapon
---
Game.Shared/BaseCombatWeaponShared.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Game.Shared/BaseCombatWeaponShared.cs b/Game.Shared/BaseCombatWeaponShared.cs
index 8c1457e8..e1fc9d8a 100644
--- a/Game.Shared/BaseCombatWeaponShared.cs
+++ b/Game.Shared/BaseCombatWeaponShared.cs
@@ -229,8 +229,8 @@ private static void RecvProxy_WeaponState(ref readonly RecvProxyData data, objec
if (weapon != null) {
BasePlayer? player = ToBasePlayer(weapon.GetOwner());
if (player != null) {
- // recipients.SetOnly(player.GetClientIndex());
- return data;
+ recipients.SetOnly(player.EntIndex() - 1);
+ return instance;
}
}
@@ -241,8 +241,8 @@ private static void RecvProxy_WeaponState(ref readonly RecvProxyData data, objec
if (weapon != null) {
BasePlayer? player = ToBasePlayer(weapon.GetOwner());
if (player != null) {
- // recipients.SetOnly(player.GetClientIndex());
- return data;
+ recipients.SetOnly(player.EntIndex() - 1);
+ return instance;
}
}
From 9e1e4db383446f4d61bd666d298ab7a1222e9cca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com>
Date: Wed, 21 Oct 2026 18:11:27 +0300
Subject: [PATCH 02/12] Fix server never updating carried weapon state
---
Game.Server/Player.cs | 5 +++++
Game.Shared/BaseCombatWeaponShared.cs | 11 +----------
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/Game.Server/Player.cs b/Game.Server/Player.cs
index 82343051..44fb2a78 100644
--- a/Game.Server/Player.cs
+++ b/Game.Server/Player.cs
@@ -2248,6 +2248,11 @@ public virtual void UpdateClientData() {
// todo
+ for (int i = 0; i < WeaponCount(); i++) {
+ if (GetWeapon(i) != null)
+ GetWeapon(i)!.UpdateClientData(this);
+ }
+
// g_pGameRules.UpdateClientData(this);
}
diff --git a/Game.Shared/BaseCombatWeaponShared.cs b/Game.Shared/BaseCombatWeaponShared.cs
index e1fc9d8a..87227d8b 100644
--- a/Game.Shared/BaseCombatWeaponShared.cs
+++ b/Game.Shared/BaseCombatWeaponShared.cs
@@ -381,16 +381,7 @@ public struct PoseParamTable
public virtual int DrawOverriddenViewmodel(BaseViewModel viewmodel, StudioFlags flags) => 0;
public virtual void ViewModelDrawn(BaseViewModel viewmodelflags) { }
public virtual int UpdateClientData(BasePlayer player) {
- WeaponState iNewState = WeaponState.IsCarriedByPlayer;
-
- if (player.GetActiveWeapon() == this) {
- if (player.OnTarget)
- iNewState = WeaponState.IsOnTarget;
- else
- iNewState = WeaponState.IsActive;
- }
- else
- iNewState = WeaponState.IsCarriedByPlayer;
+ WeaponState iNewState = player.GetActiveWeapon() == this ? WeaponState.IsActive : WeaponState.IsCarriedByPlayer;
if (State != (int)iNewState) {
int iOldState = State;
From 3121c5044521726ff13cc832f6393635da46f066 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com>
Date: Wed, 21 Oct 2026 18:17:58 +0300
Subject: [PATCH 03/12] Fix client using the observed player's weapon outside
in-eye mode
---
Game.Client/C_BasePlayer.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Game.Client/C_BasePlayer.cs b/Game.Client/C_BasePlayer.cs
index 4fa44cba..a36d5757 100644
--- a/Game.Client/C_BasePlayer.cs
+++ b/Game.Client/C_BasePlayer.cs
@@ -815,7 +815,7 @@ protected override bool ShouldInterpolate() {
public override BaseCombatWeapon? GetActiveWeapon() {
BasePlayer fromPlayer = this;
- if (fromPlayer == GetLocalPlayer()) {// observer mode todo
+ if (fromPlayer == GetLocalPlayer() && GetObserverMode() == Shared.ObserverMode.InEye) {
C_BaseEntity? target = ObserverTarget.Get();
if (target != null && target.IsPlayer())
From 16f05087a69f513c25d794e14d0aae1e7d3571a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com>
Date: Wed, 21 Oct 2026 18:28:14 +0300
Subject: [PATCH 04/12] Fix weapon network fields not marking the entity
changed
---
Game.Server/BaseCombatWeapon.cs | 1 +
Game.Shared/BaseCombatWeaponShared.cs | 54 ++++++++++++++++++++++++++-
Source.Common/BaseHandle.cs | 1 +
3 files changed, 55 insertions(+), 1 deletion(-)
diff --git a/Game.Server/BaseCombatWeapon.cs b/Game.Server/BaseCombatWeapon.cs
index 0a983ae4..4166abc9 100644
--- a/Game.Server/BaseCombatWeapon.cs
+++ b/Game.Server/BaseCombatWeapon.cs
@@ -34,6 +34,7 @@ public partial class BaseCombatWeapon : BaseAnimating
public override DataMap? GetDataDescMap() => DataDesc;
public BaseCombatWeapon() {
+ Owner = new();
OnBaseCombatWeaponCreated(this);
}
diff --git a/Game.Shared/BaseCombatWeaponShared.cs b/Game.Shared/BaseCombatWeaponShared.cs
index 87227d8b..2a339111 100644
--- a/Game.Shared/BaseCombatWeaponShared.cs
+++ b/Game.Shared/BaseCombatWeaponShared.cs
@@ -328,39 +328,91 @@ public struct PoseParamTable
}
[NetworkName("m_iClip1")]
+#if CLIENT_DLL
public int iClip1;
+#else
+ [NetworkVar] public partial int iClip1 { get; set; }
+#endif
[NetworkName("m_iClip2")]
+#if CLIENT_DLL
public int iClip2;
+#else
+ [NetworkVar] public partial int iClip2 { get; set; }
+#endif
[NetworkName("m_iPrimaryAmmoType")]
+#if CLIENT_DLL
public int PrimaryAmmoType;
+#else
+ [NetworkVar] public partial int PrimaryAmmoType { get; set; }
+#endif
[NetworkName("m_iSecondaryAmmoType")]
+#if CLIENT_DLL
public int SecondaryAmmoType;
+#else
+ [NetworkVar] public partial int SecondaryAmmoType { get; set; }
+#endif
///
/// View model index (entity offset)
///
[NetworkName("m_nViewModelIndex")]
+#if CLIENT_DLL
public int nViewModelIndex;
+#else
+ [NetworkVar] public partial int nViewModelIndex { get; set; }
+#endif
///
/// View model index (art)
///
[NetworkName("m_iViewModelIndex")]
+#if CLIENT_DLL
public int iViewModelIndex;
+#else
+ [NetworkVar] public partial int iViewModelIndex { get; set; }
+#endif
[NetworkName("m_iWorldModelIndex")]
+#if CLIENT_DLL
public int WorldModelIndex;
+#else
+ [NetworkVar] public partial int WorldModelIndex { get; set; }
+#endif
[NetworkName("m_bFlipViewModel")]
+#if CLIENT_DLL
public bool FlipViewModel;
+#else
+ [NetworkVar] public partial bool FlipViewModel { get; set; }
+#endif
[NetworkName("m_flNextPrimaryAttack")]
+#if CLIENT_DLL
public TimeUnit_t NextPrimaryAttack;
+#else
+ [NetworkVar] public partial TimeUnit_t NextPrimaryAttack { get; set; }
+#endif
[NetworkName("m_flNextSecondaryAttack")]
+#if CLIENT_DLL
public TimeUnit_t NextSecondaryAttack;
+#else
+ [NetworkVar] public partial TimeUnit_t NextSecondaryAttack { get; set; }
+#endif
[NetworkName("m_flTimeWeaponIdle")]
+#if CLIENT_DLL
public TimeUnit_t TimeWeaponIdle;
+#else
+ [NetworkVar] public partial TimeUnit_t TimeWeaponIdle { get; set; }
+#endif
[NetworkName("m_iState")]
+#if CLIENT_DLL
public int State;
+#else
+ [NetworkVar] public partial int State { get; set; }
+#endif
[NetworkName("m_hOwner")]
+#if CLIENT_DLL
public EHANDLE Owner = new();
+#else
+ [NetworkVar] public partial EHANDLE Owner { get; set; }
+#endif
Activity Activity;
int IdealSequence;
@@ -1273,7 +1325,7 @@ public void SetOwner(BaseCombatCharacter? owner) {
SetContextThink(null, 0, HIDEWEAPON_THINK_CONTEXT);
}
- Owner.Set(owner);
+ Owner = EHANDLE.FromEntity(owner);
#if !CLIENT_DLL
// DispatchUpdateTransmitState(); todo
#else
diff --git a/Source.Common/BaseHandle.cs b/Source.Common/BaseHandle.cs
index d6370733..0d871606 100644
--- a/Source.Common/BaseHandle.cs
+++ b/Source.Common/BaseHandle.cs
@@ -50,6 +50,7 @@ public struct Handle : IEquatable>, IEquatable, IBaseHa
public Handle(uint value) => Index = value;
public Handle(in BaseHandle handle) => Index = handle.Index;
public Handle(int entry, int serial) => Index = (uint)(entry | (serial << Constants.NUM_ENT_ENTRY_BITS));
+ public static Handle FromEntity(IHandleEntity? entity) => new(entity != null ? entity.GetRefEHandle().Index : Constants.INVALID_EHANDLE_INDEX);
public readonly int GetEntryIndex() => (int)(Index & Constants.ENT_ENTRY_MASK);
public readonly int GetSerialNumber() => (int)(Index >> Constants.NUM_ENT_ENTRY_BITS);
From cfbef1372e87576261da18b1201634ae9e73abd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com>
Date: Wed, 21 Oct 2026 18:37:09 +0300
Subject: [PATCH 05/12] Fix carried weapons not being transmitted to their
owner
---
Game.Server/BaseCombatCharacter.cs | 22 ++++++++++++++++++++++
Game.Server/BaseCombatWeapon.cs | 8 ++++++++
Game.Shared/BaseCombatWeaponShared.cs | 2 +-
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/Game.Server/BaseCombatCharacter.cs b/Game.Server/BaseCombatCharacter.cs
index 9d78bd25..ebf5a7b1 100644
--- a/Game.Server/BaseCombatCharacter.cs
+++ b/Game.Server/BaseCombatCharacter.cs
@@ -266,6 +266,28 @@ public virtual bool FInViewCone(in Vector3 spot) {
return instance;
}
+ public override void SetTransmit(CheckTransmitInfo info, bool always) {
+ if (info.TransmitEdict.Get(EntIndex()) != 0)
+ return;
+
+ base.SetTransmit(info, always);
+
+ if (info.ClientEnt == Edict()) {
+ for (int i = 0; i < MAX_WEAPONS; i++) {
+ BaseCombatWeapon? weapon = MyWeapons[i].Get();
+ if (weapon == null)
+ continue;
+
+ weapon.SetTransmit(info, always);
+ }
+ }
+ else {
+ BaseCombatWeapon? activeWeapon = ActiveWeapon.Get();
+ if (activeWeapon != null && !activeWeapon.IsEffectActive(EntityEffects.NoDraw))
+ activeWeapon.SetTransmit(info, always);
+ }
+ }
+
public void ClearLastKnownArea() {
// TODO
}
diff --git a/Game.Server/BaseCombatWeapon.cs b/Game.Server/BaseCombatWeapon.cs
index 4166abc9..38a95028 100644
--- a/Game.Server/BaseCombatWeapon.cs
+++ b/Game.Server/BaseCombatWeapon.cs
@@ -3,6 +3,7 @@
using Source;
using Source.Common;
using Source.Common.Commands;
+using Source.Common.Engine;
using Source.Common.Formats.BSP;
using Source.Common.Physics;
@@ -38,6 +39,13 @@ public BaseCombatWeapon() {
OnBaseCombatWeaponCreated(this);
}
+ public override EdictFlags UpdateTransmitState() {
+ if (GetOwner() != null)
+ return SetTransmitState(EdictFlags.PVSCheck);
+
+ return base.UpdateTransmitState();
+ }
+
public override void UpdateOnRemove() {
OnBaseCombatWeaponDestroyed(this);
base.UpdateOnRemove();
diff --git a/Game.Shared/BaseCombatWeaponShared.cs b/Game.Shared/BaseCombatWeaponShared.cs
index 2a339111..a446694a 100644
--- a/Game.Shared/BaseCombatWeaponShared.cs
+++ b/Game.Shared/BaseCombatWeaponShared.cs
@@ -1327,7 +1327,7 @@ public void SetOwner(BaseCombatCharacter? owner) {
Owner = EHANDLE.FromEntity(owner);
#if !CLIENT_DLL
- // DispatchUpdateTransmitState(); todo
+ DispatchUpdateTransmitState();
#else
UpdateVisibility();
#endif
From 51d394f92f160776165a61d417564d9ba5234f2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com>
Date: Wed, 21 Oct 2026 18:47:36 +0300
Subject: [PATCH 06/12] Fix client physics simulation never running think
functions
---
Game.Client/C_BaseEntity.cs | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/Game.Client/C_BaseEntity.cs b/Game.Client/C_BaseEntity.cs
index 7ef1c539..e5bc269b 100644
--- a/Game.Client/C_BaseEntity.cs
+++ b/Game.Client/C_BaseEntity.cs
@@ -2863,11 +2863,14 @@ protected InterpolateResult BaseInterpolatePart1(ref TimeUnit_t currentTime, ref
return InterpolateResult.Continue;
}
- void PhysicsStep() { }
- void PhysicsPusher() { }
- void PhysicsNone() { }
- void PhysicsRigidChild() { }
- void PhysicsNoclip() { }
+ void PhysicsStep() {
+ PhysicsRunThink(ThinkMethods.FireAllButBase);
+ PhysicsRunThink(ThinkMethods.FireBaseOnly);
+ }
+ void PhysicsPusher() => PhysicsRunThink();
+ void PhysicsNone() => PhysicsRunThink();
+ void PhysicsRigidChild() => PhysicsRunThink();
+ void PhysicsNoclip() => PhysicsRunThink();
void PhysicsStepRunTimestep(TimeUnit_t timestep) { }
void PhysicsToss() { }
void PhysicsCustom() { }
From 038e25722276ff9d0250586825a46aff53097eef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com>
Date: Wed, 21 Oct 2026 19:34:04 +0300
Subject: [PATCH 07/12] Fix user command random seed not being set
---
Game.Client/InMain.cs | 3 +++
Game.Shared/UserCmd.cs | 3 +++
2 files changed, 6 insertions(+)
diff --git a/Game.Client/InMain.cs b/Game.Client/InMain.cs
index 305f01b9..d1697698 100644
--- a/Game.Client/InMain.cs
+++ b/Game.Client/InMain.cs
@@ -7,6 +7,7 @@
using Source.Common.Client;
using Source.Common.Commands;
using Source.Common.GUI;
+using Source.Common.Hashing;
using Source.Common.Input;
using Source.Common.Mathematics;
@@ -273,6 +274,8 @@ public void CreateMove(int sequenceNumber, double inputSampleFrametime, bool act
cmd.Buttons |= InButtons.Forward;
else if (cmd.ForwardMove < 0)
cmd.Buttons |= InButtons.Back;
+
+ cmd.RandomSeed = (int)(MD5Value.PseudoRandom((uint)sequenceNumber) & 0x7fffffff);
}
private void ApplyExtras(ref UserCmd cmd) {
diff --git a/Game.Shared/UserCmd.cs b/Game.Shared/UserCmd.cs
index 0a9e5a60..61c75073 100644
--- a/Game.Shared/UserCmd.cs
+++ b/Game.Shared/UserCmd.cs
@@ -1,5 +1,6 @@
using Source;
using Source.Common.Bitbuffers;
+using Source.Common.Hashing;
using Source.Common.Mathematics;
using System.Numerics;
@@ -208,6 +209,8 @@ public static void ReadUsercmd(bf_read buf, ref UserCmd move, ref UserCmd from)
move.WeaponSubtype = (int)buf.ReadUBitLong(WEAPON_SUBTYPE_BITS);
}
+ move.RandomSeed = (int)(MD5Value.PseudoRandom((uint)move.CommandNumber) & 0x7fffffff);
+
if (buf.ReadOneBit() != 0)
move.MouseDeltaX = buf.ReadShort();
From de29fa61fd2631ca8308b494dc9d12ac44b6f911 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com>
Date: Thu, 22 Oct 2026 02:41:53 +0300
Subject: [PATCH 08/12] Generate network tables and prediction maps from
in-class lists
---
Game.Client/C_AI_BaseNPC.cs | 38 +-
Game.Client/C_BaseAnimating.cs | 144 +--
Game.Client/C_BaseAnimatingOverlay.cs | 26 +-
Game.Client/C_BaseBeam.cs | 71 +-
Game.Client/C_BaseCombatCharacter.cs | 54 +-
Game.Client/C_BaseCombatWeapon.cs | 4 +
Game.Client/C_BaseEntity.cs | 486 +++++----
Game.Client/C_BaseFlex.cs | 34 +-
Game.Client/C_BasePlayer.cs | 208 ++--
Game.Client/C_BaseTempEntity.cs | 10 +-
Game.Client/C_BaseViewModel.cs | 34 +-
Game.Client/C_BeamSpotlight.cs | 43 +-
Game.Client/C_BoneFollower.cs | 17 +-
Game.Client/C_BoneManipulate.cs | 25 +-
Game.Client/C_BreakableProp.cs | 8 +-
Game.Client/C_BreakableSurface.cs | 45 +-
Game.Client/C_CitadelEnergyCore.cs | 29 +-
Game.Client/C_ColorCorrection.cs | 51 +-
Game.Client/C_ColorCorrectionVolume.cs | 31 +-
Game.Client/C_DustTrail.cs | 63 +-
Game.Client/C_DynamicLight.cs | 39 +-
Game.Client/C_Embers.cs | 25 +-
Game.Client/C_EntityDissolve.cs | 57 +-
Game.Client/C_EntityFlame.cs | 13 +-
Game.Client/C_EntityParticleTrail.cs | 45 +-
Game.Client/C_EnvAmbientLight.cs | 13 +-
Game.Client/C_EnvDetailController.cs | 19 +-
Game.Client/C_EnvHeadcrabCanister.cs | 93 +-
Game.Client/C_EnvParticleScript.cs | 13 +-
Game.Client/C_EnvProjectedTexture.cs | 65 +-
Game.Client/C_EnvQuadraticBeam.cs | 27 +-
Game.Client/C_EnvScreenEffect.cs | 17 +-
Game.Client/C_EnvScreenOverlay.cs | 34 +-
Game.Client/C_EnvStarfield.cs | 17 +-
Game.Client/C_EnvTonemapController.cs | 38 +-
Game.Client/C_EnvWind.cs | 30 +-
Game.Client/C_FireSmoke.cs | 37 +-
Game.Client/C_FireTrail.cs | 17 +-
Game.Client/C_Fish.cs | 41 +-
Game.Client/C_Flare.cs | 29 +-
Game.Client/C_FleshEffectTarget.cs | 17 +-
Game.Client/C_FlexManipulate.cs | 21 +-
Game.Client/C_FogController.cs | 74 +-
Game.Client/C_FuncAreaPortalWindow.cs | 29 +-
Game.Client/C_FuncConveyor.cs | 14 +-
Game.Client/C_FuncMonitor.cs | 8 +-
Game.Client/C_FuncOccluder.cs | 17 +-
Game.Client/C_FuncReflectiveGlass.cs | 8 +-
Game.Client/C_FuncRotating.cs | 17 +-
Game.Client/C_FuncSmokeVolume.cs | 49 +-
Game.Client/C_FuncTrackTrain.cs | 8 +-
Game.Client/C_Func_Dust.cs | 63 +-
Game.Client/C_Func_LOD.cs | 17 +-
Game.Client/C_InfoOverlayAccessor.cs | 15 +-
Game.Client/C_LightGlow.cs | 50 +-
Game.Client/C_MaterialModifyControl.cs | 57 +-
Game.Client/C_MortarShell.cs | 21 +-
Game.Client/C_MovieExplosion.cs | 7 +-
Game.Client/C_NPC_AntlionGuard.cs | 21 +-
Game.Client/C_NPC_Barnacle.cs | 27 +-
Game.Client/C_NPC_Barney.cs | 9 +-
Game.Client/C_NPC_CombineGunship.cs | 15 +-
Game.Client/C_NPC_Manhack.cs | 21 +-
Game.Client/C_NPC_Portal_FloorTurret.cs | 21 +-
Game.Client/C_NPC_Puppet.cs | 17 +-
Game.Client/C_NPC_RocketTurret.cs | 21 +-
Game.Client/C_NPC_RollerMine.cs | 27 +-
Game.Client/C_NPC_Vortigaunt.cs | 21 +-
Game.Client/C_ParticlePerformanceMonitor.cs | 19 +-
Game.Client/C_ParticleSmokeGrenade.cs | 27 +-
Game.Client/C_ParticleSystem.cs | 50 +-
Game.Client/C_PhysBox.cs | 8 +-
Game.Client/C_PhysMagnet.cs | 8 +-
Game.Client/C_PhysicsProp.cs | 14 +-
Game.Client/C_Plasma.cs | 33 +-
Game.Client/C_PlayerResource.cs | 44 +-
Game.Client/C_PointCamera.cs | 57 +-
Game.Client/C_PointWorldText.cs | 41 +-
Game.Client/C_PoseController.cs | 53 +-
Game.Client/C_Precipitation.cs | 29 +-
Game.Client/C_PrecipitationBlocker.cs | 9 +-
Game.Client/C_PropCrane.cs | 29 +-
Game.Client/C_PropEnergyBall.cs | 17 +-
Game.Client/C_PropJeep.cs | 42 +-
Game.Client/C_PropScalable.cs | 51 +-
Game.Client/C_PropVehicleChoreoGeneric.cs | 70 +-
Game.Client/C_PropVehicleDriveable.cs | 59 +-
Game.Client/C_Props.cs | 82 +-
Game.Client/C_RagdollManager.cs | 18 +-
Game.Client/C_RagdollProp.cs | 35 +-
Game.Client/C_RagdollPropAttached.cs | 30 +-
Game.Client/C_RocketTrail.cs | 71 +-
Game.Client/C_Rope.cs | 97 +-
Game.Client/C_RotorWashEmitter.cs | 13 +-
Game.Client/C_RpgRocket.cs | 9 +-
Game.Client/C_SceneEntity.cs | 57 +-
Game.Client/C_ScriptIntro.cs | 81 +-
Game.Client/C_ShadowControl.cs | 29 +-
Game.Client/C_SlideshowDisplay.cs | 41 +-
Game.Client/C_SmokeStack.cs | 73 +-
Game.Client/C_SmokeTrail.cs | 71 +-
Game.Client/C_SpatialEntity.cs | 28 +-
Game.Client/C_SporeExplosion.cs | 39 +-
Game.Client/C_SporeTrail.cs | 39 +-
Game.Client/C_SpotlightEnd.cs | 17 +-
Game.Client/C_SteamJet.cs | 53 +-
Game.Client/C_Strider.cs | 22 +-
Game.Client/C_Sun.cs | 48 +-
Game.Client/C_TEAntlionDust.cs | 19 +-
Game.Client/C_TEArmorRicochet.cs | 9 +-
Game.Client/C_TEBSPDecal.cs | 21 +-
Game.Client/C_TEBeamEntPoint.cs | 25 +-
Game.Client/C_TEBeamEnts.cs | 17 +-
Game.Client/C_TEBeamFollow.cs | 13 +-
Game.Client/C_TEBeamLaser.cs | 17 +-
Game.Client/C_TEBeamPoints.cs | 17 +-
Game.Client/C_TEBeamRing.cs | 17 +-
Game.Client/C_TEBeamRingPoint.cs | 21 +-
Game.Client/C_TEBeamSpline.cs | 21 +-
Game.Client/C_TEBloodSprite.cs | 39 +-
Game.Client/C_TEBloodStream.cs | 33 +-
Game.Client/C_TEBreakModel.cs | 47 +-
Game.Client/C_TEBubbleTrail.cs | 33 +-
Game.Client/C_TEBubbles.cs | 33 +-
Game.Client/C_TEClientProjectile.cs | 29 +-
Game.Client/C_TEConcussiveExplosion.cs | 25 +-
Game.Client/C_TEDecal.cs | 29 +-
Game.Client/C_TEDust.cs | 21 +-
Game.Client/C_TEDynamicLight.cs | 41 +-
Game.Client/C_TEEffectDispatch.cs | 13 +-
Game.Client/C_TEEnergySplash.cs | 23 +-
Game.Client/C_TEExplosion.cs | 25 +-
Game.Client/C_TEFizz.cs | 25 +-
Game.Client/C_TEFootprintDecal.cs | 25 +-
Game.Client/C_TEGaussExplosion.cs | 17 +-
Game.Client/C_TEGlowSprite.cs | 29 +-
Game.Client/C_TEHL2MPFireBullets.cs | 55 +-
Game.Client/C_TEKillPlayerAttachments.cs | 13 +-
Game.Client/C_TELargeFunnel.cs | 13 +-
Game.Client/C_TEMetalSparks.cs | 19 +-
Game.Client/C_TEMuzzleFlash.cs | 25 +-
Game.Client/C_TEParticleSystem.cs | 15 +-
Game.Client/C_TEPhysicsProp.cs | 47 +-
Game.Client/C_TEPlayerAnimEvent.cs | 23 +-
Game.Client/C_TEPlayerDecal.cs | 23 +-
Game.Client/C_TEProjectedDecal.cs | 25 +-
Game.Client/C_TEShatterSurface.cs | 53 +-
Game.Client/C_TEShowLine.cs | 13 +-
Game.Client/C_TESmoke.cs | 25 +-
Game.Client/C_TESparks.cs | 21 +-
Game.Client/C_TESprite.cs | 25 +-
Game.Client/C_TESpriteSpray.cs | 35 +-
Game.Client/C_TEWorldDecal.cs | 17 +-
Game.Client/C_Team.cs | 57 +-
Game.Client/C_Tesla.cs | 17 +-
Game.Client/C_TriggerPlayerMovement.cs | 9 +-
Game.Client/C_Triggers.cs | 16 +-
Game.Client/C_VGuiScreen.cs | 41 +-
Game.Client/C_VortigauntChargeToken.cs | 13 +-
Game.Client/C_VortigauntEffectDispel.cs | 13 +-
Game.Client/C_WaterBullet.cs | 9 +-
Game.Client/C_WaterLODControl.cs | 18 +-
Game.Client/C_World.cs | 45 +-
Game.Client/Game.Client.csproj | 1 -
Game.Client/GarrysMod/C_GMOD_Player.cs | 87 +-
Game.Client/GarrysMod/C_LuaNextBot.cs | 15 +-
Game.Client/GarrysMod/WeaponCrossbow.cs | 8 +-
Game.Client/HL1/C_BaseHL1CombatWeapon.cs | 8 +-
Game.Client/HL1/C_BaseHL1MPCombatWeapon.cs | 8 +-
Game.Client/HL1/C_BaseHelicopter_HL1.cs | 8 +-
Game.Client/HL2/C_AR2Explosion.cs | 13 +-
Game.Client/HL2/C_AlyxEmpEffect.cs | 19 +-
Game.Client/HL2/C_BaseHLCombatWeapon.cs | 24 +-
Game.Client/HL2/C_BaseHLPlayer.cs | 26 +-
Game.Client/HL2/C_BaseHelicopter.cs | 13 +-
Game.Client/HL2/C_HL2PlayerLocalData.cs | 55 +-
Game.Client/HL2/C_InfoTeleporterCountdown.cs | 23 +-
Game.Client/HL2/C_PropAirboat.cs | 27 +-
Game.Client/HL2/C_PropCombineBall.cs | 25 +-
Game.Client/HL2/C_PropVehiclePrisonerPod.cs | 33 +-
Game.Client/HL2/C_Weapon_Stubs_HL2.cs | 56 +-
Game.Client/HL2MP/C_HL2MP_Player.cs | 92 +-
.../NextBot/C_NextBotCombatCharacter.cs | 6 +-
Game.Client/ParticleMgr.cs | 6 +-
Game.Client/PlayerLocalData.cs | 230 ++---
Game.Server/AI_BaseNPC.cs | 47 +-
Game.Server/BaseAnimating.cs | 195 ++--
Game.Server/BaseAnimatingOverlay.cs | 20 +-
Game.Server/BaseBeam.cs | 71 +-
Game.Server/BaseCombatCharacter.cs | 95 +-
Game.Server/BaseEntity.cs | 441 ++++----
Game.Server/BaseFlex.cs | 51 +-
Game.Server/BaseHLBludgeonWeapon.cs | 8 +-
Game.Server/BaseHLCombatWeapon.cs | 16 +-
Game.Server/BaseTempEntity.cs | 10 +-
Game.Server/BeamSpotlight.cs | 57 +-
Game.Server/BoneFollower.cs | 21 +-
Game.Server/BoneManipulate.cs | 33 +-
Game.Server/BreakableSurface.cs | 63 +-
Game.Server/CitadelEnergyCore.cs | 39 +-
Game.Server/ColorCorrection.cs | 74 +-
Game.Server/ColorCorrectionVolume.cs | 43 +-
Game.Server/DustTrail.cs | 89 +-
Game.Server/DynamicLight.cs | 51 +-
Game.Server/Embers.cs | 33 +-
Game.Server/EntityDissolve.cs | 69 +-
Game.Server/EntityFlame.cs | 20 +-
Game.Server/EntityParticleTrail.cs | 61 +-
Game.Server/EnvAmbientLight.cs | 15 +-
Game.Server/EnvDetailController.cs | 23 +-
Game.Server/EnvHeadcrabCanister.cs | 133 +--
Game.Server/EnvParticleScript.cs | 15 +-
Game.Server/EnvProjectedTexture.cs | 98 +-
Game.Server/EnvQuadraticBeam.cs | 35 +-
Game.Server/EnvScreenEffect.cs | 21 +-
Game.Server/EnvScreenOverlay.cs | 42 +-
Game.Server/EnvStarfield.cs | 21 +-
Game.Server/EnvTonemapController.cs | 49 +-
Game.Server/EnvWind.cs | 36 +-
Game.Server/FireSmoke.cs | 45 +-
Game.Server/FireTrail.cs | 21 +-
Game.Server/Fish.cs | 51 +-
Game.Server/Flare.cs | 39 +-
Game.Server/FleshEffectTarget.cs | 21 +-
Game.Server/FlexManipulate.cs | 29 +-
Game.Server/FogController.cs | 53 +-
Game.Server/FuncAreaPortalWindow.cs | 34 +-
Game.Server/FuncConveyor.cs | 15 +-
Game.Server/FuncMonitor.cs | 8 +-
Game.Server/FuncOccluder.cs | 24 +-
Game.Server/FuncReflectiveGlass.cs | 8 +-
Game.Server/FuncRotating.cs | 47 +-
Game.Server/FuncSmokeVolume.cs | 66 +-
Game.Server/FuncTrackTrain.cs | 8 +-
Game.Server/Func_Dust.cs | 81 +-
Game.Server/Func_LOD.cs | 21 +-
Game.Server/Game.Server.csproj | 2 -
Game.Server/GameInterface.cs | 2 +-
Game.Server/GarrysMod/GMOD_Player.cs | 139 +--
Game.Server/GarrysMod/LuaNextBot.cs | 14 +-
Game.Server/HL1/BaseHL1CombatWeapon.cs | 8 +-
Game.Server/HL1/BaseHL1MPCombatWeapon.cs | 8 +-
Game.Server/HL1/BaseHelicopter_HL1.cs | 8 +-
Game.Server/HL2/AR2Explosion.cs | 15 +-
Game.Server/HL2/AlyxEmpEffect.cs | 25 +-
Game.Server/HL2/BaseHelicopter.cs | 15 +-
Game.Server/HL2/HL2PlayerLocalData.cs | 72 +-
Game.Server/HL2/HL2_Player.cs | 31 +-
Game.Server/HL2/InfoTeleporterCountdown.cs | 31 +-
Game.Server/HL2/PropAirboat.cs | 35 +-
Game.Server/HL2/PropCombineBall.cs | 33 +-
Game.Server/HL2/PropVehiclePrisonerPod.cs | 54 +-
Game.Server/HL2/WeaponAlyxGun.cs | 8 +-
Game.Server/HL2/WeaponAnnabelle.cs | 8 +-
Game.Server/HL2/Weapon_Stubs_HL2.cs | 37 +-
Game.Server/HL2MP/HL2MP_Player.cs | 139 +--
Game.Server/Hierarchy.cs | 2 +-
Game.Server/InfoOverlayAccessor.cs | 17 +-
Game.Server/LightGlow.cs | 67 +-
Game.Server/MaterialModifyControl.cs | 81 +-
Game.Server/MortarShell.cs | 27 +-
Game.Server/MovieExplosion.cs | 7 +-
Game.Server/NPC_AntlionGuard.cs | 27 +-
Game.Server/NPC_Barnacle.cs | 35 +-
Game.Server/NPC_Barney.cs | 9 +-
Game.Server/NPC_CombineGunship.cs | 17 +-
Game.Server/NPC_Manhack.cs | 27 +-
Game.Server/NPC_Portal_FloorTurret.cs | 27 +-
Game.Server/NPC_Puppet.cs | 26 +-
Game.Server/NPC_RocketTurret.cs | 27 +-
Game.Server/NPC_RollerMine.cs | 35 +-
Game.Server/NPC_Strider.cs | 26 +-
Game.Server/NPC_Vortigaunt.cs | 27 +-
Game.Server/NavMesh/NavEntities.cs | 10 +-
Game.Server/NextBot/NextBotCombatCharacter.cs | 6 +-
Game.Server/ParticlePerformanceMonitor.cs | 21 +-
Game.Server/ParticleSmokeGrenade.cs | 35 +-
Game.Server/ParticleSystem.cs | 64 +-
Game.Server/PhysMagnet.cs | 8 +-
Game.Server/PhysObj.cs | 8 +-
Game.Server/Plasma.cs | 45 +-
Game.Server/Player.cs | 239 +++--
Game.Server/PlayerLocalData.cs | 250 +++--
Game.Server/PlayerResource.cs | 85 +-
Game.Server/PointCamera.cs | 81 +-
Game.Server/PointWorldText.cs | 57 +-
Game.Server/PoseController.cs | 75 +-
Game.Server/Precipitation.cs | 39 +-
Game.Server/PrecipitationBlocker.cs | 9 +-
Game.Server/PropCrane.cs | 44 +-
Game.Server/PropEnergyBall.cs | 21 +-
Game.Server/PropJeep.cs | 50 +-
Game.Server/PropScalable.cs | 63 +-
Game.Server/PropVehicleChoreoGeneric.cs | 100 +-
Game.Server/PropVehicleDriveable.cs | 94 +-
Game.Server/Props.cs | 123 +--
Game.Server/RagdollManager.cs | 19 +-
Game.Server/RagdollProp.cs | 49 +-
Game.Server/RagdollPropAttached.cs | 36 +-
Game.Server/RocketTrail.cs | 101 +-
Game.Server/Rope.cs | 144 +--
Game.Server/RotorWashEmitter.cs | 15 +-
Game.Server/RpgRocket.cs | 9 +-
Game.Server/SceneEntity.cs | 41 +-
Game.Server/ScriptIntro.cs | 127 +--
Game.Server/ServerNetworkProperty.cs | 2 +-
Game.Server/ShadowControl.cs | 41 +-
Game.Server/SlideshowDisplay.cs | 57 +-
Game.Server/SmokeStack.cs | 107 +-
Game.Server/SmokeTrail.cs | 101 +-
Game.Server/Soundscape.cs | 10 +-
Game.Server/SoundscapeSystem.cs | 2 +-
Game.Server/SpatialEntity.cs | 37 +-
Game.Server/SporeExplosion.cs | 53 +-
Game.Server/SporeTrail.cs | 53 +-
Game.Server/SpotlightEnd.cs | 21 +-
Game.Server/SteamJet.cs | 75 +-
Game.Server/Sun.cs | 64 +-
Game.Server/TEAntlionDust.cs | 19 +-
Game.Server/TEArmorRicochet.cs | 10 +-
Game.Server/TEBSPDecal.cs | 21 +-
Game.Server/TEBeamEntPoint.cs | 25 +-
Game.Server/TEBeamEnts.cs | 17 +-
Game.Server/TEBeamFollow.cs | 13 +-
Game.Server/TEBeamLaser.cs | 17 +-
Game.Server/TEBeamPoints.cs | 17 +-
Game.Server/TEBeamRing.cs | 17 +-
Game.Server/TEBeamRingPoint.cs | 21 +-
Game.Server/TEBeamSpline.cs | 20 +-
Game.Server/TEBloodSprite.cs | 39 +-
Game.Server/TEBloodStream.cs | 33 +-
Game.Server/TEBreakModel.cs | 47 +-
Game.Server/TEBubbleTrail.cs | 33 +-
Game.Server/TEBubbles.cs | 33 +-
Game.Server/TEClientProjectile.cs | 29 +-
Game.Server/TEConcussiveExplosion.cs | 25 +-
Game.Server/TEDecal.cs | 29 +-
Game.Server/TEDust.cs | 21 +-
Game.Server/TEDynamicLight.cs | 41 +-
Game.Server/TEEffectDispatch.cs | 13 +-
Game.Server/TEEnergySplash.cs | 23 +-
Game.Server/TEExplosion.cs | 25 +-
Game.Server/TEFizz.cs | 25 +-
Game.Server/TEFootprintDecal.cs | 25 +-
Game.Server/TEGaussExplosion.cs | 17 +-
Game.Server/TEGlowSprite.cs | 29 +-
Game.Server/TEHL2MPFireBullets.cs | 55 +-
Game.Server/TEKillPlayerAttachments.cs | 13 +-
Game.Server/TELargeFunnel.cs | 13 +-
Game.Server/TEMetalSparks.cs | 19 +-
Game.Server/TEMuzzleFlash.cs | 25 +-
Game.Server/TEParticleSystem.cs | 15 +-
Game.Server/TEPhysicsProp.cs | 47 +-
Game.Server/TEPlayerAnimEvent.cs | 23 +-
Game.Server/TEPlayerDecal.cs | 21 +-
Game.Server/TEProjectedDecal.cs | 25 +-
Game.Server/TEShatterSurface.cs | 53 +-
Game.Server/TEShowLine.cs | 13 +-
Game.Server/TESmoke.cs | 25 +-
Game.Server/TESparks.cs | 21 +-
Game.Server/TESprite.cs | 25 +-
Game.Server/TESpriteSpray.cs | 33 +-
Game.Server/TEWorldDecal.cs | 17 +-
Game.Server/Team.cs | 60 +-
Game.Server/Tesla.cs | 21 +-
Game.Server/TriggerPlayerMovement.cs | 8 +-
Game.Server/Triggers.cs | 19 +-
Game.Server/VGuiScreen.cs | 56 +-
Game.Server/VortigauntChargeToken.cs | 15 +-
Game.Server/VortigauntEffectDispel.cs | 15 +-
Game.Server/WaterBullet.cs | 9 +-
Game.Server/WaterLODControl.cs | 24 +-
Game.Server/World.cs | 63 +-
Game.Shared/AnimationLayer.cs | 45 +-
Game.Shared/BaseCombatCharacterShared.cs | 6 +-
Game.Shared/BaseCombatWeaponShared.cs | 336 +++---
Game.Shared/BaseDoor.cs | 21 +-
Game.Shared/BaseEntityShared.cs | 4 +-
Game.Shared/BaseGrenade.cs | 63 +-
Game.Shared/BaseParticleEntity.cs | 22 +-
Game.Shared/BasePlayerShared.cs | 10 +-
Game.Shared/BaseToggle.cs | 44 +-
Game.Shared/BaseViewModel.cs | 102 +-
Game.Shared/Beam.cs | 231 ++---
Game.Shared/CollisionProperty.cs | 200 ++--
Game.Shared/Color32Proxy.cs | 16 +
Game.Shared/EffectData.cs | 172 ++--
Game.Shared/EnvWindShared.cs | 80 +-
Game.Shared/FuncLadder.cs | 50 +-
Game.Shared/GameMovement.cs | 14 +-
Game.Shared/GameRules.cs | 24 +-
.../GarrysMod/BaseHL2MPBludgeonWeapon.cs | 24 +-
Game.Shared/GarrysMod/GMODGameRules.cs | 55 +-
Game.Shared/GarrysMod/HL2MPMachineGun.cs | 35 +-
Game.Shared/GarrysMod/LuaEntity.cs | 20 +-
Game.Shared/GarrysMod/LuaPlayer.cs | 2 +-
Game.Shared/GarrysMod/PhysBeam.cs | 62 +-
Game.Shared/GarrysMod/SENT_AI.cs | 36 +-
Game.Shared/GarrysMod/SENT_Anim.cs | 36 +-
Game.Shared/GarrysMod/SENT_Point.cs | 36 +-
Game.Shared/GarrysMod/ScriptedEntity.cs | 20 +-
Game.Shared/GarrysMod/Weapon357.cs | 26 +-
Game.Shared/GarrysMod/WeaponAR2.cs | 24 +-
Game.Shared/GarrysMod/WeaponBugBait.cs | 43 +-
Game.Shared/GarrysMod/WeaponCrossbow.cs | 52 +-
Game.Shared/GarrysMod/WeaponCrowbar.cs | 26 +-
Game.Shared/GarrysMod/WeaponFrag.cs | 51 +-
Game.Shared/GarrysMod/WeaponGModBase.cs | 44 +-
Game.Shared/GarrysMod/WeaponPhysCannon.cs | 86 +-
Game.Shared/GarrysMod/WeaponPhysGun.cs | 69 +-
Game.Shared/GarrysMod/WeaponPistol.cs | 78 +-
Game.Shared/GarrysMod/WeaponRPG.cs | 89 +-
Game.Shared/GarrysMod/WeaponSLAM.cs | 100 +-
Game.Shared/GarrysMod/WeaponSMG1.cs | 24 +-
Game.Shared/GarrysMod/WeaponSWEP.cs | 50 +-
Game.Shared/GarrysMod/WeaponShotgun.cs | 61 +-
Game.Shared/GarrysMod/WeaponStunStick.cs | 37 +-
Game.Shared/HL1/Weapon357_HL1.cs | 35 +-
Game.Shared/HL1/WeaponCrossbow_HL1.cs | 35 +-
Game.Shared/HL1/WeaponCrowbar_HL1.cs | 23 +-
Game.Shared/HL1/WeaponEgon.cs | 23 +-
Game.Shared/HL1/WeaponGauss.cs | 75 +-
Game.Shared/HL1/WeaponGlock.cs | 23 +-
Game.Shared/HL1/WeaponHandGrenade.cs | 43 +-
Game.Shared/HL1/WeaponHgun.cs | 43 +-
Game.Shared/HL1/WeaponMP5.cs | 23 +-
Game.Shared/HL1/WeaponRPG_HL1.cs | 81 +-
Game.Shared/HL1/WeaponSatchel.cs | 67 +-
Game.Shared/HL1/WeaponShotgun_HL1.cs | 43 +-
Game.Shared/HL1/WeaponSnark.cs | 35 +-
Game.Shared/HL1/WeaponTripMine.cs | 43 +-
Game.Shared/HL2/BaseHLCombatWeapon.cs | 18 +-
Game.Shared/HL2/HL_GameMovement.cs | 4 +-
Game.Shared/HL2MP/HL2MPGameRules.cs | 55 +-
Game.Shared/InfoLadderDismount.cs | 22 +-
Game.Shared/ParticleParse.cs | 8 +-
Game.Shared/PhysicsMainShared.cs | 2 +-
Game.Shared/PlayerNetVars.cs | 58 +-
Game.Shared/PlayerState.cs | 26 +
Game.Shared/PredictedViewModel.cs | 20 +-
Game.Shared/Sprite.cs | 143 ++-
Game.Shared/SpriteTrail.cs | 78 +-
.../NetworkClassRegistrationGenerator.cs | 239 -----
.../Source.CodeAnalysis.NetworkClasses.csproj | 19 -
.../NetworkVarGenerator.FieldAccessors.cs | 25 +-
.../NetworkVarGenerator.Tables.cs | 962 ++++++++++++++++++
.../NetworkVarGenerator.cs | 118 ++-
Source.Common/BoneSetup.cs | 6 +-
Source.Common/ClientClass.cs | 59 +-
Source.Common/DataMap.cs | 17 +-
Source.Common/DtRecv.cs | 6 -
Source.Common/DtSend.cs | 6 -
Source.Common/FieldAccessors.cs | 6 +-
.../{PlayerState.cs => PlayerEngineState.cs} | 4 +-
Source.Common/Server/IServerGameDLL.cs | 2 +-
Source.Common/ServerClass.cs | 110 +-
Source.Engine/Server/GameClient.cs | 2 +-
Source.NET.slnx | 3 -
458 files changed, 9804 insertions(+), 9921 deletions(-)
create mode 100644 Game.Shared/Color32Proxy.cs
create mode 100644 Game.Shared/PlayerState.cs
delete mode 100644 Source.CodeAnalysis.NetworkClasses/NetworkClassRegistrationGenerator.cs
delete mode 100644 Source.CodeAnalysis.NetworkClasses/Source.CodeAnalysis.NetworkClasses.csproj
create mode 100644 Source.CodeAnalysis.NetworkVars/NetworkVarGenerator.Tables.cs
rename Source.Common/{PlayerState.cs => PlayerEngineState.cs} (80%)
diff --git a/Game.Client/C_AI_BaseNPC.cs b/Game.Client/C_AI_BaseNPC.cs
index aee1645a..7ceec49d 100644
--- a/Game.Client/C_AI_BaseNPC.cs
+++ b/Game.Client/C_AI_BaseNPC.cs
@@ -6,36 +6,34 @@
namespace Game.Client;
-using FIELD = FIELD;
-
[NetworkName("CAI_BaseNPC")]
-public class C_AI_BaseNPC : C_BaseCombatCharacter
+public partial class C_AI_BaseNPC : C_BaseCombatCharacter
{
- public static readonly RecvTable DT_AI_BaseNPC = new(DT_BaseCombatCharacter, [
- RecvPropInt(FIELD.OF(nameof(LifeState))),
- RecvPropBool(FIELD.OF(nameof(PerformAvoidance))),
- RecvPropBool(FIELD.OF(nameof(IsMoving))),
- RecvPropBool(FIELD.OF(nameof(FadeCorpse))),
- RecvPropInt(FIELD.OF(nameof(DeathPose))),
- RecvPropInt(FIELD.OF(nameof(DeathFrame))),
- RecvPropBool(FIELD.OF(nameof(ImportantRagdoll))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_AI_BaseNPC);
-
- [NetworkName("m_bPerformAvoidance")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(LifeState),
+ nameof(PerformAvoidance),
+ nameof(IsMoving),
+ nameof(FadeCorpse),
+ nameof(DeathPose),
+ nameof(DeathFrame),
+ nameof(ImportantRagdoll),
+ ];
+
+ [NetworkVar("m_bPerformAvoidance")]
public bool PerformAvoidance;
- [NetworkName("m_bIsMoving")]
+ [NetworkVar("m_bIsMoving")]
public bool IsMoving;
- [NetworkName("m_bFadeCorpse")]
+ [NetworkVar("m_bFadeCorpse")]
public bool FadeCorpse;
- [NetworkName("m_iDeathPose")]
+ [NetworkVar("m_iDeathPose")]
public int DeathPose;
- [NetworkName("m_iDeathFrame")]
+ [NetworkVar("m_iDeathFrame")]
public int DeathFrame;
public bool SpeedModActive;
public int SpeedModRadius;
public int SpeedModSpeed;
- [NetworkName("m_bImportanRagdoll")]
+ [NetworkVar("m_bImportanRagdoll")]
public bool ImportantRagdoll;
public float TimePingEffect;
diff --git a/Game.Client/C_BaseAnimating.cs b/Game.Client/C_BaseAnimating.cs
index e7563b73..54896daf 100644
--- a/Game.Client/C_BaseAnimating.cs
+++ b/Game.Client/C_BaseAnimating.cs
@@ -22,20 +22,18 @@
using ClientModelRenderInfo = Source.Common.Engine.ModelRenderInfo;
using Color = Source.Color;
-using DEFINE = Source.DEFINE;
using FIELD = Source.FIELD;
-using FIELD_ILR = Source.FIELD;
namespace Game.Client;
[NetworkName("CInfoLightingRelative")]
public partial class C_InfoLightingRelative : C_BaseEntity
{
- public static readonly RecvTable DT_InfoLightingRelative = new(DT_BaseEntity, [
- RecvPropEHandle(FIELD_ILR.OF(nameof(LightingLandmark))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_InfoLightingRelative);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(LightingLandmark),
+ ];
- [NetworkName("m_hLightingLandmark")]
+ [NetworkVar("m_hLightingLandmark")]
public EHANDLE LightingLandmark = new();
}
@@ -904,55 +902,60 @@ public bool IsSequenceLooping(StudioHdr? studioHdr, int sequence) {
return (Animation.GetSequenceFlags(studioHdr, sequence) & StudioAnimSeqFlags.Looping) != 0;
}
- public static readonly RecvTable DT_ServerAnimationData = new(nameof(DT_ServerAnimationData), [
- RecvPropFloat(FIELD.OF(nameof(Cycle))),
- ]);
- public static readonly new DataMap PredMap = new(typeof(C_BaseAnimating), C_BaseEntity.PredMap, [
- DEFINE.PRED_FIELD( nameof(Skin), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(Body), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.FIELD( nameof(PrevSequence), FieldType.Integer ),
- DEFINE.PRED_FIELD( nameof(ResetEventsParity), FieldType.Integer, FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.NoErrorCheck ),
- DEFINE.PRED_FIELD( nameof(MuzzleFlashParity), FieldType.Character, FieldTypeDescFlags.InSendTable ),
- ]); public override DataMap? GetPredDescMap() => PredMap;
- public static readonly RecvTable DT_BaseAnimating = new(DT_BaseEntity, [
- RecvPropInt( FIELD.OF(nameof(ForceBone))),
- RecvPropVector( FIELD.OF(nameof(Force))),
+ [NetworkTable("DT_ServerAnimationData")]
+ public static readonly NetworkProp[] ServerAnimationDataProps = [
+ new(nameof(Cycle)) { Encoding = NetEncoding.Float },
+ ];
- RecvPropInt( FIELD.OF(nameof(Skin))),
- RecvPropInt( FIELD.OF(nameof(Body))),
+ [PredictionTable]
+ public static readonly new PredictionField[] Prediction = [
+ nameof(Skin),
+ nameof(Body),
+ nameof(PrevSequence),
+ new(nameof(ResetEventsParity)) { Flags = FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.NoErrorCheck },
+ nameof(MuzzleFlashParity),
+ ];
- RecvPropInt( FIELD.OF(nameof(HitboxSet))),
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Sequence)) { Proxy = typeof(SequenceProxy) },
+ nameof(ForceBone),
+ nameof(Force),
- RecvPropFloat( FIELD.OF(nameof(ModelScale))),
+ nameof(Skin),
+ nameof(Body),
- RecvPropArray3( FIELD.OF_ARRAY(nameof(PoseParameter)), RecvPropFloat(null!)),
+ nameof(HitboxSet),
- RecvPropInt( FIELD.OF(nameof(Sequence)), 0, RecvProxy_Sequence),
- RecvPropFloat( FIELD.OF(nameof(PlaybackRate))),
+ nameof(ModelScale),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(EncodedController)), RecvPropFloat(null!) ),
+ nameof(PoseParameter),
- RecvPropInt( FIELD.OF(nameof( ClientSideAnimation ))),
- RecvPropInt( FIELD.OF(nameof( ClientSideFrameReset ))),
+ nameof(PlaybackRate),
- RecvPropInt( FIELD.OF(nameof( NewSequenceParity) )),
- RecvPropInt( FIELD.OF(nameof( ResetEventsParity ))),
- RecvPropInt( FIELD.OF(nameof( MuzzleFlashParity ))),
+ nameof(EncodedController),
- RecvPropEHandle( FIELD.OF(nameof( LightingOrigin )) ),
- RecvPropEHandle( FIELD.OF(nameof( LightingOriginRelative )) ),
+ new(nameof(ClientSideAnimation)) { Encoding = NetEncoding.Int },
+ new(nameof(ClientSideFrameReset)) { Encoding = NetEncoding.Int },
- RecvPropDataTable( "serveranimdata", DT_ServerAnimationData ),
+ nameof(NewSequenceParity),
+ nameof(ResetEventsParity),
+ nameof(MuzzleFlashParity),
- RecvPropFloat( FIELD.OF(nameof(FadeMinDist) )),
- RecvPropFloat( FIELD.OF(nameof(FadeMaxDist ))),
- RecvPropFloat( FIELD.OF(nameof(FadeScale ))),
+ nameof(LightingOrigin),
+ nameof(LightingOriginRelative),
+
+ new(nameof(ServerAnimationDataProps)) { Name = "serveranimdata" },
+
+ nameof(FadeMinDist),
+ nameof(FadeMaxDist),
+ nameof(FadeScale),
// Gmod specific
- RecvPropEHandle(FIELD.OF(nameof(BoneManipulator))),
- RecvPropEHandle(FIELD.OF(nameof(FlexManipulator))),
- RecvPropVector(FIELD.OF(nameof(OverrideViewTarget))),
- ]);
+ nameof(BoneManipulator),
+ nameof(FlexManipulator),
+ nameof(OverrideViewTarget),
+ ];
private static void RecvProxy_Sequence(ref readonly RecvProxyData data, object instance, IFieldAccessor field) {
RecvProxy_Int32ToInt32(in data, instance, field);
@@ -962,10 +965,15 @@ private static void RecvProxy_Sequence(ref readonly RecvProxyData data, object i
animating.SetReceivedSequence();
animating.UpdateVisibility();
}
+
+ public static class SequenceProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_Sequence(in data, instance, field);
+ }
+
public virtual void DoMuzzleFlash() => MuzzleFlashParity = unchecked((byte)((MuzzleFlashParity + 1) & ((1 << (int)EntityEffects.MuzzleflashBits) - 1)));
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BaseAnimating);
protected override StudioHdr? OnNewModel() {
InvalidateMdlCache();
int i;
@@ -1888,43 +1896,43 @@ public override void GetAimEntOrigin(C_BaseEntity attachedTo, out Vector3 origin
}
}
- [NetworkName("m_nSequence")]
+ [NetworkVar("m_nSequence")]
public int Sequence;
- [NetworkName("m_nForceBone")]
+ [NetworkVar("m_nForceBone")]
public int ForceBone;
- [NetworkName("m_vecForce")]
+ [NetworkVar("m_vecForce")]
public Vector3 Force;
- [NetworkName("m_nSkin")]
+ [NetworkVar("m_nSkin")]
public int Skin;
- [NetworkName("m_nBody")]
+ [NetworkVar("m_nBody")]
public int Body;
- [NetworkName("m_nHitboxSet")]
+ [NetworkVar("m_nHitboxSet")]
public int HitboxSet;
public int GetHitboxSet() => HitboxSet;
- [NetworkName("m_flModelScale")]
+ [NetworkVar("m_flModelScale")]
public float ModelScale = 1.0f;
- [NetworkName("m_flPlaybackRate")]
+ [NetworkVar("m_flPlaybackRate")]
public float PlaybackRate;
- [NetworkName("m_bClientSideAnimation")]
+ [NetworkVar("m_bClientSideAnimation")]
public bool ClientSideAnimation;
public bool LastClientSideFrameReset;
- [NetworkName("m_bClientSideFrameReset")]
+ [NetworkVar("m_bClientSideFrameReset")]
public bool ClientSideFrameReset;
- [NetworkName("m_nNewSequenceParity")]
+ [NetworkVar("m_nNewSequenceParity")]
public int NewSequenceParity;
- [NetworkName("m_nResetEventsParity")]
+ [NetworkVar("m_nResetEventsParity")]
public int ResetEventsParity;
public byte OldMuzzleFlashParity;
- [NetworkName("m_nMuzzleFlashParity")]
+ [NetworkVar("m_nMuzzleFlashParity")]
public byte MuzzleFlashParity;
- [NetworkName("m_hLightingOrigin")]
+ [NetworkVar("m_hLightingOrigin")]
public EHANDLE LightingOrigin = new();
- [NetworkName("m_hLightingOriginRelative")]
+ [NetworkVar("m_hLightingOriginRelative")]
public EHANDLE LightingOriginRelative = new();
- [NetworkName("m_pBoneManipulator")]
+ [NetworkVar("m_pBoneManipulator")]
public EHANDLE BoneManipulator = new();
- [NetworkName("m_pFlexManipulator")]
+ [NetworkVar("m_pFlexManipulator")]
public EHANDLE FlexManipulator = new();
public EHANDLE ClientFlexManipulator = new();
@@ -1951,25 +1959,25 @@ public override void GetAimEntOrigin(C_BaseEntity attachedTo, out Vector3 origin
return null;
}
- [NetworkName("m_OverrideViewTarget")]
+ [NetworkVar("m_OverrideViewTarget")]
public Vector3 OverrideViewTarget;
- [NetworkName("m_fadeMinDist")]
+ [NetworkVar("m_fadeMinDist")]
public float FadeMinDist;
- [NetworkName("m_fadeMaxDist")]
+ [NetworkVar("m_fadeMaxDist")]
public float FadeMaxDist;
- [NetworkName("m_flFadeScale")]
+ [NetworkVar("m_flFadeScale")]
public float FadeScale;
- [NetworkName("m_flCycle")]
+ [NetworkVar("m_flCycle")]
public TimeUnit_t Cycle;
public readonly InterpolatedVar iv_Cycle;
public readonly InterpolatedVarArray iv_flPoseParameter;
- [NetworkName("m_flPoseParameter")]
+ [NetworkVar("m_flPoseParameter")]
public InlineArrayMaxStudioPoseParam PoseParameter;
public InlineArrayMaxStudioPoseParam OldPoseParameters;
public float PrevEventCycle;
public int EventSequence;
- [NetworkName("m_flEncodedController")]
+ [NetworkVar("m_flEncodedController")]
public InlineArrayMaxStudioBoneCtrls EncodedController;
public InlineArrayMaxStudioBoneCtrls OldEncodedController;
}
diff --git a/Game.Client/C_BaseAnimatingOverlay.cs b/Game.Client/C_BaseAnimatingOverlay.cs
index 6bf17f87..742c13d7 100644
--- a/Game.Client/C_BaseAnimatingOverlay.cs
+++ b/Game.Client/C_BaseAnimatingOverlay.cs
@@ -5,16 +5,25 @@
using System.Numerics;
using System.Runtime.CompilerServices;
-using FIELD = Source.FIELD;
-
namespace Game.Client;
[NetworkName("CBaseAnimatingOverlay")]
public partial class C_BaseAnimatingOverlay : C_BaseAnimating
{
- public static readonly RecvTable DT_OverlayVars = new(nameof(DT_OverlayVars), [
- RecvPropList(FIELD.OF_LIST(nameof(AnimOverlay), MAX_OVERLAYS), ResizeAnimationLayerCallback, RecvPropDataTable(null!, AnimationLayerRef.DT_Animationlayer))
- ]);
+ [NetworkTable("DT_OverlayVars")]
+ public static readonly NetworkProp[] OverlayVarsProps = [
+ new(nameof(AnimOverlay)) { Encoding = NetEncoding.List, Count = MAX_OVERLAYS, DataTable = "DT_Animationlayer", Proxy = typeof(AnimOverlayProxy) },
+ ];
+
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(OverlayVarsProps)) { Name = "overlay_vars" },
+ ];
+
+ public static class AnimOverlayProxy
+ {
+ public static void Resize(object instance, object list, int len) => ResizeAnimationLayerCallback(instance, list, len);
+ }
public C_BaseAnimatingOverlay() : base() {
for (int i = 0; i < MAX_OVERLAYS; i++) {
@@ -71,12 +80,7 @@ private static void ResizeAnimationLayerCallback(object instance, object list, i
}
}
-
- public static readonly RecvTable DT_BaseAnimatingOverlay = new(DT_BaseAnimating, [
- RecvPropDataTable("overlay_vars", DT_OverlayVars)
- ]); public static readonly new ClientClass ClientClass = new ClientClass(DT_BaseAnimatingOverlay);
-
- [NetworkName("m_AnimOverlay")]
+ [NetworkVar("m_AnimOverlay")]
readonly List AnimOverlay = [];
readonly List> iv_AnimOverlay = [];
public readonly float[] OverlayPrevEventCycle = new float[MAX_OVERLAYS];
diff --git a/Game.Client/C_BaseBeam.cs b/Game.Client/C_BaseBeam.cs
index 08a2833f..48aabadf 100644
--- a/Game.Client/C_BaseBeam.cs
+++ b/Game.Client/C_BaseBeam.cs
@@ -3,57 +3,56 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CTEBaseBeam")]
-public class C_BaseBeam : C_BaseTempEntity
+[NetworkName("CTEBaseBeam", Table = "DT_BaseBeam", NoBase = true)]
+public partial class C_BaseBeam : C_BaseTempEntity
{
- public static readonly RecvTable DT_BaseBeam = new([
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropInt(FIELD.OF(nameof(HaloIndex))),
- RecvPropInt(FIELD.OF(nameof(StartFrame))),
- RecvPropInt(FIELD.OF(nameof(FrameRate))),
- RecvPropFloat(FIELD.OF(nameof(Life))),
- RecvPropFloat(FIELD.OF(nameof(Width))),
- RecvPropFloat(FIELD.OF(nameof(EndWidth))),
- RecvPropInt(FIELD.OF(nameof(FadeLength))),
- RecvPropFloat(FIELD.OF(nameof(Amplitude))),
- RecvPropInt(FIELD.OF(nameof(Speed))),
- RecvPropInt(FIELD.OF(nameof(R))),
- RecvPropInt(FIELD.OF(nameof(G))),
- RecvPropInt(FIELD.OF(nameof(B))),
- RecvPropInt(FIELD.OF(nameof(A))),
- RecvPropInt(FIELD.OF(nameof(Flags))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BaseBeam);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(ModelIndex)) { Bits = 14 },
+ new(nameof(HaloIndex)) { Bits = 14 },
+ new(nameof(StartFrame)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(FrameRate)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Life)) { Bits = 8, Low = 0.0f, High = 25.6f },
+ new(nameof(Width)) { Bits = 10, Low = 0.0f, High = 128.0f },
+ new(nameof(EndWidth)) { Bits = 10, Low = 0.0f, High = 128.0f },
+ new(nameof(FadeLength)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Amplitude)) { Bits = 8, Low = 0.0f, High = 64.0f },
+ new(nameof(Speed)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(R)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(G)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(B)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(A)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Flags)) { Bits = 20, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_nModelIndex")]
+ [NetworkVar("m_nModelIndex")]
public int ModelIndex;
- [NetworkName("m_nHaloIndex")]
+ [NetworkVar("m_nHaloIndex")]
public int HaloIndex;
- [NetworkName("m_nStartFrame")]
+ [NetworkVar("m_nStartFrame")]
public int StartFrame;
- [NetworkName("m_nFrameRate")]
+ [NetworkVar("m_nFrameRate")]
public int FrameRate;
- [NetworkName("m_fLife")]
+ [NetworkVar("m_fLife")]
public float Life;
- [NetworkName("m_fWidth")]
+ [NetworkVar("m_fWidth")]
public float Width;
- [NetworkName("m_fEndWidth")]
+ [NetworkVar("m_fEndWidth")]
public float EndWidth;
- [NetworkName("m_nFadeLength")]
+ [NetworkVar("m_nFadeLength")]
public int FadeLength;
- [NetworkName("m_fAmplitude")]
+ [NetworkVar("m_fAmplitude")]
public float Amplitude;
- [NetworkName("m_nSpeed")]
+ [NetworkVar("m_nSpeed")]
public int Speed;
- [NetworkName("r")]
+ [NetworkVar("r")]
public int R;
- [NetworkName("g")]
+ [NetworkVar("g")]
public int G;
- [NetworkName("b")]
+ [NetworkVar("b")]
public int B;
- [NetworkName("a")]
+ [NetworkVar("a")]
public int A;
- [NetworkName("m_nFlags")]
+ [NetworkVar("m_nFlags")]
public int Flags;
}
diff --git a/Game.Client/C_BaseCombatCharacter.cs b/Game.Client/C_BaseCombatCharacter.cs
index 1be1bcc3..52e5b7e6 100644
--- a/Game.Client/C_BaseCombatCharacter.cs
+++ b/Game.Client/C_BaseCombatCharacter.cs
@@ -5,52 +5,52 @@
using Source.Common.Physics;
using Source.GUI.Controls;
-using DEFINE = Source.DEFINE;
-using FIELD = Source.FIELD;
-
namespace Game.Client;
[NetworkName("CBaseCombatCharacter")]
public partial class C_BaseCombatCharacter : C_BaseFlex
{
- public static readonly RecvTable DT_BCCLocalPlayerExclusive = new(nameof(DT_BCCLocalPlayerExclusive), [
- RecvPropTime64(FIELD.OF(nameof(NextAttack))),
- ]);
- public override bool IsBaseCombatCharacter() => true;
+ [NetworkTable("DT_BCCLocalPlayerExclusive")]
+ public static readonly NetworkProp[] BCCLocalPlayerExclusiveProps = [
+ nameof(NextAttack),
+ ];
- public static readonly new DataMap PredMap = new(typeof(C_BaseCombatCharacter), C_BaseFlex.PredMap, [
- DEFINE.PRED_ARRAY( nameof(Ammo), FieldType.Integer, MAX_AMMO_TYPES, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(NextAttack), FieldType.Double, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(ActiveWeapon), FieldType.EHandle, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_ARRAY( nameof(MyWeapons), FieldType.EHandle, MAX_WEAPONS, FieldTypeDescFlags.InSendTable ),
- ]); public override DataMap? GetPredDescMap() => PredMap;
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(BCCLocalPlayerExclusiveProps)) { Name = "bcc_localdata" },
+ nameof(ActiveWeapon),
+ nameof(MyWeapons),
+ nameof(BloodColor),
+ ];
+
+ public override bool IsBaseCombatCharacter() => true;
- public static readonly RecvTable DT_BaseCombatCharacter = new(DT_BaseFlex, [
- RecvPropDataTable( "bcc_localdata", DT_BCCLocalPlayerExclusive ),
- RecvPropEHandle(FIELD.OF(nameof(ActiveWeapon))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(MyWeapons)), RecvPropEHandle( FIELD.OF_ARRAY(nameof(MyWeapons)))),
- RecvPropInt(FIELD.OF(nameof(BloodColor)))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BaseCombatCharacter);
+ [PredictionTable]
+ public static readonly new PredictionField[] Prediction = [
+ new(nameof(Ammo)) { Flags = FieldTypeDescFlags.InSendTable },
+ nameof(NextAttack),
+ nameof(ActiveWeapon),
+ nameof(MyWeapons),
+ ];
public C_BaseCombatWeapon? GetWeapon(int i) => MyWeapons[i].Get();
public TimeUnit_t GetNextAttack() => NextAttack;
public void SetNextAttack(TimeUnit_t wait) => NextAttack = wait;
- [NetworkName("m_flNextAttack")]
+ [NetworkVar("m_flNextAttack")]
public TimeUnit_t NextAttack;
- [NetworkName("m_hLastWeapon")]
+ [NetworkVar("m_hLastWeapon")]
public Handle LastWeapon = new();
- [NetworkName("m_hActiveWeapon")]
+ [NetworkVar("m_hActiveWeapon")]
public Handle ActiveWeapon = new();
- [NetworkName("m_hMyWeapons")]
+ [NetworkVar("m_hMyWeapons")]
public InlineArrayNewMaxWeapons> MyWeapons = new();
- [NetworkName("m_iAmmo")]
- [NetworkArraySize(MAX_AMMO_TYPES)] public readonly NetworkArray Ammo = new(MAX_AMMO_TYPES);
+ [NetworkVar("m_iAmmo")]
+ public partial ref readonly InlineArray256 Ammo { get; }
- [NetworkName("m_bloodColor")]
+ [NetworkVar("m_bloodColor")]
public BloodColor BloodColor;
public int WeaponCount() => MAX_WEAPONS;
diff --git a/Game.Client/C_BaseCombatWeapon.cs b/Game.Client/C_BaseCombatWeapon.cs
index 8b839991..d05286d1 100644
--- a/Game.Client/C_BaseCombatWeapon.cs
+++ b/Game.Client/C_BaseCombatWeapon.cs
@@ -10,6 +10,10 @@ namespace Game.Client;
public partial class C_BaseCombatWeapon : C_BaseAnimating
{
+ public C_BaseCombatWeapon() {
+ Owner = new();
+ }
+
public override bool IsBaseCombatWeapon() => true;
public override GarrysMod.LuaClass Lua_GetLuaClass() => GarrysMod.LuaEntity.LC_Weapon;
public bool Dropped;
diff --git a/Game.Client/C_BaseEntity.cs b/Game.Client/C_BaseEntity.cs
index e5bc269b..4948787f 100644
--- a/Game.Client/C_BaseEntity.cs
+++ b/Game.Client/C_BaseEntity.cs
@@ -145,9 +145,106 @@ internal void RemoveFromPredictablesList(in ClientEntityHandle remove) {
private readonly List Predictables = [];
}
-[NetworkName("CBaseEntity")]
+[NetworkName("CBaseEntity", NoBase = true)]
public partial class C_BaseEntity : IClientEntity
{
+ [NetworkTable("DT_AnimTimeMustBeFirst")]
+ public static readonly NetworkProp[] AnimTimeMustBeFirstProps = [
+ new(nameof(AnimTime)) { Encoding = NetEncoding.Int, Proxy = typeof(AnimTimeProxy) },
+ ];
+
+ [NetworkTable("DT_PredictableId")]
+ public static readonly NetworkProp[] PredictableIdProps = [
+ new(nameof(PredictableID)) { Encoding = NetEncoding.PredictableId },
+ new(nameof(b_IsPlayerSimulated)) { Encoding = NetEncoding.Int, Bits = 1, Flags = PropFlags.Unsigned },
+ ];
+
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ nameof(AnimTimeMustBeFirstProps),
+ new(nameof(SimulationTime)) { Encoding = NetEncoding.Int, Proxy = typeof(SimulationTimeProxy) },
+ nameof(InterpolationFrame),
+ nameof(NetworkOrigin),
+ nameof(NetworkAngles),
+ new(nameof(ModelIndex)) { Encoding = NetEncoding.Int, Proxy = typeof(ModelIndexProxy) },
+ new(nameof(Effects)) { Proxy = typeof(EffectFlagsProxy) },
+ nameof(RenderMode),
+ nameof(RenderFX),
+ new(nameof(ColorRender)) { Encoding = NetEncoding.Int },
+ nameof(TeamNum),
+ nameof(CollisionGroup),
+ nameof(Elasticity),
+ nameof(ShadowCastDistance),
+ new(nameof(OwnerEntity)) { Proxy = typeof(OwnerEntityProxy) },
+ nameof(EffectEntity),
+ new(nameof(NetworkMoveParent)) { Encoding = NetEncoding.Int, Proxy = typeof(MoveParentProxy) },
+ nameof(ParentAttachment),
+ new(nameof(MoveType)) { Proxy = typeof(MoveTypeProxy) },
+ new(nameof(MoveCollide)) { Proxy = typeof(MoveCollideProxy) },
+ new(nameof(Collision)) { Encoding = NetEncoding.DataTable, DataTable = "DT_CollisionProperty" },
+ new(nameof(TextureFrameIndex)) { Encoding = NetEncoding.Int },
+ new(nameof(PredictableIdProps)) { Name = "predictable_id" },
+ new(nameof(SimulatedEveryTick)) { Encoding = NetEncoding.Int, Proxy = typeof(InterpolationAmountProxy) },
+ new(nameof(AnimatedEveryTick)) { Encoding = NetEncoding.Int, Proxy = typeof(InterpolationAmountProxy) },
+ nameof(AlternateSorting),
+ nameof(m_takedamage),
+ nameof(RealClassName),
+ nameof(OverrideMaterial),
+ new(nameof(OverrideSubMaterials)) { Encoding = NetEncoding.Array2 },
+ nameof(Health),
+ nameof(MaxHealth),
+ nameof(SpawnFlags),
+ nameof(GModFlags),
+ nameof(OnFire),
+ nameof(CreationTime),
+ new(nameof(Velocity)) { Encoding = NetEncoding.VectorElements, Proxy = typeof(LocalVelocityProxy) },
+ new(nameof(GMOD_DataTable)) { Encoding = NetEncoding.GModTable },
+ nameof(GMOD_bool),
+ nameof(GMOD_float),
+ nameof(GMOD_int),
+ nameof(GMOD_Vector),
+ nameof(GMOD_QAngle),
+ nameof(GMOD_EHANDLE),
+ new(nameof(GMOD_String0)) { Encoding = NetEncoding.String },
+ new(nameof(GMOD_String1)) { Encoding = NetEncoding.String },
+ new(nameof(GMOD_String2)) { Encoding = NetEncoding.String },
+ new(nameof(GMOD_String3)) { Encoding = NetEncoding.String },
+ nameof(CreationID),
+ nameof(MapCreatedID),
+ ];
+
+ [PredictionTable]
+ public static readonly PredictionField[] Prediction = [
+ nameof(Gravity),
+ new(nameof(NetworkOrigin)) { Tolerance = coordTolerance },
+ new(nameof(NetworkAngles)) { Flags = FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.NoErrorCheck },
+ new(nameof(ModelIndex)) { Flags = FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.ModelIndex },
+ nameof(RenderMode),
+ nameof(RenderFX),
+ nameof(TeamNum),
+ nameof(OwnerEntity),
+ nameof(NetworkMoveParent),
+ nameof(MoveType),
+ nameof(MoveCollide),
+ new(nameof(Collision)) { Embedded = true },
+ new(nameof(Velocity)) { Tolerance = 0.5f },
+ new(nameof(Friction)) { Flags = FieldTypeDescFlags.InSendTable },
+ nameof(BaseVelocity),
+ nameof(WaterLevel),
+ new(nameof(ViewOffset)) { Flags = FieldTypeDescFlags.InSendTable, Tolerance = 0.25f },
+ nameof(Origin),
+ nameof(Rotation),
+ nameof(WaterType),
+ nameof(AbsOrigin),
+ nameof(AbsRotation),
+ nameof(ProxyRandomValue),
+ nameof(Dormant),
+ new(nameof(flags)) { Flags = FieldTypeDescFlags.InSendTable },
+ new(nameof(eflags)) { Type = FieldType.Integer },
+ nameof(AbsVelocity),
+ nameof(AngVelocity),
+ ];
+
public delegate void BASEPTR(C_BaseEntity self);
public delegate void ENTITYFUNCPTR(C_BaseEntity self, C_BaseEntity? other);
@@ -510,6 +607,62 @@ private static void cc_cl_interp_all_changed(IConVar ivar, in ConVarChangeContex
return null;
}
+ public static class AnimTimeProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_AnimTime(in data, instance, field);
+ }
+
+ public static class SimulationTimeProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_SimulationTime(in data, instance, field);
+ }
+
+ public static class ModelIndexProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_IntToModelIndex16_BackCompatible(in data, instance, field);
+ }
+
+ public static class EffectFlagsProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_EffectFlags(in data, instance, field);
+ }
+
+ public static class OwnerEntityProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_OwnerEntity(in data, instance, field);
+ }
+
+ public static class MoveParentProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_IntToMoveParent(in data, instance, field);
+ }
+
+ public static class MoveTypeProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_MoveType(in data, instance, field);
+ }
+
+ public static class MoveCollideProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_MoveCollide(in data, instance, field);
+ }
+
+ public static class InterpolationAmountProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) => RecvProxy_InterpolationAmountChanged(in data, instance, field);
+ }
+
+ public static class LocalVelocityProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) {
+ switch (((DynamicAccessor)field).Index) {
+ case 0: RecvProxy_LocalVelocityX(in data, instance, field); break;
+ case 1: RecvProxy_LocalVelocityY(in data, instance, field); break;
+ default: RecvProxy_LocalVelocityZ(in data, instance, field); break;
+ }
+ }
+ }
+
private static void RecvProxy_AnimTime(ref readonly RecvProxyData data, object instance, IFieldAccessor field) {
C_BaseEntity pEntity = (C_BaseEntity)instance;
@@ -528,15 +681,8 @@ private static void RecvProxy_EffectFlags(ref readonly RecvProxyData data, objec
}
- public static RecvTable DT_AnimTimeMustBeFirst = new(nameof(DT_AnimTimeMustBeFirst), [
- RecvPropInt(FIELD.OF(nameof(AnimTime)), 0, RecvProxy_AnimTime),
- ]);
- public static RecvTable DT_PredictableId = new(nameof(DT_PredictableId), [
- RecvPropPredictableId(FIELD.OF(nameof(PredictableID))),
- RecvPropInt(FIELD.OF(nameof(b_IsPlayerSimulated))),
- ]);
protected static void RecvProxy_SimulationTime(ref readonly RecvProxyData data, object instance, IFieldAccessor field) {
C_BaseEntity entity = (C_BaseEntity)instance;
@@ -554,80 +700,6 @@ protected static void RecvProxy_SimulationTime(ref readonly RecvProxyData data,
entity.SimulationTime = (t * TICK_INTERVAL);
}
- public static RecvTable DT_BaseEntity = new([
- RecvPropDataTable("AnimTimeMustBeFirst", DT_AnimTimeMustBeFirst),
-
- RecvPropInt(FIELD.OF(nameof(SimulationTime)), 0, RecvProxy_SimulationTime),
- RecvPropInt(FIELD.OF(nameof(InterpolationFrame))),
-
- RecvPropVector(FIELD.OF_NAMED(nameof(NetworkOrigin), "m_vecOrigin")),
- RecvPropQAngles(FIELD.OF_NAMED(nameof(NetworkAngles), "m_angRotation")),
-
- RecvPropInt(FIELD.OF(nameof(ModelIndex)), 0, RecvProxy_IntToModelIndex16_BackCompatible),
-
- RecvPropInt(FIELD.OF(nameof(Effects)), 0, RecvProxy_EffectFlags),
- RecvPropInt(FIELD.OF(nameof(RenderMode))),
- RecvPropInt(FIELD.OF(nameof(RenderFX))),
- RecvPropInt(FIELD.OF(nameof(ColorRender))),
- RecvPropInt(FIELD.OF(nameof(TeamNum))),
- RecvPropInt(FIELD.OF(nameof(CollisionGroup))),
- RecvPropFloat(FIELD.OF(nameof(Elasticity))),
- RecvPropFloat(FIELD.OF(nameof(ShadowCastDistance))),
- RecvPropEHandle(FIELD.OF(nameof(OwnerEntity)), RecvProxy_OwnerEntity),
- RecvPropEHandle(FIELD.OF(nameof(EffectEntity))),
- RecvPropInt(FIELD.OF(nameof(NetworkMoveParent)), 0, RecvProxy_IntToMoveParent),
- RecvPropInt(FIELD.OF(nameof(ParentAttachment))),
-
- RecvPropInt(FIELD.OF(nameof(MoveType)), 0, RecvProxy_MoveType),
- RecvPropInt(FIELD.OF(nameof(MoveCollide)), 0, RecvProxy_MoveCollide),
- RecvPropQAngles (FIELD.OF(nameof(Rotation))),
- RecvPropInt( FIELD.OF(nameof( TextureFrameIndex) )),
- RecvPropDataTable( "predictable_id", DT_PredictableId ),
- RecvPropInt(FIELD.OF(nameof(SimulatedEveryTick)), 0, RecvProxy_InterpolationAmountChanged),
- RecvPropInt(FIELD.OF(nameof(AnimatedEveryTick)), 0, RecvProxy_InterpolationAmountChanged),
- RecvPropBool( FIELD.OF(nameof( AlternateSorting ))),
-
- RecvPropDataTable("m_Collision", FIELD.OF(nameof(Collision)), CollisionProperty.DT_CollisionProperty, 0, RECV_GET_OBJECT_AT_FIELD(FIELD.OF(nameof(Collision)))),
-
- // gmod specific
- RecvPropInt(FIELD.OF(nameof(m_takedamage))),
- RecvPropInt(FIELD.OF(nameof(RealClassName))),
-
- RecvPropInt(FIELD.OF(nameof(OverrideMaterial))),
-
- RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(OverrideSubMaterials), 0), PropFlags.Unsigned),
- RecvPropArray2(null, 32, "m_OverrideSubMaterials"),
-
- RecvPropInt(FIELD.OF(nameof(Health))),
- RecvPropInt(FIELD.OF(nameof(MaxHealth))),
- RecvPropInt(FIELD.OF(nameof(SpawnFlags))),
- RecvPropInt(FIELD.OF(nameof(GModFlags))),
- RecvPropBool(FIELD.OF(nameof(OnFire))),
- RecvPropFloat(FIELD.OF(nameof(CreationTime))),
-
- RecvPropFloat(FIELD.OF_VECTORELEM(nameof(Velocity), 0), 0, RecvProxy_LocalVelocityX),
- RecvPropFloat(FIELD.OF_VECTORELEM(nameof(Velocity), 1), 0, RecvProxy_LocalVelocityY),
- RecvPropFloat(FIELD.OF_VECTORELEM(nameof(Velocity), 2), 0, RecvProxy_LocalVelocityZ),
-
- // NW2 table
- RecvPropGModTable(FIELD.OF(nameof(GMOD_DataTable))),
-
- // Addon exposed data tables
- RecvPropArray3(FIELD.OF_ARRAY(nameof(GMOD_bool)), RecvPropBool(FIELD.OF_ARRAYINDEX(nameof(GMOD_bool), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(GMOD_float)), RecvPropFloat(FIELD.OF_ARRAYINDEX(nameof(GMOD_float), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(GMOD_int)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(GMOD_int), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(GMOD_Vector)), RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(GMOD_Vector), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(GMOD_QAngle)), RecvPropQAngles(FIELD.OF_ARRAYINDEX(nameof(GMOD_QAngle), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(GMOD_EHANDLE)), RecvPropEHandle(FIELD.OF_ARRAYINDEX(nameof(GMOD_EHANDLE), 0))),
- RecvPropString(FIELD.OF(nameof(GMOD_String0))),
- RecvPropString(FIELD.OF(nameof(GMOD_String1))),
- RecvPropString(FIELD.OF(nameof(GMOD_String2))),
- RecvPropString(FIELD.OF(nameof(GMOD_String3))),
-
- // Creation IDs
- RecvPropInt(FIELD.OF(nameof(CreationID))),
- RecvPropInt(FIELD.OF(nameof(MapCreatedID))),
- ]);
private static void RecvProxy_OwnerEntity(ref readonly RecvProxyData data, object instance, IFieldAccessor field) {
RecvProxy_IntToEHandle(in data, instance, field);
@@ -683,43 +755,12 @@ private static void RecvProxy_MoveType(ref readonly RecvProxyData data, object i
public void SetCollisionBounds(in Vector3 mins, in Vector3 maxs) => CollisionProp().SetCollisionBounds(in mins, in maxs);
- public static readonly ClientClass ClientClass = new ClientClass(DT_BaseEntity);
const float coordTolerance = 2.0f / (float)(1 << (int)COORD_FRACTIONAL_BITS);
public float GetGravity() => Gravity;
public void SetGravity(float gravity) => Gravity = gravity;
- public static readonly DataMap PredMap = new(typeof(C_BaseEntity), [
- DEFINE.PRED_TYPEDESCRIPTION( nameof(Collision), CollisionProperty.PredMap ),
- DEFINE.PRED_FIELD(nameof(MoveType), FieldType.Character, FieldTypeDescFlags.InSendTable),
- DEFINE.PRED_FIELD(nameof(MoveCollide), FieldType.Character, FieldTypeDescFlags.InSendTable),
- DEFINE.FIELD(nameof(AbsVelocity), FieldType.Vector),
- DEFINE.PRED_FIELD_TOL(nameof(Velocity), FieldType.Vector, FieldTypeDescFlags.InSendTable, 0.5f),
- DEFINE.PRED_FIELD(nameof(RenderMode), FieldType.Character, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD(nameof(RenderFX), FieldType.Character, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD(nameof(flags), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD_TOL(nameof(ViewOffset), FieldType.Vector, FieldTypeDescFlags.InSendTable, 0.25f ),
- DEFINE.PRED_FIELD(nameof(ModelIndex), FieldType.Short, FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.ModelIndex ),
- DEFINE.PRED_FIELD(nameof(Friction), FieldType.Float, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD(nameof(TeamNum), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD(nameof(OwnerEntity), FieldType.EHandle, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD(nameof(NetworkMoveParent), FieldType.EHandle, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD_TOL(nameof(NetworkOrigin), FieldType.Vector, FieldTypeDescFlags.InSendTable, coordTolerance ),
- DEFINE.PRED_FIELD(nameof(NetworkAngles), FieldType.Vector, FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.NoErrorCheck ),
- DEFINE.FIELD(nameof(AbsOrigin), FieldType.Vector ),
- DEFINE.FIELD(nameof(AbsRotation), FieldType.Vector ),
- DEFINE.FIELD(nameof(Origin), FieldType.Vector ),
- DEFINE.FIELD(nameof(Rotation), FieldType.Vector ),
- DEFINE.FIELD(nameof(WaterLevel), FieldType.Character ),
- DEFINE.FIELD(nameof(WaterType), FieldType.Character ),
- DEFINE.FIELD(nameof(AngVelocity), FieldType.Vector ),
- DEFINE.FIELD(nameof(Dormant), FieldType.Boolean ),
- DEFINE.FIELD(nameof(BaseVelocity), FieldType.Vector ),
- DEFINE.FIELD(nameof(eflags), FieldType.Integer ),
- DEFINE.FIELD(nameof(Gravity), FieldType.Float ),
- DEFINE.FIELD(nameof(ProxyRandomValue), FieldType.Float ),
- ]); public virtual DataMap? GetPredDescMap() => PredMap;
public static readonly DataMap DataDesc = new(typeof(C_BaseEntity), [
DEFINE.FIELD(nameof(ModelName), FieldType.String),
@@ -736,6 +777,7 @@ private static void RecvProxy_MoveType(ref readonly RecvProxyData data, object i
public float Gravity;
public C_BaseEntity() {
+ GMOD_EHANDLEForModify() = new();
AddVar(this, DA_Origin, IV_Origin, LatchFlags.LatchSimulationVar);
AddVar(this, DA_Rotation, IV_Rotation, LatchFlags.LatchSimulationVar);
@@ -764,119 +806,146 @@ public C_BaseEntity() {
private Model? Model;
ModelInstanceHandle_t ModelInstance;
- [NetworkName("m_flAnimTime")]
+ [NetworkVar("m_flAnimTime")]
public TimeUnit_t AnimTime;
- public TimeUnit_t OldAnimTime;
-
- [NetworkName("m_flSimulationTime")]
+ [NetworkVar("m_flSimulationTime")]
public TimeUnit_t SimulationTime;
- public TimeUnit_t OldSimulationTime;
-
- public TimeUnit_t CreateTime;
-
- [NetworkName("m_ubInterpolationFrame")]
+ [NetworkVar("m_ubInterpolationFrame")]
public byte InterpolationFrame;
- public byte OldInterpolationFrame;
- [NetworkName("m_nModelIndex")]
+ [NetworkVar("m_vecOrigin")]
+ public Vector3 NetworkOrigin;
+ [NetworkVar("m_angRotation")]
+ public QAngle NetworkAngles;
+ [NetworkVar("m_nModelIndex")]
public int ModelIndex;
- public byte OldParentAttachment;
- [NetworkName("m_iParentAttachment")]
+ [NetworkVar("m_fEffects")]
+ public int Effects;
+ [NetworkVar("m_nRenderMode")]
+ public byte RenderMode;
+ [NetworkVar("m_nRenderFX")]
+ public byte RenderFX;
+ [NetworkVar("m_clrRender")]
+ public Color ColorRender;
+ [NetworkVar("m_iTeamNum")]
+ public int TeamNum;
+ [NetworkVar("m_CollisionGroup")]
+ public int CollisionGroup;
+ [NetworkVar("m_flElasticity")]
+ public float Elasticity;
+ [NetworkVar("m_flShadowCastDistance")]
+ public float ShadowCastDistance;
+ [NetworkVar("m_hOwnerEntity")]
+ public EHANDLE OwnerEntity = new();
+ [NetworkVar("m_hEffectEntity")]
+ public EHANDLE EffectEntity = new();
+ [NetworkVar("moveparent")]
+ public EHANDLE NetworkMoveParent = new();
+ [NetworkVar("m_iParentAttachment")]
public byte ParentAttachment;
-
- [NetworkName("movetype")]
+ [NetworkVar("movetype")]
public byte MoveType;
- [NetworkName("movecollide")]
+ [NetworkVar("movecollide")]
public byte MoveCollide;
- [NetworkName("m_iTextureFrameIndex")]
+ [NetworkVar("m_Collision")]
+ public CollisionProperty Collision = new();
+ [NetworkVar("m_iTextureFrameIndex")]
public bool TextureFrameIndex;
- [NetworkName("m_bSimulatedEveryTick")]
+ [NetworkVar("m_PredictableID")]
+ public PredictableId PredictableID = new();
+ [NetworkVar("m_bSimulatedEveryTick")]
public bool SimulatedEveryTick;
- [NetworkName("m_bAnimatedEveryTick")]
+ [NetworkVar("m_bAnimatedEveryTick")]
public bool AnimatedEveryTick;
- [NetworkName("m_bAlternateSorting")]
+ [NetworkVar("m_bAlternateSorting")]
public bool AlternateSorting;
-
- [NetworkName("m_PredictableID")]
- public PredictableId PredictableID = new();
-
+ [NetworkVar("m_takedamage")]
public byte m_takedamage;
- [NetworkName("m_RealClassName")]
+ [NetworkVar("m_RealClassName")]
public ushort RealClassName;
- [NetworkName("m_OverrideMaterial")]
+ [NetworkVar("m_OverrideMaterial")]
public ushort OverrideMaterial;
- [NetworkName("m_OverrideSubMaterials")]
+ [NetworkVar("m_OverrideSubMaterials")]
public InlineArray32 OverrideSubMaterials;
- [NetworkName("m_iHealth")]
+ [NetworkVar("m_iHealth")]
public int Health;
- public int GetHealth() => Health;
- public int SetHealth(int amt) => Health = amt;
- [NetworkName("m_iMaxHealth")]
+ [NetworkVar("m_iMaxHealth")]
public int MaxHealth;
- [NetworkName("m_spawnflags")]
+ [NetworkVar("m_spawnflags")]
public int SpawnFlags;
- [NetworkName("m_iGModFlags")]
+ [NetworkVar("m_iGModFlags")]
public int GModFlags;
- [NetworkName("m_bOnFire")]
+ [NetworkVar("m_bOnFire")]
public bool OnFire;
- [NetworkName("m_CreationTime")]
+ [NetworkVar("m_CreationTime")]
public float CreationTime;
- [NetworkName("m_vecVelocity")]
+ [NetworkVar("m_vecVelocity")]
public Vector3 Velocity;
- [NetworkName("m_iCreationID")]
+ [NetworkVar("m_GMOD_DataTable")]
+ public readonly IGMODDataTable GMOD_DataTable;
+ [NetworkVar("m_GMOD_bool")]
+ public partial ref readonly InlineArray32 GMOD_bool { get; }
+ [NetworkVar("m_GMOD_float")]
+ public partial ref readonly InlineArray32 GMOD_float { get; }
+ [NetworkVar("m_GMOD_int")]
+ public partial ref readonly InlineArray32 GMOD_int { get; }
+ [NetworkVar("m_GMOD_Vector")]
+ public partial ref readonly InlineArray32 GMOD_Vector { get; }
+ [NetworkVar("m_GMOD_QAngle")]
+ public partial ref readonly InlineArray32 GMOD_QAngle { get; }
+ [NetworkVar("m_GMOD_EHANDLE")]
+ public partial ref readonly InlineArrayNew32 GMOD_EHANDLE { get; }
+ [NetworkVar("m_GMOD_String0")]
+ public partial ref readonly InlineArray512 GMOD_String0 { get; }
+ [NetworkVar("m_GMOD_String1")]
+ public partial ref readonly InlineArray512 GMOD_String1 { get; }
+ [NetworkVar("m_GMOD_String2")]
+ public partial ref readonly InlineArray512 GMOD_String2 { get; }
+ [NetworkVar("m_GMOD_String3")]
+ public partial ref readonly InlineArray512 GMOD_String3 { get; }
+ [NetworkVar("m_iCreationID")]
public int CreationID;
- [NetworkName("m_iMapCreatedID")]
+ [NetworkVar("m_iMapCreatedID")]
public int MapCreatedID;
- [NetworkName("m_flFriction")]
+ [NetworkVar("m_flFriction")]
public float Friction;
+ [NetworkVar("m_nSpeed")]
+ public int Speed;
+ [NetworkVar("m_hGroundEntity")]
+ public EHANDLE GroundEntity = new();
+ [NetworkVar("m_lifeState")]
+ public int LifeState;
+ [NetworkVar("m_vecBaseVelocity")]
+ public Vector3 BaseVelocity;
+ [NetworkVar("m_nNextThinkTick")]
+ public int NextThinkTick;
+ [NetworkVar("m_nWaterLevel")]
+ public byte WaterLevel;
+ [NetworkVar("m_vecViewOffset")]
+ public Vector3 ViewOffset;
+ [NetworkVar("m_vecOrigin")]
+ public Vector3 Origin;
+ [NetworkVar("m_angRotation")]
+ public QAngle Rotation;
+ public TimeUnit_t OldAnimTime;
+
+ public TimeUnit_t OldSimulationTime;
+
+ public TimeUnit_t CreateTime;
+
+ public byte OldInterpolationFrame;
+ public byte OldParentAttachment;
+
+
+
+ public int GetHealth() => Health;
+ public int SetHealth(int amt) => Health = amt;
- [NetworkName("m_Collision")]
- public CollisionProperty Collision = new();
- [NetworkName("m_fEffects")]
- public int Effects;
- [NetworkName("m_nRenderMode")]
- public byte RenderMode;
- [NetworkName("m_nRenderFX")]
- public byte RenderFX;
public byte RenderFXBlend;
- [NetworkName("m_clrRender")]
- public Color ColorRender;
- [NetworkName("m_CollisionGroup")]
- public int CollisionGroup;
- [NetworkName("m_flElasticity")]
- public float Elasticity;
- [NetworkName("m_flShadowCastDistance")]
- public float ShadowCastDistance;
public byte OldRenderMode;
- [NetworkName("m_GMOD_bool")]
- public InlineArray32 GMOD_bool;
- [NetworkName("m_GMOD_float")]
- public InlineArray32 GMOD_float;
- [NetworkName("m_GMOD_int")]
- public InlineArray32 GMOD_int;
- [NetworkName("m_GMOD_Vector")]
- public InlineArray32 GMOD_Vector;
- [NetworkName("m_GMOD_QAngle")]
- public InlineArray32 GMOD_QAngle;
- [NetworkName("m_GMOD_EHANDLE")]
- public InlineArrayNew32 GMOD_EHANDLE = new();
- [NetworkName("m_GMOD_String0")]
- public InlineArray512 GMOD_String0;
- [NetworkName("m_GMOD_String1")]
- public InlineArray512 GMOD_String1;
- [NetworkName("m_GMOD_String2")]
- public InlineArray512 GMOD_String2;
- [NetworkName("m_GMOD_String3")]
- public InlineArray512 GMOD_String3;
-
- [NetworkName("m_GMOD_DataTable")]
- public readonly IGMODDataTable GMOD_DataTable;
- [NetworkName("m_nSpeed")]
- public int Speed;
- [NetworkName("m_iTeamNum")]
- public int TeamNum;
+
public int GetTeamNumber() => TeamNum;
IPhysicsObject? PhysicsObject = null!;
@@ -886,26 +955,10 @@ public void VPhysicsUpdate(IPhysicsObject physics) { }
public bool IsFloating() => false;
- [NetworkName("m_hOwnerEntity")]
- public EHANDLE OwnerEntity = new();
public C_BaseEntity? GetOwnerEntity() => (C_BaseEntity?)OwnerEntity.Get();
- [NetworkName("m_hEffectEntity")]
- public EHANDLE EffectEntity = new();
- [NetworkName("m_hGroundEntity")]
- public EHANDLE GroundEntity = new();
- [NetworkName("moveparent")]
- public EHANDLE NetworkMoveParent = new();
public EHANDLE OldMoveParent = new();
public string? ModelName;
- [NetworkName("m_lifeState")]
- public int LifeState;
- [NetworkName("m_vecBaseVelocity")]
- public Vector3 BaseVelocity;
- [NetworkName("m_nNextThinkTick")]
- public int NextThinkTick;
public int LastThinkTick;
- [NetworkName("m_nWaterLevel")]
- public byte WaterLevel;
public byte WaterType;
public long CreationTick;
@@ -914,23 +967,15 @@ public void VPhysicsUpdate(IPhysicsObject physics) { }
public Vector3 AbsOrigin;
public QAngle AbsRotation;
- [NetworkName("m_vecViewOffset")]
- public Vector3 ViewOffset;
public Vector3 OldOrigin;
public QAngle OldRotation;
- public Vector3 NetworkOrigin;
- public QAngle NetworkAngles;
public EntClientFlags EntClientFlags;
public Source.InlineArray4 RenderingClipPlane;
public bool EnableRenderingClipPlane;
- [NetworkName("m_vecOrigin")]
- public Vector3 Origin;
public readonly InterpolatedVar IV_Origin = new("Origin");
- [NetworkName("m_angRotation")]
- public QAngle Rotation;
public readonly InterpolatedVar IV_Rotation = new("Rotation");
@@ -1133,7 +1178,6 @@ public virtual bool GetSoundSpatialization(ref SpatializationInfo info) {
return true;
}
- public virtual ClientClass GetClientClass() => ClientClassRetriever.GetOrError(GetType());
public IClientNetworkable GetClientNetworkable() => this;
@@ -2302,7 +2346,7 @@ public void SetNetworkAngles(in QAngle angles) {
- [NetworkName("m_fFlags")]
+ [NetworkVar("m_fFlags")]
protected int flags;
EFL eflags = EFL.DirtyAbsTransform; // << TODO: FIGURE OUT WHAT ACTUALLY INITIALIZES THIS.
public Matrix3x4 CoordinateFrame;
diff --git a/Game.Client/C_BaseFlex.cs b/Game.Client/C_BaseFlex.cs
index d9478315..bf252d96 100644
--- a/Game.Client/C_BaseFlex.cs
+++ b/Game.Client/C_BaseFlex.cs
@@ -157,28 +157,26 @@ public partial class C_BaseFlex : C_BaseAnimatingOverlay, IHasLocalToGlobalFlexS
readonly Source.Common.Audio.MouthInfo mouth = new();
public override Source.Common.Audio.MouthInfo? GetMouth() => mouth;
- public static readonly RecvTable DT_BaseFlex = new(DT_BaseAnimatingOverlay, [
- RecvPropArray3 (FIELD.OF_ARRAY(nameof(FlexWeight)), RecvPropFloat(FIELD.OF_ARRAY(nameof(FlexWeight)))),
- RecvPropInt (FIELD.OF(nameof(BlinkToggle))),
- RecvPropVector (FIELD.OF(nameof(ViewTarget))),
-
- RecvPropFloat ( FIELD.OF_VECTORELEM(nameof(ViewOffset), 0)),
- RecvPropFloat ( FIELD.OF_VECTORELEM(nameof(ViewOffset), 1)),
- RecvPropFloat ( FIELD.OF_VECTORELEM(nameof(ViewOffset), 2)),
-
- RecvPropVector ( FIELD.OF(nameof(Lean))),
- RecvPropVector ( FIELD.OF(nameof(Shift))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BaseFlex);
- [NetworkName("m_flexWeight")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(FlexWeight),
+ nameof(BlinkToggle),
+ nameof(ViewTarget),
+
+ new(nameof(ViewOffset)) { Encoding = NetEncoding.VectorElements },
+
+ nameof(Lean),
+ nameof(Shift),
+ ];
+ [NetworkVar("m_flexWeight")]
public InlineArray96 FlexWeight;
- [NetworkName("m_blinktoggle")]
+ [NetworkVar("m_blinktoggle")]
public int BlinkToggle;
- [NetworkName("m_viewtarget")]
+ [NetworkVar("m_viewtarget")]
public Vector3 ViewTarget;
- [NetworkName("m_vecLean")]
+ [NetworkVar("m_vecLean")]
public Vector3 Lean;
- [NetworkName("m_vecShift")]
+ [NetworkVar("m_vecShift")]
public Vector3 Shift;
static readonly DynamicAccessor DA_ViewTarget = FIELD.OF(nameof(ViewTarget));
diff --git a/Game.Client/C_BasePlayer.cs b/Game.Client/C_BasePlayer.cs
index a36d5757..9083d18f 100644
--- a/Game.Client/C_BasePlayer.cs
+++ b/Game.Client/C_BasePlayer.cs
@@ -17,7 +17,6 @@
using System.Runtime.CompilerServices;
using System.Security.AccessControl;
-using DEFINE = Source.DEFINE;
using FIELD = Source.FIELD;
namespace Game.Client;
@@ -54,44 +53,38 @@ public C_BasePlayer() {
AddVar(this, DA_ViewOffset, IV_ViewOffset, LatchFlags.LatchSimulationVar, true);
}
- public static readonly DataMap PM_PlayerState = new(typeof(PlayerState), [
- DEFINE.PRED_FIELD( nameof(PlayerState.DeadFlag), FieldType.Boolean, FieldTypeDescFlags.InSendTable ),
- ]);
- public static readonly RecvTable DT_PlayerState = new(nameof(DT_PlayerState), [
- RecvPropInt(FIELD.OF(nameof(PlayerState.DeadFlag)))
- ]);
-
- public static readonly new DataMap PredMap = new(typeof(C_BasePlayer), C_BaseCombatCharacter.PredMap, [
- DEFINE.PRED_TYPEDESCRIPTION( nameof(Local), PlayerLocalData.PredMap ),
- DEFINE.PRED_TYPEDESCRIPTION( nameof(pl), PM_PlayerState ),
- DEFINE.PRED_FIELD( nameof(FOV), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(ZoomOwner), FieldType.EHandle, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(FOVTime), FieldType.Double, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(FOVStart), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(Vehicle), FieldType.EHandle, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD_TOL( nameof(Maxspeed), FieldType.Float, FieldTypeDescFlags.InSendTable, 0.5f ),
- DEFINE.PRED_FIELD( nameof(Health), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(NextThinkTick), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(LifeState), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(WaterLevel), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD_TOL( nameof(BaseVelocity), FieldType.Vector, FieldTypeDescFlags.InSendTable, 0.05f ),
- DEFINE.FIELD( nameof(Buttons), FieldType.Integer ),
- DEFINE.FIELD( nameof(WaterJumpTime), FieldType.Float ),
- DEFINE.FIELD( nameof(Impulse), FieldType.Integer ),
- DEFINE.FIELD( nameof(StepSoundTime), FieldType.Float ),
- DEFINE.FIELD( nameof(SwimSoundTime), FieldType.Float ),
- DEFINE.FIELD( nameof(LadderNormal), FieldType.Vector ),
- DEFINE.FIELD( nameof(AfButtonLast), FieldType.Integer ),
- DEFINE.FIELD( nameof(AfButtonPressed), FieldType.Integer ),
- DEFINE.FIELD( nameof(AfButtonReleased), FieldType.Integer ),
- DEFINE.PRED_FIELD( nameof(LastWeapon), FieldType.EHandle, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(TickBase), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(GroundEntity), FieldType.EHandle, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_ARRAY( nameof(ViewModel), FieldType.EHandle, MAX_VIEWMODELS, FieldTypeDescFlags.InSendTable ),
- DEFINE.FIELD( nameof(SurfaceFriction), FieldType.Float ),
- DEFINE.FIELD( nameof(ButtonsArray), FieldType.Integer ),
- DEFINE.PRED_FIELD( nameof(UseWeaponsInVehicle), FieldType.Boolean, FieldTypeDescFlags.InSendTable ),
- ]); public override DataMap? GetPredDescMap() => PredMap;
+ [PredictionTable]
+ public static readonly new PredictionField[] Prediction = [
+ new(nameof(Local)) { Embedded = true },
+ new(nameof(pl)) { Embedded = true },
+ new(nameof(FOV)) { Type = FieldType.Integer },
+ nameof(ZoomOwner),
+ new(nameof(FOVTime)) { Type = FieldType.Double },
+ new(nameof(FOVStart)) { Type = FieldType.Integer },
+ nameof(Vehicle),
+ new(nameof(Maxspeed)) { Type = FieldType.Float, Tolerance = 0.5f },
+ new(nameof(Health)) { Type = FieldType.Integer },
+ new(nameof(NextThinkTick)) { Type = FieldType.Integer },
+ new(nameof(LifeState)) { Type = FieldType.Integer },
+ new(nameof(WaterLevel)) { Type = FieldType.Integer, Flags = FieldTypeDescFlags.InSendTable },
+ new(nameof(BaseVelocity)) { Type = FieldType.Vector, Tolerance = 0.05f },
+ new(nameof(Buttons)) { Type = FieldType.Integer },
+ new(nameof(WaterJumpTime)) { Type = FieldType.Float },
+ new(nameof(Impulse)) { Type = FieldType.Integer },
+ new(nameof(StepSoundTime)) { Type = FieldType.Float },
+ new(nameof(SwimSoundTime)) { Type = FieldType.Float },
+ new(nameof(LadderNormal)) { Type = FieldType.Vector },
+ new(nameof(AfButtonLast)) { Type = FieldType.Integer },
+ new(nameof(AfButtonPressed)) { Type = FieldType.Integer },
+ new(nameof(AfButtonReleased)) { Type = FieldType.Integer },
+ nameof(LastWeapon),
+ new(nameof(TickBase)) { Type = FieldType.Integer },
+ nameof(GroundEntity),
+ nameof(ViewModel),
+ new(nameof(SurfaceFriction)) { Type = FieldType.Float },
+ new(nameof(ButtonsArray)) { Type = FieldType.Integer },
+ nameof(UseWeaponsInVehicle),
+ ];
public int ButtonsArray;
@@ -183,26 +176,28 @@ public bool AudioStateIsUnderwater(Vector3 mainViewOrigin) {
return GetWaterLevel() >= Shared.WaterLevel.Eyes;
}
- public static readonly RecvTable DT_LocalPlayerExclusive = new(nameof(DT_LocalPlayerExclusive), [
- RecvPropDataTable("m_Local", FIELD.OF(nameof(Local)), PlayerLocalData.DT_Local, 0, DataTableRecvProxy_PointerDataTable),
- RecvPropFloat(FIELD.OF(nameof(Friction))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Ammo)), RecvPropInt( FIELD.OF_ARRAYINDEX(nameof(Ammo)))),
- RecvPropInt(FIELD.OF(nameof(TickBase))),
- RecvPropInt(FIELD.OF(nameof(NextThinkTick))),
- RecvPropEHandle(FIELD.OF(nameof(LastWeapon))),
- RecvPropEHandle(FIELD.OF(nameof(GroundEntity))),
- RecvPropVector(FIELD.OF(nameof(BaseVelocity))),
- RecvPropEHandle(FIELD.OF(nameof(ConstraintEntity))),
- RecvPropVector(FIELD.OF(nameof(ConstraintCenter))),
- RecvPropFloat(FIELD.OF(nameof(ConstraintRadius))),
- RecvPropFloat(FIELD.OF(nameof(ConstraintWidth))),
- RecvPropFloat(FIELD.OF(nameof(ConstraintSpeedFactor))),
- RecvPropFloat(FIELD.OF(nameof(DeathTime))),
- RecvPropFloat(FIELD.OF(nameof(LaggedMovementValue))),
- RecvPropEHandle(FIELD.OF(nameof(TonemapController))),
- RecvPropEHandle(FIELD.OF(nameof(ViewEntity))),
- RecvPropBool(FIELD.OF(nameof(DisableWorldClicking))),
- ]);
+ [NetworkTable("DT_LocalPlayerExclusive")]
+ public static readonly NetworkProp[] LocalPlayerExclusiveProps = [
+ new(nameof(Local)) { Encoding = NetEncoding.DataTable, DataTable = "DT_Local" },
+ new(nameof(ViewOffset)) { Encoding = NetEncoding.VectorElements },
+ nameof(Friction),
+ nameof(Ammo),
+ nameof(TickBase),
+ nameof(NextThinkTick),
+ nameof(LastWeapon),
+ nameof(GroundEntity),
+ nameof(BaseVelocity),
+ nameof(ConstraintEntity),
+ nameof(ConstraintCenter),
+ nameof(ConstraintRadius),
+ nameof(ConstraintWidth),
+ nameof(ConstraintSpeedFactor),
+ new(nameof(DeathTime)) { Encoding = NetEncoding.Float },
+ new(nameof(LaggedMovementValue)) { Encoding = NetEncoding.Float },
+ nameof(TonemapController),
+ nameof(ViewEntity),
+ nameof(DisableWorldClicking),
+ ];
public virtual void ItemPreFrame() { }
@@ -452,30 +447,26 @@ private void PlayPlayerJingle() {
}
- public static readonly RecvTable DT_BasePlayer = new(DT_BaseCombatCharacter, [
- RecvPropDataTable(nameof(pl), FIELD.OF(nameof(pl)), DT_PlayerState, proxyFn: DataTableRecvProxy_PointerDataTable),
- RecvPropEHandle(FIELD.OF(nameof(Vehicle))),
- RecvPropEHandle(FIELD.OF(nameof(UseEntity))),
- RecvPropInt(FIELD.OF(nameof(LifeState))),
- RecvPropEHandle(FIELD.OF(nameof(ColorCorrectionCtrl))), // << gmod specific
- RecvPropFloat(FIELD.OF(nameof(Maxspeed))),
- RecvPropInt(FIELD.OF("flags")),
- // todo: RecvProxy_ObserverMode
- RecvPropInt(FIELD.OF(nameof(ObserverMode))),
- // todo: RecvProxy_ObserverTarget
- RecvPropEHandle(FIELD.OF(nameof(ObserverTarget))),
- RecvPropFloat(FIELD.OF(nameof(FOV))),
- RecvPropFloat(FIELD.OF(nameof(FOVStart))),
- RecvPropTime64(FIELD.OF(nameof(FOVTime))),
- RecvPropFloat(FIELD.OF(nameof(DefaultFOV))),
- RecvPropEHandle(FIELD.OF(nameof(ZoomOwner))),
-
- RecvPropEHandle(FIELD.OF_ARRAYINDEX(nameof(ViewModel), 0)),
- RecvPropArray(FIELD.OF_ARRAY(nameof(ViewModel))),
-
- RecvPropBool(FIELD.OF(nameof(UseWeaponsInVehicle))),
- RecvPropDataTable("localdata", DT_LocalPlayerExclusive),
- ]); public static readonly new ClientClass ClientClass = new ClientClass(DT_BasePlayer);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(pl)) { Encoding = NetEncoding.DataTable, DataTable = "DT_PlayerState" },
+ nameof(Vehicle),
+ nameof(UseEntity),
+ nameof(LifeState),
+ nameof(ColorCorrectionCtrl), // << gmod specific
+ nameof(Maxspeed),
+ nameof(flags),
+ nameof(ObserverMode), // todo: RecvProxy_ObserverMode
+ nameof(ObserverTarget), // todo: RecvProxy_ObserverTarget
+ new(nameof(FOV)) { Encoding = NetEncoding.Float },
+ new(nameof(FOVStart)) { Encoding = NetEncoding.Float },
+ nameof(FOVTime),
+ nameof(DefaultFOV),
+ nameof(ZoomOwner),
+ new(nameof(ViewModel)) { Encoding = NetEncoding.Array },
+ nameof(UseWeaponsInVehicle),
+ new(nameof(LocalPlayerExclusiveProps)) { Name = "localdata" },
+ ];
static C_BasePlayer? localPlayer;
@@ -612,63 +603,64 @@ public void SetLocalViewAngles(in QAngle angles) {
pl.ViewingAngle = angles;
}
+ [NetworkVar("pl")]
internal readonly PlayerState pl = new();
- [NetworkName("m_Local")]
+ [NetworkVar("m_Local")]
public readonly PlayerLocalData Local = new();
- [NetworkName("m_hVehicle")]
+ [NetworkVar("m_hVehicle")]
EHANDLE Vehicle = new();
- [NetworkName("m_hUseEntity")]
+ [NetworkVar("m_hUseEntity")]
EHANDLE UseEntity = new();
- [NetworkName("m_hObserverTarget")]
+ [NetworkVar("m_hObserverTarget")]
EHANDLE ObserverTarget = new();
- [NetworkName("m_hZoomOwner")]
+ [NetworkVar("m_hZoomOwner")]
EHANDLE ZoomOwner = new();
- [NetworkName("m_hConstraintEntity")]
+ [NetworkVar("m_hConstraintEntity")]
public EHANDLE ConstraintEntity = new();
- [NetworkName("m_hTonemapController")]
+ [NetworkVar("m_hTonemapController")]
EHANDLE TonemapController = new();
- [NetworkName("m_hViewEntity")]
+ [NetworkVar("m_hViewEntity")]
EHANDLE ViewEntity = new();
- [NetworkName("m_hViewModel")]
+ [NetworkVar("m_hViewModel")]
InlineArrayNewMaxViewmodels> ViewModel = new();
- [NetworkName("m_bDisableWorldClicking")]
+ [NetworkVar("m_bDisableWorldClicking")]
public bool DisableWorldClicking;
public bool WorldClicking;
public Vector3 WorldClickVector;
- [NetworkName("m_flMaxspeed")]
+ [NetworkVar("m_flMaxspeed")]
public float Maxspeed;
int BonusProgress;
int BonusChallenge;
- [NetworkName("m_iObserverMode")]
+ [NetworkVar("m_iObserverMode")]
public int ObserverMode;
- [NetworkName("m_iFOV")]
+ [NetworkVar("m_iFOV")]
public int FOV;
- [NetworkName("m_iFOVStart")]
+ [NetworkVar("m_iFOVStart")]
public int FOVStart;
- [NetworkName("m_flFOVTime")]
+ [NetworkVar("m_flFOVTime")]
public TimeUnit_t FOVTime;
- [NetworkName("m_iDefaultFOV")]
+ [NetworkVar("m_iDefaultFOV")]
public float DefaultFOV;
- [NetworkName("m_vecConstraintCenter")]
+ [NetworkVar("m_vecConstraintCenter")]
public Vector3 ConstraintCenter;
- [NetworkName("m_flConstraintRadius")]
+ [NetworkVar("m_flConstraintRadius")]
public float ConstraintRadius;
- [NetworkName("m_flConstraintWidth")]
+ [NetworkVar("m_flConstraintWidth")]
public float ConstraintWidth;
- [NetworkName("m_flConstraintSpeedFactor")]
+ [NetworkVar("m_flConstraintSpeedFactor")]
public float ConstraintSpeedFactor;
InlineArray18 LastPlaceName;
- [NetworkName("m_hColorCorrectionCtrl")]
+ [NetworkVar("m_hColorCorrectionCtrl")]
EHANDLE ColorCorrectionCtrl = new();
- [NetworkName("m_bUseWeaponsInVehicle")]
+ [NetworkVar("m_bUseWeaponsInVehicle")]
bool UseWeaponsInVehicle;
public bool GetAllowWeaponsInVehicle() => UseWeaponsInVehicle;
public bool OnTarget;
- [NetworkName("m_flDeathTime")]
+ [NetworkVar("m_flDeathTime")]
public double DeathTime;
- [NetworkName("m_flLaggedMovementValue")]
+ [NetworkVar("m_flLaggedMovementValue")]
public double LaggedMovementValue;
- [NetworkName("m_nTickBase")]
+ [NetworkVar("m_nTickBase")]
public int TickBase;
public long FinalPredictedTick;
InlineArray32 AnimExtension;
diff --git a/Game.Client/C_BaseTempEntity.cs b/Game.Client/C_BaseTempEntity.cs
index e7bcddfb..2cc23720 100644
--- a/Game.Client/C_BaseTempEntity.cs
+++ b/Game.Client/C_BaseTempEntity.cs
@@ -8,8 +8,8 @@
namespace Game.Client;
-[NetworkName("CBaseTempEntity")]
-public class C_BaseTempEntity : IClientUnknown, IClientNetworkable
+[NetworkName("CBaseTempEntity", NoBase = true)]
+public partial class C_BaseTempEntity : IClientUnknown, IClientNetworkable
{
public static C_BaseTempEntity? GetDynamicList() => s_DynamicEntities;
public static C_BaseTempEntity? GetList() => s_TempEntities;
@@ -41,13 +41,7 @@ public C_BaseTempEntity() {
private static C_BaseTempEntity? s_TempEntities;
private static C_BaseTempEntity? s_DynamicEntities;
- public static readonly RecvTable DT_BaseTempEntity = new([]);
- public static readonly ClientClass ClientClass = new ClientClass(DT_BaseTempEntity);
-
public int EntIndex() => 0;
- public ClientClass GetClientClass() {
- throw new NotImplementedException();
- }
public IClientNetworkable GetClientNetworkable() => this;
public IClientRenderable GetClientRenderable() => null!;
diff --git a/Game.Client/C_BaseViewModel.cs b/Game.Client/C_BaseViewModel.cs
index aa193a0b..5880a8c2 100644
--- a/Game.Client/C_BaseViewModel.cs
+++ b/Game.Client/C_BaseViewModel.cs
@@ -8,26 +8,26 @@ namespace Game.Client;
#if GMOD_DLL
using Game.Client.GarrysMod;
#endif
-using DEFINE = Source.DEFINE;
public partial class C_BaseViewModel
{
- public static readonly new DataMap PredMap = new(typeof(C_BaseViewModel), C_BaseAnimating.PredMap, [
- DEFINE.PRED_FIELD( nameof(ModelIndex), FieldType.Short, FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.ModelIndex ),
- DEFINE.PRED_FIELD( nameof(Skin), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(Body), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(Sequence), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(_ViewModelIndex), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD_TOL( nameof(PlaybackRate), FieldType.Float, FieldTypeDescFlags.InSendTable, 0.125f ),
- DEFINE.PRED_FIELD( nameof(Effects), FieldType.Integer, FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.Override ),
- DEFINE.PRED_FIELD( nameof(AnimationParity), FieldType.Integer, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(Weapon), FieldType.EHandle, FieldTypeDescFlags.InSendTable ),
- DEFINE.PRED_FIELD( nameof(AnimTime), FieldType.Float, 0 ),
- DEFINE.FIELD( nameof(Owner), FieldType.EHandle ),
- DEFINE.FIELD( nameof(TimeWeaponIdle), FieldType.Float ),
- DEFINE.FIELD( nameof(Activity), FieldType.Integer ),
- DEFINE.PRED_FIELD( nameof(Cycle), FieldType.Float, FieldTypeDescFlags.Private | FieldTypeDescFlags.Override | FieldTypeDescFlags.NoErrorCheck ),
- ]); public override DataMap? GetPredDescMap() => PredMap;
+ [PredictionTable]
+ public static readonly new PredictionField[] Prediction = [
+ new(nameof(ModelIndex)) { Type = FieldType.Short, Flags = FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.ModelIndex },
+ new(nameof(Skin)) { Type = FieldType.Integer },
+ new(nameof(Body)) { Type = FieldType.Integer },
+ new(nameof(Sequence)) { Type = FieldType.Integer },
+ new(nameof(_ViewModelIndex)) { Type = FieldType.Integer },
+ new(nameof(PlaybackRate)) { Type = FieldType.Float, Tolerance = 0.125f },
+ new(nameof(Effects)) { Type = FieldType.Integer, Flags = FieldTypeDescFlags.InSendTable | FieldTypeDescFlags.Override },
+ new(nameof(AnimationParity)) { Type = FieldType.Integer },
+ nameof(Weapon),
+ new(nameof(AnimTime)) { Type = FieldType.Float, Flags = 0 },
+ new(nameof(Owner)) { Flags = FieldTypeDescFlags.Save },
+ new(nameof(TimeWeaponIdle)) { Type = FieldType.Float },
+ new(nameof(Activity)) { Type = FieldType.Integer },
+ new(nameof(Cycle)) { Type = FieldType.Float, Flags = FieldTypeDescFlags.Private | FieldTypeDescFlags.Override | FieldTypeDescFlags.NoErrorCheck },
+ ];
int OldAnimationParity;
#if GMOD_DLL
diff --git a/Game.Client/C_BeamSpotlight.cs b/Game.Client/C_BeamSpotlight.cs
index 84a0b7e5..68abfcff 100644
--- a/Game.Client/C_BeamSpotlight.cs
+++ b/Game.Client/C_BeamSpotlight.cs
@@ -3,37 +3,36 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[LinkEntityToClass("beam_spotlight")]
[NetworkName("CBeamSpotlight")]
-public class C_BeamSpotlight : C_BaseEntity
+public partial class C_BeamSpotlight : C_BaseEntity
{
- public static readonly RecvTable DT_BeamSpotlight = new(DT_BaseEntity, [
- RecvPropInt(FIELD.OF(nameof(HaloIndex))),
- RecvPropInt(FIELD.OF(nameof(SpotlightOn))),
- RecvPropInt(FIELD.OF(nameof(HasDynamicLight))),
- RecvPropFloat(FIELD.OF(nameof(SpotlightMaxLength))),
- RecvPropFloat(FIELD.OF(nameof(SpotlightGoalWidth))),
- RecvPropFloat(FIELD.OF(nameof(HDRColorScale))),
- RecvPropFloat(FIELD.OF(nameof(RotationSpeed))),
- RecvPropInt(FIELD.OF(nameof(RotationAxis))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BeamSpotlight);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(HaloIndex)) { Bits = 16, Flags = PropFlags.Unsigned },
+ new(nameof(SpotlightOn)) { Bits = 1, Flags = PropFlags.Unsigned },
+ new(nameof(HasDynamicLight)) { Bits = 1, Flags = PropFlags.Unsigned },
+ new(nameof(SpotlightMaxLength)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SpotlightGoalWidth)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(HDRColorScale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(RotationAxis)) { Bits = 2, Flags = PropFlags.Unsigned },
+ new(nameof(RotationSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_nHaloIndex")]
+ [NetworkVar("m_nHaloIndex")]
public int HaloIndex;
- [NetworkName("m_bSpotlightOn")]
+ [NetworkVar("m_bSpotlightOn")]
public int SpotlightOn;
- [NetworkName("m_bHasDynamicLight")]
+ [NetworkVar("m_bHasDynamicLight")]
public int HasDynamicLight;
- [NetworkName("m_flSpotlightMaxLength")]
+ [NetworkVar("m_flSpotlightMaxLength")]
public float SpotlightMaxLength;
- [NetworkName("m_flSpotlightGoalWidth")]
+ [NetworkVar("m_flSpotlightGoalWidth")]
public float SpotlightGoalWidth;
- [NetworkName("m_flHDRColorScale")]
+ [NetworkVar("m_flHDRColorScale")]
public float HDRColorScale;
- [NetworkName("m_flRotationSpeed")]
- public float RotationSpeed;
- [NetworkName("m_nRotationAxis")]
+ [NetworkVar("m_nRotationAxis")]
public int RotationAxis;
+ [NetworkVar("m_flRotationSpeed")]
+ public float RotationSpeed;
}
diff --git a/Game.Client/C_BoneFollower.cs b/Game.Client/C_BoneFollower.cs
index b12a2b4d..c382907e 100644
--- a/Game.Client/C_BoneFollower.cs
+++ b/Game.Client/C_BoneFollower.cs
@@ -3,18 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CBoneFollower")]
-public class C_BoneFollower : C_BaseEntity
+public partial class C_BoneFollower : C_BaseEntity
{
- public static readonly RecvTable DT_BoneFollower = new(DT_BaseEntity, [
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropInt(FIELD.OF(nameof(SolidIndex))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BoneFollower);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(ModelIndex)) { Bits = 14 },
+ new(nameof(SolidIndex)) { Bits = 6, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_modelIndex")]
+ [NetworkVar("m_modelIndex")]
public new int ModelIndex;
- [NetworkName("m_solidIndex")]
+ [NetworkVar("m_solidIndex")]
public int SolidIndex;
}
diff --git a/Game.Client/C_BoneManipulate.cs b/Game.Client/C_BoneManipulate.cs
index 384eb4c3..7d74d431 100644
--- a/Game.Client/C_BoneManipulate.cs
+++ b/Game.Client/C_BoneManipulate.cs
@@ -4,25 +4,24 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[LinkEntityToClass("manipulate_bone")]
[NetworkName("CBoneManipulate")]
-public class C_BoneManipulate : C_BaseEntity
+public partial class C_BoneManipulate : C_BaseEntity
{
- public static readonly RecvTable DT_BoneManipulate = new(DT_BaseEntity, [
- RecvPropArray3(FIELD.OF_ARRAY(nameof(BonePos)), RecvPropVector(null!)),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(BoneAng)), RecvPropVector(null!)),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(BoneScale)), RecvPropVector(null!)),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(BoneJiggle)), RecvPropInt(null!, null!, sizeOfVar: sizeof(int))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BoneManipulate);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(BonePos)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(BoneAng)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(BoneScale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(BoneJiggle)) { Bits = 4, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_BonePos")]
+ [NetworkVar("m_BonePos")]
public InlineArrayMaxStudioBones BonePos;
- [NetworkName("m_BoneAng")]
+ [NetworkVar("m_BoneAng")]
public InlineArrayMaxStudioBones BoneAng;
- [NetworkName("m_BoneScale")]
+ [NetworkVar("m_BoneScale")]
public InlineArrayMaxStudioBones BoneScale;
- [NetworkName("m_BoneJiggle")]
+ [NetworkVar("m_BoneJiggle")]
public InlineArrayMaxStudioBones BoneJiggle;
}
diff --git a/Game.Client/C_BreakableProp.cs b/Game.Client/C_BreakableProp.cs
index 47e78935..ff3c5b03 100644
--- a/Game.Client/C_BreakableProp.cs
+++ b/Game.Client/C_BreakableProp.cs
@@ -6,8 +6,10 @@
namespace Game.Client;
[NetworkName("CBreakableProp")]
-public class C_BreakableProp : C_BaseAnimating
+public partial class C_BreakableProp : C_BaseAnimating
{
- public static readonly RecvTable DT_BreakableProp = new(DT_BaseAnimating, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BreakableProp);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_BreakableSurface.cs b/Game.Client/C_BreakableSurface.cs
index c770b07b..980eadc0 100644
--- a/Game.Client/C_BreakableSurface.cs
+++ b/Game.Client/C_BreakableSurface.cs
@@ -6,39 +6,38 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CBreakableSurface")]
-public class C_BreakableSurface : C_BaseEntity
+public partial class C_BreakableSurface : C_BaseEntity
{
- public static readonly RecvTable DT_BreakableSurface = new(DT_BaseEntity, [
- RecvPropInt(FIELD.OF(nameof(NumWide))),
- RecvPropInt(FIELD.OF(nameof(NumHigh))),
- RecvPropFloat(FIELD.OF(nameof(PanelWidth))),
- RecvPropFloat(FIELD.OF(nameof(PanelHeight))),
- RecvPropVector(FIELD.OF(nameof(VNormal))),
- RecvPropVector(FIELD.OF(nameof(VCorner))),
- RecvPropInt(FIELD.OF(nameof(IsBroken))),
- RecvPropInt(FIELD.OF(nameof(SurfaceType))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(RawPanelBitVec)), RecvPropInt(null!, null!, sizeOfVar: sizeof(int))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BreakableSurface);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(NumWide)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(NumHigh)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(PanelWidth)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(PanelHeight)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VNormal)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(VCorner)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(IsBroken)) { Bits = 1, Flags = PropFlags.Unsigned },
+ new(nameof(SurfaceType)) { Bits = 2, Flags = PropFlags.Unsigned },
+ new(nameof(RawPanelBitVec)) { Bits = 1, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_nNumWide")]
+ [NetworkVar("m_nNumWide")]
public int NumWide;
- [NetworkName("m_nNumHigh")]
+ [NetworkVar("m_nNumHigh")]
public int NumHigh;
- [NetworkName("m_flPanelWidth")]
+ [NetworkVar("m_flPanelWidth")]
public float PanelWidth;
- [NetworkName("m_flPanelHeight")]
+ [NetworkVar("m_flPanelHeight")]
public float PanelHeight;
- [NetworkName("m_vNormal")]
+ [NetworkVar("m_vNormal")]
public Vector3 VNormal;
- [NetworkName("m_vCorner")]
+ [NetworkVar("m_vCorner")]
public Vector3 VCorner;
- [NetworkName("m_bIsBroken")]
+ [NetworkVar("m_bIsBroken")]
public int IsBroken;
- [NetworkName("m_nSurfaceType")]
+ [NetworkVar("m_nSurfaceType")]
public int SurfaceType;
- [NetworkName("m_RawPanelBitVec")]
+ [NetworkVar("m_RawPanelBitVec")]
public InlineArray256 RawPanelBitVec;
}
diff --git a/Game.Client/C_CitadelEnergyCore.cs b/Game.Client/C_CitadelEnergyCore.cs
index f09899a1..7943f774 100644
--- a/Game.Client/C_CitadelEnergyCore.cs
+++ b/Game.Client/C_CitadelEnergyCore.cs
@@ -3,27 +3,26 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CCitadelEnergyCore")]
-public class C_CitadelEnergyCore : C_BaseEntity
+public partial class C_CitadelEnergyCore : C_BaseEntity
{
- public static readonly RecvTable DT_CitadelEnergyCore = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(Scale))),
- RecvPropInt(FIELD.OF(nameof(State))),
- RecvPropFloat(FIELD.OF(nameof(Duration))),
- RecvPropFloat(FIELD.OF(nameof(StartTime))),
- RecvPropInt(FIELD.OF(nameof(Spawnflags))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_CitadelEnergyCore);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Scale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(State)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Duration)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(StartTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Spawnflags)) { Bits = 32, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_flScale")]
+ [NetworkVar("m_flScale")]
public float Scale;
- [NetworkName("m_nState")]
+ [NetworkVar("m_nState")]
public int State;
- [NetworkName("m_flDuration")]
+ [NetworkVar("m_flDuration")]
public float Duration;
- [NetworkName("m_flStartTime")]
+ [NetworkVar("m_flStartTime")]
public float StartTime;
- [NetworkName("m_spawnflags")]
+ [NetworkVar("m_spawnflags")]
public int Spawnflags;
}
diff --git a/Game.Client/C_ColorCorrection.cs b/Game.Client/C_ColorCorrection.cs
index d8278ed3..e9043bea 100644
--- a/Game.Client/C_ColorCorrection.cs
+++ b/Game.Client/C_ColorCorrection.cs
@@ -8,46 +8,45 @@
using Source.Common.MaterialSystem;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CColorCorrection")]
-public class C_ColorCorrection : C_BaseEntity
+public partial class C_ColorCorrection : C_BaseEntity
{
- public static readonly RecvTable DT_ColorCorrection = new([
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropFloat(FIELD.OF(nameof(MinFalloff))),
- RecvPropFloat(FIELD.OF(nameof(MaxFalloff))),
- RecvPropFloat(FIELD.OF(nameof(CurWeight))),
- RecvPropFloat(FIELD.OF(nameof(MaxWeight))),
- RecvPropFloat(FIELD.OF(nameof(FadeInDuration))),
- RecvPropFloat(FIELD.OF(nameof(FadeOutDuration))),
- RecvPropString(FIELD.OF(nameof(NetLookupFilename))),
- RecvPropBool(FIELD.OF(nameof(Enabled))),
- RecvPropBool(FIELD.OF(nameof(ClientSide))),
- RecvPropBool(FIELD.OF(nameof(Exclusive))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_ColorCorrection);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Origin)) { Encoding = NetEncoding.Vector, Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MinFalloff)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaxFalloff)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(CurWeight)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaxWeight)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeInDuration)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeOutDuration)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(NetLookupFilename)) { Encoding = NetEncoding.String },
+ nameof(Enabled),
+ nameof(ClientSide),
+ nameof(Exclusive),
+ ];
- [NetworkName("m_MinFalloff")]
+ [NetworkVar("m_minFalloff")]
public float MinFalloff;
- [NetworkName("m_MaxFalloff")]
+ [NetworkVar("m_maxFalloff")]
public float MaxFalloff;
- [NetworkName("m_flCurWeight")]
+ [NetworkVar("m_flCurWeight")]
public float CurWeight;
- [NetworkName("m_flMaxWeight")]
+ [NetworkVar("m_flMaxWeight")]
public float MaxWeight;
- [NetworkName("m_flFadeInDuration")]
+ [NetworkVar("m_flFadeInDuration")]
public float FadeInDuration;
- [NetworkName("m_flFadeOutDuration")]
+ [NetworkVar("m_flFadeOutDuration")]
public float FadeOutDuration;
- [NetworkName("m_netlookupFilename")]
+ [NetworkVar("m_netLookupFilename")]
public InlineArrayMaxPath NetLookupFilename;
- [NetworkName("m_bEnabled")]
+ [NetworkVar("m_bEnabled")]
public bool Enabled;
- [NetworkName("m_bClientSide")]
+ [NetworkVar("m_bClientSide")]
public bool ClientSide;
- [NetworkName("m_bExclusive")]
+ [NetworkVar("m_bExclusive")]
public bool Exclusive;
}
diff --git a/Game.Client/C_ColorCorrectionVolume.cs b/Game.Client/C_ColorCorrectionVolume.cs
index 9713f13e..7525f7af 100644
--- a/Game.Client/C_ColorCorrectionVolume.cs
+++ b/Game.Client/C_ColorCorrectionVolume.cs
@@ -3,28 +3,27 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CColorCorrectionVolume")]
-public class C_ColorCorrectionVolume : C_BaseEntity
+public partial class C_ColorCorrectionVolume : C_BaseEntity
{
- public static readonly RecvTable DT_ColorCorrectionVolume = new([
- RecvPropBool(FIELD.OF(nameof(Enabled))),
- RecvPropFloat(FIELD.OF(nameof(MaxWeight))),
- RecvPropFloat(FIELD.OF(nameof(FadeDuration))),
- RecvPropFloat(FIELD.OF(nameof(Weight))),
- RecvPropString(FIELD.OF(nameof(LookupFilename))),
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_ColorCorrectionVolume);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Enabled),
+ new(nameof(MaxWeight)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeDuration)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Weight)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(LookupFilename)) { Encoding = NetEncoding.String },
+ new(nameof(ModelIndex)) { Encoding = NetEncoding.Int, Bits = 14 },
+ ];
- [NetworkName("m_bEnabled")]
+ [NetworkVar("m_bEnabled")]
public bool Enabled;
- [NetworkName("m_MaxWeight")]
+ [NetworkVar("m_MaxWeight")]
public float MaxWeight;
- [NetworkName("m_FadeDuration")]
+ [NetworkVar("m_FadeDuration")]
public float FadeDuration;
- [NetworkName("m_Weight")]
+ [NetworkVar("m_Weight")]
public float Weight;
- [NetworkName("m_lookupFilename")]
+ [NetworkVar("m_lookupFilename")]
public InlineArrayMaxPath LookupFilename;
}
diff --git a/Game.Client/C_DustTrail.cs b/Game.Client/C_DustTrail.cs
index 1160ece6..8b056abe 100644
--- a/Game.Client/C_DustTrail.cs
+++ b/Game.Client/C_DustTrail.cs
@@ -3,51 +3,50 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("DustTrail")]
-public class C_DustTrail : C_BaseParticleEntity
+[NetworkName("DustTrail", Table = "DT_DustTrail")]
+public partial class C_DustTrail : C_BaseParticleEntity
{
- public static readonly RecvTable DT_DustTrail = new(DT_BaseParticleEntity, [
- RecvPropFloat(FIELD.OF(nameof(SpawnRate))),
- RecvPropVector(FIELD.OF(nameof(Color))),
- RecvPropFloat(FIELD.OF(nameof(ParticleLifetime))),
- RecvPropFloat(FIELD.OF(nameof(StopEmitTime))),
- RecvPropFloat(FIELD.OF(nameof(MinSpeed))),
- RecvPropFloat(FIELD.OF(nameof(MaxSpeed))),
- RecvPropFloat(FIELD.OF(nameof(MinDirectedSpeed))),
- RecvPropFloat(FIELD.OF(nameof(MaxDirectedSpeed))),
- RecvPropFloat(FIELD.OF(nameof(StartSize))),
- RecvPropFloat(FIELD.OF(nameof(EndSize))),
- RecvPropFloat(FIELD.OF(nameof(SpawnRadius))),
- RecvPropBool(FIELD.OF(nameof(Emit))),
- RecvPropFloat(FIELD.OF(nameof(Opacity))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_DustTrail);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SpawnRate)) { Bits = 8, Low = 1.0f, High = 1024.0f },
+ new(nameof(Color)) { Bits = 8, Low = 0.0f, High = 1.0f },
+ new(nameof(ParticleLifetime)) { Bits = 16, Flags = PropFlags.RoundUp, Low = 0.1f, High = 100.0f },
+ new(nameof(StopEmitTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MinSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaxSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MinDirectedSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaxDirectedSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(StartSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(EndSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SpawnRadius)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Emit),
+ new(nameof(Opacity)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_SpawnRate")]
+ [NetworkVar("m_SpawnRate")]
public float SpawnRate;
- [NetworkName("m_Color")]
+ [NetworkVar("m_Color")]
public Vector3 Color;
- [NetworkName("m_ParticleLifetime")]
+ [NetworkVar("m_ParticleLifetime")]
public float ParticleLifetime;
- [NetworkName("m_StopEmitTime")]
+ [NetworkVar("m_StopEmitTime")]
public float StopEmitTime;
- [NetworkName("m_MinSpeed")]
+ [NetworkVar("m_MinSpeed")]
public float MinSpeed;
- [NetworkName("m_MaxSpeed")]
+ [NetworkVar("m_MaxSpeed")]
public float MaxSpeed;
- [NetworkName("m_MinDirectedSpeed")]
+ [NetworkVar("m_MinDirectedSpeed")]
public float MinDirectedSpeed;
- [NetworkName("m_MaxDirectedSpeed")]
+ [NetworkVar("m_MaxDirectedSpeed")]
public float MaxDirectedSpeed;
- [NetworkName("m_StartSize")]
+ [NetworkVar("m_StartSize")]
public float StartSize;
- [NetworkName("m_EndSize")]
+ [NetworkVar("m_EndSize")]
public float EndSize;
- [NetworkName("m_SpawnRadius")]
+ [NetworkVar("m_SpawnRadius")]
public float SpawnRadius;
- [NetworkName("m_bEmit")]
+ [NetworkVar("m_bEmit")]
public bool Emit;
- [NetworkName("m_Opacity")]
+ [NetworkVar("m_Opacity")]
public float Opacity;
}
diff --git a/Game.Client/C_DynamicLight.cs b/Game.Client/C_DynamicLight.cs
index 5263761c..f7ead005 100644
--- a/Game.Client/C_DynamicLight.cs
+++ b/Game.Client/C_DynamicLight.cs
@@ -9,35 +9,34 @@
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CDynamicLight")]
-public class C_DynamicLight : C_BaseEntity
+public partial class C_DynamicLight : C_BaseEntity
{
- public static readonly RecvTable DT_DynamicLight = new(DT_BaseEntity, [
- RecvPropInt(FIELD.OF(nameof(Flags))),
- RecvPropInt(FIELD.OF(nameof(LightStyle))),
- RecvPropFloat(FIELD.OF(nameof(Radius))),
- RecvPropInt(FIELD.OF(nameof(Exponent))),
- RecvPropFloat(FIELD.OF(nameof(InnerAngle))),
- RecvPropFloat(FIELD.OF(nameof(OuterAngle))),
- RecvPropFloat(FIELD.OF(nameof(SpotRadius))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_DynamicLight);
-
- [NetworkName("m_Flags")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Flags)) { Bits = 4, Flags = PropFlags.Unsigned },
+ new(nameof(LightStyle)) { Bits = 4, Flags = PropFlags.Unsigned },
+ new(nameof(Radius)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Exponent)) { Bits = 8 },
+ new(nameof(InnerAngle)) { Bits = 8, Low = 0.0f, High = 360.0f },
+ new(nameof(OuterAngle)) { Bits = 8, Low = 0.0f, High = 360.0f },
+ new(nameof(SpotRadius)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
+
+ [NetworkVar("m_Flags")]
public int Flags;
- [NetworkName("m_LightStyle")]
+ [NetworkVar("m_LightStyle")]
public int LightStyle;
- [NetworkName("m_Radius")]
+ [NetworkVar("m_Radius")]
public float Radius;
- [NetworkName("m_Exponent")]
+ [NetworkVar("m_Exponent")]
public int Exponent;
- [NetworkName("m_InnerAngle")]
+ [NetworkVar("m_InnerAngle")]
public float InnerAngle;
- [NetworkName("m_OuterAngle")]
+ [NetworkVar("m_OuterAngle")]
public float OuterAngle;
- [NetworkName("m_SpotRadius")]
+ [NetworkVar("m_SpotRadius")]
public float SpotRadius;
DLight? DynamicLight;
diff --git a/Game.Client/C_Embers.cs b/Game.Client/C_Embers.cs
index 3a544dd2..ea675118 100644
--- a/Game.Client/C_Embers.cs
+++ b/Game.Client/C_Embers.cs
@@ -3,24 +3,23 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CEmbers")]
-public class C_Embers : C_BaseEntity
+public partial class C_Embers : C_BaseEntity
{
- public static readonly RecvTable DT_Embers = new(DT_BaseEntity, [
- RecvPropInt(FIELD.OF(nameof(Density))),
- RecvPropInt(FIELD.OF(nameof(Lifetime))),
- RecvPropInt(FIELD.OF(nameof(Speed))),
- RecvPropInt(FIELD.OF(nameof(Emit))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Embers);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Density)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(Lifetime)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(Speed)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(Emit)) { Bits = 2, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_nDensity")]
+ [NetworkVar("m_nDensity")]
public int Density;
- [NetworkName("m_nLifetime")]
+ [NetworkVar("m_nLifetime")]
public int Lifetime;
- [NetworkName("m_nSpeed")]
+ [NetworkVar("m_nSpeed")]
public new int Speed;
- [NetworkName("m_bEmit")]
+ [NetworkVar("m_bEmit")]
public int Emit;
}
diff --git a/Game.Client/C_EntityDissolve.cs b/Game.Client/C_EntityDissolve.cs
index 9f7c856d..47625bcb 100644
--- a/Game.Client/C_EntityDissolve.cs
+++ b/Game.Client/C_EntityDissolve.cs
@@ -3,42 +3,41 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CEntityDissolve")]
-public class C_EntityDissolve : C_BaseEntity
+public partial class C_EntityDissolve : C_BaseEntity
{
- public static readonly RecvTable DT_EntityDissolve = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(StartTime))),
- RecvPropFloat(FIELD.OF(nameof(FadeInStart))),
- RecvPropFloat(FIELD.OF(nameof(FadeInLength))),
- RecvPropFloat(FIELD.OF(nameof(FadeOutModelStart))),
- RecvPropFloat(FIELD.OF(nameof(FadeOutModelLength))),
- RecvPropFloat(FIELD.OF(nameof(FadeOutStart))),
- RecvPropFloat(FIELD.OF(nameof(FadeOutLength))),
- RecvPropInt(FIELD.OF(nameof(DissolveType))),
- RecvPropVector(FIELD.OF(nameof(DissolverOrigin))),
- RecvPropInt(FIELD.OF(nameof(Magnitude))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_EntityDissolve);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(StartTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeOutStart)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeOutLength)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeOutModelStart)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeOutModelLength)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeInStart)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeInLength)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(DissolveType)) { Bits = 3, Flags = PropFlags.Unsigned },
+ new(nameof(DissolverOrigin)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Magnitude)) { Bits = 8, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_flStartTime")]
+ [NetworkVar("m_flStartTime")]
public float StartTime;
- [NetworkName("m_flFadeInStart")]
- public float FadeInStart;
- [NetworkName("m_flFadeInLength")]
- public float FadeInLength;
- [NetworkName("m_flFadeOutModelStart")]
- public float FadeOutModelStart;
- [NetworkName("m_flFadeOutModelLength")]
- public float FadeOutModelLength;
- [NetworkName("m_flFadeOutStart")]
+ [NetworkVar("m_flFadeOutStart")]
public float FadeOutStart;
- [NetworkName("m_flFadeOutLength")]
+ [NetworkVar("m_flFadeOutLength")]
public float FadeOutLength;
- [NetworkName("m_nDissolveType")]
+ [NetworkVar("m_flFadeOutModelStart")]
+ public float FadeOutModelStart;
+ [NetworkVar("m_flFadeOutModelLength")]
+ public float FadeOutModelLength;
+ [NetworkVar("m_flFadeInStart")]
+ public float FadeInStart;
+ [NetworkVar("m_flFadeInLength")]
+ public float FadeInLength;
+ [NetworkVar("m_nDissolveType")]
public int DissolveType;
- [NetworkName("m_vDissolverOrigin")]
+ [NetworkVar("m_vDissolverOrigin")]
public Vector3 DissolverOrigin;
- [NetworkName("m_nMagnitude")]
+ [NetworkVar("m_nMagnitude")]
public int Magnitude;
}
diff --git a/Game.Client/C_EntityFlame.cs b/Game.Client/C_EntityFlame.cs
index 6592e049..1183b028 100644
--- a/Game.Client/C_EntityFlame.cs
+++ b/Game.Client/C_EntityFlame.cs
@@ -3,15 +3,14 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CEntityFlame")]
-public class C_EntityFlame : C_BaseEntity
+public partial class C_EntityFlame : C_BaseEntity
{
- public static readonly RecvTable DT_EntityFlame = new(DT_BaseEntity, [
- RecvPropEHandle(FIELD.OF(nameof(EntAttached))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_EntityFlame);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(EntAttached),
+ ];
- [NetworkName("m_hEntAttached")]
+ [NetworkVar("m_hEntAttached")]
public EHANDLE EntAttached = new();
}
diff --git a/Game.Client/C_EntityParticleTrail.cs b/Game.Client/C_EntityParticleTrail.cs
index 6dc6b85a..544320ee 100644
--- a/Game.Client/C_EntityParticleTrail.cs
+++ b/Game.Client/C_EntityParticleTrail.cs
@@ -3,38 +3,37 @@
namespace Game.Client;
-using FIELD = FIELD;
-
-public class C_EntityParticleTrailInfo
+public partial class C_EntityParticleTrailInfo
{
- [NetworkName("m_flLifetime")]
+ [NetworkTable("DT_EntityParticleTrailInfo")]
+ public static readonly NetworkProp[] Props = [
+ nameof(Lifetime),
+ nameof(StartSize),
+ nameof(EndSize),
+ ];
+
+ [NetworkVar("m_flLifetime")]
public float Lifetime;
- [NetworkName("m_flStartSize")]
+ [NetworkVar("m_flStartSize")]
public float StartSize;
- [NetworkName("m_flEndSize")]
+ [NetworkVar("m_flEndSize")]
public float EndSize;
-
- public static readonly RecvTable DT_EntityParticleTrailInfo = new("DT_EntityParticleTrailInfo", [
- RecvPropFloat(Source.FIELD.OF(nameof(Lifetime))),
- RecvPropFloat(Source.FIELD.OF(nameof(StartSize))),
- RecvPropFloat(Source.FIELD.OF(nameof(EndSize))),
- ]);
}
[NetworkName("CEntityParticleTrail")]
-public class C_EntityParticleTrail : C_BaseParticleEntity
+public partial class C_EntityParticleTrail : C_BaseParticleEntity
{
- [NetworkName("m_iMaterialName")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(MaterialName)) { Bits = 10, Flags = PropFlags.Unsigned },
+ new(nameof(Info)) { Encoding = NetEncoding.DataTable, DataTable = "DT_EntityParticleTrailInfo" },
+ nameof(ConstraintEntity),
+ ];
+
+ [NetworkVar("m_iMaterialName")]
public int MaterialName;
- [NetworkName("m_Info")]
+ [NetworkVar("m_Info")]
public C_EntityParticleTrailInfo Info = new();
- [NetworkName("m_hConstraintEntity")]
+ [NetworkVar("m_hConstraintEntity")]
public EHANDLE ConstraintEntity;
-
- public static readonly RecvTable DT_EntityParticleTrail = new(DT_BaseParticleEntity, [
- RecvPropInt(FIELD.OF(nameof(MaterialName))),
- RecvPropDataTable("m_Info", FIELD.OF(nameof(Info)), C_EntityParticleTrailInfo.DT_EntityParticleTrailInfo),
- RecvPropEHandle(FIELD.OF(nameof(ConstraintEntity))),
- ]);
- public static new readonly ClientClass ClientClass = new ClientClass(DT_EntityParticleTrail);
}
diff --git a/Game.Client/C_EnvAmbientLight.cs b/Game.Client/C_EnvAmbientLight.cs
index 1fea2ca1..f03ffb9b 100644
--- a/Game.Client/C_EnvAmbientLight.cs
+++ b/Game.Client/C_EnvAmbientLight.cs
@@ -3,15 +3,14 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CEnvAmbientLight")]
-public class C_EnvAmbientLight : C_SpatialEntity
+public partial class C_EnvAmbientLight : C_SpatialEntity
{
- public static readonly RecvTable DT_EnvAmbientLight = new(DT_SpatialEntity, [
- RecvPropVector(FIELD.OF(nameof(Color))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_EnvAmbientLight);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Color)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_vecColor")]
+ [NetworkVar("m_vecColor")]
public Vector3 Color;
}
diff --git a/Game.Client/C_EnvDetailController.cs b/Game.Client/C_EnvDetailController.cs
index f1b99d48..3de58d49 100644
--- a/Game.Client/C_EnvDetailController.cs
+++ b/Game.Client/C_EnvDetailController.cs
@@ -3,20 +3,19 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[LinkEntityToClass("env_detail_controller")]
-[NetworkName("CEnvDetailController")]
-public class C_EnvDetailController : C_BaseEntity
+[NetworkName("CEnvDetailController", Table = "DT_DetailController", NoBase = true)]
+public partial class C_EnvDetailController : C_BaseEntity
{
- public static readonly RecvTable DT_DetailController = new([
- RecvPropFloat(FIELD.OF(nameof(FadeStartDist))),
- RecvPropFloat(FIELD.OF(nameof(FadeEndDist))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_DetailController);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(FadeStartDist)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeEndDist)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_flFadeStartDist")]
+ [NetworkVar("m_flFadeStartDist")]
public float FadeStartDist;
- [NetworkName("m_flFadeEndDist")]
+ [NetworkVar("m_flFadeEndDist")]
public float FadeEndDist;
static C_EnvDetailController? s_DetailController;
diff --git a/Game.Client/C_EnvHeadcrabCanister.cs b/Game.Client/C_EnvHeadcrabCanister.cs
index 97eb622f..8ca6f77d 100644
--- a/Game.Client/C_EnvHeadcrabCanister.cs
+++ b/Game.Client/C_EnvHeadcrabCanister.cs
@@ -4,74 +4,73 @@
namespace Game.Client;
-using FIELD = FIELD;
-
-public class C_EnvHeadcrabCanisterShared
+public partial class C_EnvHeadcrabCanisterShared
{
- [NetworkName("m_flFlightSpeed")]
+ [NetworkTable("DT_EnvHeadcrabCanisterShared")]
+ public static readonly NetworkProp[] Props = [
+ nameof(FlightSpeed),
+ nameof(LaunchTime),
+ nameof(ParabolaDirection),
+ nameof(FlightTime),
+ nameof(WorldEnterTime),
+ nameof(InitialZSpeed),
+ nameof(ZAcceleration),
+ nameof(HorizSpeed),
+ nameof(LaunchedFromWithinWorld),
+ nameof(StartPosition),
+ nameof(EnterWorldPosition),
+ nameof(Direction),
+ nameof(StartAngles),
+ nameof(SkyboxOrigin),
+ nameof(SkyboxScale),
+ nameof(InSkybox),
+ ];
+
+ [NetworkVar("m_flFlightSpeed")]
public float FlightSpeed;
- [NetworkName("m_flLaunchTime")]
+ [NetworkVar("m_flLaunchTime")]
public TimeUnit_t LaunchTime;
- [NetworkName("m_vecParabolaDirection")]
+ [NetworkVar("m_vecParabolaDirection")]
public Vector3 ParabolaDirection;
- [NetworkName("m_flFlightTime")]
+ [NetworkVar("m_flFlightTime")]
public float FlightTime;
- [NetworkName("m_flWorldEnterTime")]
+ [NetworkVar("m_flWorldEnterTime")]
public float WorldEnterTime;
- [NetworkName("m_flInitialZSpeed")]
+ [NetworkVar("m_flInitialZSpeed")]
public float InitialZSpeed;
- [NetworkName("m_flZAcceleration")]
+ [NetworkVar("m_flZAcceleration")]
public float ZAcceleration;
- [NetworkName("m_flHorizSpeed")]
+ [NetworkVar("m_flHorizSpeed")]
public float HorizSpeed;
- [NetworkName("m_bLaunchedFromWithinWorld")]
+ [NetworkVar("m_bLaunchedFromWithinWorld")]
public bool LaunchedFromWithinWorld;
- [NetworkName("m_vecStartPosition")]
+ [NetworkVar("m_vecStartPosition")]
public Vector3 StartPosition;
- [NetworkName("m_vecEnterWorldPosition")]
+ [NetworkVar("m_vecEnterWorldPosition")]
public Vector3 EnterWorldPosition;
- [NetworkName("m_vecDirection")]
+ [NetworkVar("m_vecDirection")]
public Vector3 Direction;
- [NetworkName("m_vecStartAngles")]
+ [NetworkVar("m_vecStartAngles")]
public Vector3 StartAngles;
- [NetworkName("m_vecSkyboxOrigin")]
+ [NetworkVar("m_vecSkyboxOrigin")]
public Vector3 SkyboxOrigin;
- [NetworkName("m_flSkyboxScale")]
+ [NetworkVar("m_flSkyboxScale")]
public float SkyboxScale;
- [NetworkName("m_bInSkybox")]
+ [NetworkVar("m_bInSkybox")]
public bool InSkybox;
-
- public static readonly RecvTable DT_EnvHeadcrabCanisterShared = new("DT_EnvHeadcrabCanisterShared", [
- RecvPropFloat(Source.FIELD.OF(nameof(FlightSpeed))),
- RecvPropTime64(Source.FIELD.OF(nameof(LaunchTime))),
- RecvPropVector(Source.FIELD.OF(nameof(ParabolaDirection))),
- RecvPropFloat(Source.FIELD.OF(nameof(FlightTime))),
- RecvPropFloat(Source.FIELD.OF(nameof(WorldEnterTime))),
- RecvPropFloat(Source.FIELD.OF(nameof(InitialZSpeed))),
- RecvPropFloat(Source.FIELD.OF(nameof(ZAcceleration))),
- RecvPropFloat(Source.FIELD.OF(nameof(HorizSpeed))),
- RecvPropBool(Source.FIELD.OF(nameof(LaunchedFromWithinWorld))),
- RecvPropVector(Source.FIELD.OF(nameof(StartPosition))),
- RecvPropVector(Source.FIELD.OF(nameof(EnterWorldPosition))),
- RecvPropVector(Source.FIELD.OF(nameof(Direction))),
- RecvPropVector(Source.FIELD.OF(nameof(StartAngles))),
- RecvPropVector(Source.FIELD.OF(nameof(SkyboxOrigin))),
- RecvPropFloat(Source.FIELD.OF(nameof(SkyboxScale))),
- RecvPropBool(Source.FIELD.OF(nameof(InSkybox))),
- ]);
}
[NetworkName("CEnvHeadcrabCanister")]
-public class C_EnvHeadcrabCanister : C_BaseAnimating
+public partial class C_EnvHeadcrabCanister : C_BaseAnimating
{
- [NetworkName("m_Shared")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Shared)) { Encoding = NetEncoding.DataTable, DataTable = "DT_EnvHeadcrabCanisterShared" },
+ nameof(Landed),
+ ];
+
+ [NetworkVar("m_Shared")]
public C_EnvHeadcrabCanisterShared Shared = new();
- [NetworkName("m_bLanded")]
+ [NetworkVar("m_bLanded")]
public bool Landed;
-
- public static readonly RecvTable DT_EnvHeadcrabCanister = new(DT_BaseAnimating, [
- RecvPropDataTable("m_Shared", FIELD.OF(nameof(Shared)), C_EnvHeadcrabCanisterShared.DT_EnvHeadcrabCanisterShared),
- RecvPropBool(FIELD.OF(nameof(Landed))),
- ]);
- public static new readonly ClientClass ClientClass = new ClientClass(DT_EnvHeadcrabCanister);
}
diff --git a/Game.Client/C_EnvParticleScript.cs b/Game.Client/C_EnvParticleScript.cs
index c0e7697b..dd30c1bf 100644
--- a/Game.Client/C_EnvParticleScript.cs
+++ b/Game.Client/C_EnvParticleScript.cs
@@ -3,15 +3,14 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CEnvParticleScript")]
-public class C_EnvParticleScript : C_BaseAnimating
+public partial class C_EnvParticleScript : C_BaseAnimating
{
- public static readonly RecvTable DT_EnvParticleScript = new(DT_BaseAnimating, [
- RecvPropFloat(FIELD.OF(nameof(SequenceScale))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_EnvParticleScript);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SequenceScale)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_flSequenceScale")]
+ [NetworkVar("m_flSequenceScale")]
public float SequenceScale;
}
diff --git a/Game.Client/C_EnvProjectedTexture.cs b/Game.Client/C_EnvProjectedTexture.cs
index 85c956f3..84fe5306 100644
--- a/Game.Client/C_EnvProjectedTexture.cs
+++ b/Game.Client/C_EnvProjectedTexture.cs
@@ -3,54 +3,53 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CEnvProjectedTexture")]
-public class C_EnvProjectedTexture : C_BaseEntity
+public partial class C_EnvProjectedTexture : C_BaseEntity
{
- public static readonly RecvTable DT_EnvProjectedTexture = new(DT_BaseEntity, [
- RecvPropEHandle(FIELD.OF(nameof(HTargetEntity))),
- RecvPropBool(FIELD.OF(nameof(State))),
- RecvPropFloat(FIELD.OF(nameof(LightFOV))),
- RecvPropBool(FIELD.OF(nameof(EnableShadows))),
- RecvPropBool(FIELD.OF(nameof(LightOnlyTarget))),
- RecvPropBool(FIELD.OF(nameof(LightWorld))),
- RecvPropBool(FIELD.OF(nameof(CameraSpace))),
- RecvPropVector(FIELD.OF(nameof(LinearFloatLightColor))),
- RecvPropString(FIELD.OF(nameof(SpotlightTextureName))),
- RecvPropInt(FIELD.OF(nameof(SpotlightTextureFrame))),
- RecvPropFloat(FIELD.OF(nameof(NearZ))),
- RecvPropFloat(FIELD.OF(nameof(FarZ))),
- RecvPropBool(FIELD.OF(nameof(ShadowQuality))),
- RecvPropInt(FIELD.OF(nameof(Style))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_EnvProjectedTexture);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(HTargetEntity),
+ nameof(State),
+ new(nameof(LightFOV)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(EnableShadows),
+ nameof(LightOnlyTarget),
+ nameof(LightWorld),
+ nameof(CameraSpace),
+ new(nameof(LinearFloatLightColor)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SpotlightTextureName)) { Encoding = NetEncoding.String },
+ new(nameof(SpotlightTextureFrame)) { Bits = 14 },
+ new(nameof(NearZ)) { Bits = 16, Flags = PropFlags.RoundDown, Low = 0.0f, High = 500.0f },
+ new(nameof(FarZ)) { Bits = 18, Flags = PropFlags.RoundDown, Low = 0.0f, High = 56756.0f },
+ nameof(ShadowQuality),
+ new(nameof(Style)) { Bits = 8 },
+ ];
- [NetworkName("m_hTargetEntity")]
+ [NetworkVar("m_hTargetEntity")]
public EHANDLE HTargetEntity = new();
- [NetworkName("m_bState")]
+ [NetworkVar("m_bState")]
public bool State;
- [NetworkName("m_flLightFOV")]
+ [NetworkVar("m_flLightFOV")]
public float LightFOV;
- [NetworkName("m_bEnableShadows")]
+ [NetworkVar("m_bEnableShadows")]
public bool EnableShadows;
- [NetworkName("m_bLightOnlyTarget")]
+ [NetworkVar("m_bLightOnlyTarget")]
public bool LightOnlyTarget;
- [NetworkName("m_bLightWorld")]
+ [NetworkVar("m_bLightWorld")]
public bool LightWorld;
- [NetworkName("m_bCameraSpace")]
+ [NetworkVar("m_bCameraSpace")]
public bool CameraSpace;
- [NetworkName("m_LinearFloatLightColor")]
+ [NetworkVar("m_LinearFloatLightColor")]
public Vector3 LinearFloatLightColor;
- [NetworkName("m_SpotlightTextureName")]
+ [NetworkVar("m_SpotlightTextureName")]
public InlineArrayMaxPath SpotlightTextureName;
- [NetworkName("m_nSpotlightTextureFrame")]
+ [NetworkVar("m_nSpotlightTextureFrame")]
public int SpotlightTextureFrame;
- [NetworkName("m_flNearZ")]
+ [NetworkVar("m_flNearZ")]
public float NearZ;
- [NetworkName("m_flFarZ")]
+ [NetworkVar("m_flFarZ")]
public float FarZ;
- [NetworkName("m_nShadowQuality")]
+ [NetworkVar("m_nShadowQuality")]
public bool ShadowQuality;
- [NetworkName("m_iStyle")]
+ [NetworkVar("m_iStyle")]
public int Style;
}
diff --git a/Game.Client/C_EnvQuadraticBeam.cs b/Game.Client/C_EnvQuadraticBeam.cs
index 3b7e0fdd..44ed36ec 100644
--- a/Game.Client/C_EnvQuadraticBeam.cs
+++ b/Game.Client/C_EnvQuadraticBeam.cs
@@ -3,24 +3,23 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CEnvQuadraticBeam")]
-public class C_EnvQuadraticBeam : C_BaseEntity
+[NetworkName("CEnvQuadraticBeam", Table = "DT_QuadraticBeam")]
+public partial class C_EnvQuadraticBeam : C_BaseEntity
{
- public static readonly RecvTable DT_QuadraticBeam = new(DT_BaseEntity, [
- RecvPropVector(FIELD.OF(nameof(TargetPosition))),
- RecvPropVector(FIELD.OF(nameof(ControlPosition))),
- RecvPropFloat(FIELD.OF(nameof(ScrollRate))),
- RecvPropFloat(FIELD.OF(nameof(Width))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_QuadraticBeam);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(TargetPosition)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(ControlPosition)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(ScrollRate)) { Bits = 8, Low = -4, High = 4 },
+ new(nameof(Width)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_targetPosition")]
+ [NetworkVar("m_targetPosition")]
public Vector3 TargetPosition;
- [NetworkName("m_controlPosition")]
+ [NetworkVar("m_controlPosition")]
public Vector3 ControlPosition;
- [NetworkName("m_scrollRate")]
+ [NetworkVar("m_scrollRate")]
public float ScrollRate;
- [NetworkName("m_flWidth")]
+ [NetworkVar("m_flWidth")]
public float Width;
}
diff --git a/Game.Client/C_EnvScreenEffect.cs b/Game.Client/C_EnvScreenEffect.cs
index b840fb2f..06e8650e 100644
--- a/Game.Client/C_EnvScreenEffect.cs
+++ b/Game.Client/C_EnvScreenEffect.cs
@@ -3,18 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CEnvScreenEffect")]
-public class C_EnvScreenEffect : C_BaseEntity
+public partial class C_EnvScreenEffect : C_BaseEntity
{
- public static readonly RecvTable DT_EnvScreenEffect = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(Duration))),
- RecvPropInt(FIELD.OF(nameof(Type))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_EnvScreenEffect);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Duration)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Type)) { Bits = 12, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_flDuration")]
+ [NetworkVar("m_flDuration")]
public float Duration;
- [NetworkName("m_nType")]
+ [NetworkVar("m_nType")]
public int Type;
}
diff --git a/Game.Client/C_EnvScreenOverlay.cs b/Game.Client/C_EnvScreenOverlay.cs
index 43c3fe36..2072bc4b 100644
--- a/Game.Client/C_EnvScreenOverlay.cs
+++ b/Game.Client/C_EnvScreenOverlay.cs
@@ -3,32 +3,28 @@
namespace Game.Client;
-using FIELD = FIELD;
-
[NetworkName("CEnvScreenOverlay")]
-public class C_EnvScreenOverlay : C_BaseEntity
+public partial class C_EnvScreenOverlay : C_BaseEntity
{
public const int MAX_SCREEN_OVERLAYS = 10;
- [NetworkName("m_iszOverlayNames")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(OverlayNames)) { Encoding = NetEncoding.Array },
+ new(nameof(OverlayTimes)) { Encoding = NetEncoding.Array, Bits = 11, Flags = PropFlags.RoundDown, Low = -1.0f, High = 63.0f },
+ new(nameof(StartTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(DesiredOverlay)) { Bits = 5 },
+ nameof(IsActive),
+ ];
+
+ [NetworkVar("m_iszOverlayNames")]
public InlineArray10> OverlayNames;
- [NetworkName("m_flOverlayTimes")]
+ [NetworkVar("m_flOverlayTimes")]
public InlineArray10 OverlayTimes;
- [NetworkName("m_flStartTime")]
+ [NetworkVar("m_flStartTime")]
public float StartTime;
- [NetworkName("m_iDesiredOverlay")]
+ [NetworkVar("m_iDesiredOverlay")]
public int DesiredOverlay;
- [NetworkName("m_bIsActive")]
+ [NetworkVar("m_bIsActive")]
public bool IsActive;
-
- public static readonly RecvTable DT_EnvScreenOverlay = new(DT_BaseEntity, [
- RecvPropString(FIELD.OF_ARRAYINDEX(nameof(OverlayNames), 0)),
- RecvPropArray(FIELD.OF_ARRAY(nameof(OverlayNames))),
- RecvPropFloat(FIELD.OF_ARRAYINDEX(nameof(OverlayTimes), 0)),
- RecvPropArray(FIELD.OF_ARRAY(nameof(OverlayTimes))),
- RecvPropFloat(FIELD.OF(nameof(StartTime))),
- RecvPropInt(FIELD.OF(nameof(DesiredOverlay))),
- RecvPropBool(FIELD.OF(nameof(IsActive))),
- ]);
- public static new readonly ClientClass ClientClass = new ClientClass(DT_EnvScreenOverlay);
}
diff --git a/Game.Client/C_EnvStarfield.cs b/Game.Client/C_EnvStarfield.cs
index 1332e08d..87e18b1c 100644
--- a/Game.Client/C_EnvStarfield.cs
+++ b/Game.Client/C_EnvStarfield.cs
@@ -3,18 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CEnvStarfield")]
-public class C_EnvStarfield : C_BaseEntity
+public partial class C_EnvStarfield : C_BaseEntity
{
- public static readonly RecvTable DT_EnvStarfield = new(DT_BaseEntity, [
- RecvPropBool(FIELD.OF(nameof(On))),
- RecvPropFloat(FIELD.OF(nameof(Density))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_EnvStarfield);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(On),
+ new(nameof(Density)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_bOn")]
+ [NetworkVar("m_bOn")]
public bool On;
- [NetworkName("m_flDensity")]
+ [NetworkVar("m_flDensity")]
public float Density;
}
diff --git a/Game.Client/C_EnvTonemapController.cs b/Game.Client/C_EnvTonemapController.cs
index 4b147920..1f6abe20 100644
--- a/Game.Client/C_EnvTonemapController.cs
+++ b/Game.Client/C_EnvTonemapController.cs
@@ -5,34 +5,34 @@
using Source.Common;
-using FIELD = Source.FIELD;
[NetworkName("CEnvTonemapController")]
-public class C_EnvTonemapController : C_BaseEntity
+public partial class C_EnvTonemapController : C_BaseEntity
{
- public static readonly RecvTable DT_EnvTonemapController = new(DT_BaseEntity, [
- RecvPropBool(FIELD.OF(nameof(UseCustomAutoExposureMin))),
- RecvPropBool(FIELD.OF(nameof(UseCustomAutoExposureMax))),
- RecvPropBool(FIELD.OF(nameof(UseCustomBloomScale))),
- RecvPropFloat(FIELD.OF(nameof(CustomAutoExposureMin))),
- RecvPropFloat(FIELD.OF(nameof(CustomAutoExposureMax))),
- RecvPropFloat(FIELD.OF(nameof(CustomBloomScale))),
- RecvPropFloat(FIELD.OF(nameof(CustomBloomScaleMinimum))),
- ]); public static readonly new ClientClass ClientClass = new ClientClass(DT_EnvTonemapController);
-
- [NetworkName("m_bUseCustomAutoExposureMin")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(UseCustomAutoExposureMin),
+ nameof(UseCustomAutoExposureMax),
+ nameof(UseCustomBloomScale),
+ new(nameof(CustomAutoExposureMin)) { Bits = 0, Flags = PropFlags.NoScale, Low = 0, High = 0 },
+ new(nameof(CustomAutoExposureMax)) { Bits = 0, Flags = PropFlags.NoScale, Low = 0, High = 0 },
+ new(nameof(CustomBloomScale)) { Bits = 0, Flags = PropFlags.NoScale, Low = 0, High = 0 },
+ new(nameof(CustomBloomScaleMinimum)) { Bits = 0, Flags = PropFlags.NoScale, Low = 0, High = 0 },
+ ];
+
+ [NetworkVar("m_bUseCustomAutoExposureMin")]
public bool UseCustomAutoExposureMin;
- [NetworkName("m_bUseCustomAutoExposureMax")]
+ [NetworkVar("m_bUseCustomAutoExposureMax")]
public bool UseCustomAutoExposureMax;
- [NetworkName("m_bUseCustomBloomScale")]
+ [NetworkVar("m_bUseCustomBloomScale")]
public bool UseCustomBloomScale;
- [NetworkName("m_flCustomAutoExposureMin")]
+ [NetworkVar("m_flCustomAutoExposureMin")]
public float CustomAutoExposureMin;
- [NetworkName("m_flCustomAutoExposureMax")]
+ [NetworkVar("m_flCustomAutoExposureMax")]
public float CustomAutoExposureMax;
- [NetworkName("m_flCustomBloomScale")]
+ [NetworkVar("m_flCustomBloomScale")]
public float CustomBloomScale;
- [NetworkName("m_flCustomBloomScaleMinimum")]
+ [NetworkVar("m_flCustomBloomScaleMinimum")]
public float CustomBloomScaleMinimum;
static EHANDLE g_hTonemapControllerInUse = new();
diff --git a/Game.Client/C_EnvWind.cs b/Game.Client/C_EnvWind.cs
index 1cccdca8..c2585ff8 100644
--- a/Game.Client/C_EnvWind.cs
+++ b/Game.Client/C_EnvWind.cs
@@ -4,32 +4,14 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-using FIELD_EWS = FIELD;
[NetworkName("CEnvWind")]
-public class C_EnvWind : C_BaseEntity
+public partial class C_EnvWind : C_BaseEntity
{
- public static readonly RecvTable DT_EnvWindShared = new(nameof(DT_EnvWindShared), [
- RecvPropInt(FIELD_EWS.OF(nameof(EnvWindShared.MinWind))),
- RecvPropInt(FIELD_EWS.OF(nameof(EnvWindShared.MaxWind))),
- RecvPropInt(FIELD_EWS.OF(nameof(EnvWindShared.MinGust))),
- RecvPropInt(FIELD_EWS.OF(nameof(EnvWindShared.MaxGust))),
- RecvPropFloat(FIELD_EWS.OF(nameof(EnvWindShared.MinGustDelay))),
- RecvPropFloat(FIELD_EWS.OF(nameof(EnvWindShared.MaxGustDelay))),
- RecvPropInt(FIELD_EWS.OF(nameof(EnvWindShared.GustDirChange))),
- RecvPropInt(FIELD_EWS.OF(nameof(EnvWindShared.WindSeed))),
- RecvPropInt(FIELD_EWS.OF(nameof(EnvWindShared.InitialWindDir))),
- RecvPropFloat(FIELD_EWS.OF(nameof(EnvWindShared.InitialWindSpeed))),
- RecvPropFloat(FIELD_EWS.OF(nameof(EnvWindShared.StartTime))),
- RecvPropFloat(FIELD_EWS.OF(nameof(EnvWindShared.GustDuration))),
- RecvPropInt(FIELD_EWS.OF(nameof(EnvWindShared.WindRadius))),
- ]);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(EnvWindShared)) { Encoding = NetEncoding.DataTable, DataTable = "DT_EnvWindShared" },
+ ];
- public static readonly RecvTable DT_EnvWind = new([
- RecvPropDataTable("m_EnvWindShared", FIELD.OF(nameof(EnvWindShared)), DT_EnvWindShared, 0, RECV_GET_OBJECT_AT_FIELD(FIELD.OF(nameof(EnvWindShared))))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_EnvWind);
-
- [NetworkName("m_EnvWindShared")]
+ [NetworkVar("m_EnvWindShared")]
public readonly EnvWindShared EnvWindShared = new();
}
diff --git a/Game.Client/C_FireSmoke.cs b/Game.Client/C_FireSmoke.cs
index 62d4a4e4..968279cf 100644
--- a/Game.Client/C_FireSmoke.cs
+++ b/Game.Client/C_FireSmoke.cs
@@ -3,32 +3,31 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFireSmoke")]
-public class C_FireSmoke : C_BaseEntity
+public partial class C_FireSmoke : C_BaseEntity
{
- public static readonly RecvTable DT_FireSmoke = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(StartScale))),
- // todo: RecvProxy_Scale
- RecvPropFloat(FIELD.OF(nameof(Scale))),
- // todo: RecvProxy_ScaleTime
- RecvPropFloat(FIELD.OF(nameof(ScaleTime))),
- RecvPropInt(FIELD.OF(nameof(Flags))),
- RecvPropInt(FIELD.OF(nameof(FlameModelIndex))),
- RecvPropInt(FIELD.OF(nameof(FlameFromAboveModelIndex))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FireSmoke);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(StartScale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Scale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(ScaleTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Flags)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(FlameModelIndex)) { Bits = 14 },
+ new(nameof(FlameFromAboveModelIndex)) { Bits = 14 },
+ ];
- [NetworkName("m_flStartScale")]
+ [NetworkVar("m_flStartScale")]
public float StartScale;
- [NetworkName("m_flScale")]
+ // todo: RecvProxy_Scale
+ [NetworkVar("m_flScale")]
public float Scale;
- [NetworkName("m_flScaleTime")]
+ // todo: RecvProxy_ScaleTime
+ [NetworkVar("m_flScaleTime")]
public float ScaleTime;
- [NetworkName("m_nFlags")]
+ [NetworkVar("m_nFlags")]
public int Flags;
- [NetworkName("m_nFlameModelIndex")]
+ [NetworkVar("m_nFlameModelIndex")]
public int FlameModelIndex;
- [NetworkName("m_nFlameFromAboveModelIndex")]
+ [NetworkVar("m_nFlameFromAboveModelIndex")]
public int FlameFromAboveModelIndex;
}
diff --git a/Game.Client/C_FireTrail.cs b/Game.Client/C_FireTrail.cs
index 8dd221d4..06f4c7cd 100644
--- a/Game.Client/C_FireTrail.cs
+++ b/Game.Client/C_FireTrail.cs
@@ -3,18 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFireTrail")]
-public class C_FireTrail : C_BaseParticleEntity
+public partial class C_FireTrail : C_BaseParticleEntity
{
- public static readonly RecvTable DT_FireTrail = new(DT_BaseParticleEntity, [
- RecvPropInt(FIELD.OF(nameof(Attachment))),
- RecvPropFloat(FIELD.OF(nameof(Lifetime))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FireTrail);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Attachment)) { Bits = 32 },
+ new(nameof(Lifetime)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_nAttachment")]
+ [NetworkVar("m_nAttachment")]
public int Attachment;
- [NetworkName("m_flLifetime")]
+ [NetworkVar("m_flLifetime")]
public float Lifetime;
}
diff --git a/Game.Client/C_Fish.cs b/Game.Client/C_Fish.cs
index 97ad6acd..3ef165ad 100644
--- a/Game.Client/C_Fish.cs
+++ b/Game.Client/C_Fish.cs
@@ -3,32 +3,31 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CFish")]
-public class C_Fish : C_BaseAnimating
+[NetworkName("CFish", Table = "DT_CFish", NoBase = true)]
+public partial class C_Fish : C_BaseAnimating
{
- public static readonly RecvTable DT_CFish = new([
- RecvPropVector(FIELD.OF(nameof(PoolOrigin))),
- RecvPropFloat(FIELD.OF(nameof(Le))),
- RecvPropFloat(FIELD.OF(nameof(X))),
- RecvPropFloat(FIELD.OF(nameof(Y))),
- RecvPropFloat(FIELD.OF(nameof(Z))),
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropInt(FIELD.OF(nameof(LifeState))),
- RecvPropFloat(FIELD.OF(nameof(WaterLevel))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_CFish);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(PoolOrigin)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(X)) { Bits = 7, Low = -255.0f, High = 255.0f },
+ new(nameof(Y)) { Bits = 7, Low = -255.0f, High = 255.0f },
+ new(nameof(Z)) { Bits = 0, Flags = PropFlags.Coord | PropFlags.NoScale },
+ new(nameof(Le)) { Bits = 7, Low = 0.0f, High = 360.0f },
+ new(nameof(ModelIndex)) { Encoding = NetEncoding.Int, Bits = 14 },
+ new(nameof(LifeState)) { Bits = 3, Flags = PropFlags.Unsigned },
+ new(nameof(WaterLevel)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_poolOrigin")]
+ [NetworkVar("m_poolOrigin")]
public Vector3 PoolOrigin;
- [NetworkName("m_angle")]
- public float Le;
- [NetworkName("m_x")]
+ [NetworkVar("m_x")]
public float X;
- [NetworkName("m_y")]
+ [NetworkVar("m_y")]
public float Y;
- [NetworkName("m_z")]
+ [NetworkVar("m_z")]
public float Z;
- [NetworkName("m_waterLevel")]
+ [NetworkVar("m_angle")]
+ public float Le;
+ [NetworkVar("m_waterLevel")]
public new float WaterLevel;
}
diff --git a/Game.Client/C_Flare.cs b/Game.Client/C_Flare.cs
index 849688fb..35a85d8d 100644
--- a/Game.Client/C_Flare.cs
+++ b/Game.Client/C_Flare.cs
@@ -3,27 +3,26 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFlare")]
-public class C_Flare : C_BaseCombatCharacter
+public partial class C_Flare : C_BaseCombatCharacter
{
- public static readonly RecvTable DT_Flare = new(DT_BaseCombatCharacter, [
- RecvPropFloat(FIELD.OF(nameof(TimeBurnOut))),
- RecvPropFloat(FIELD.OF(nameof(Scale))),
- RecvPropBool(FIELD.OF(nameof(Light))),
- RecvPropBool(FIELD.OF(nameof(Smoke))),
- RecvPropBool(FIELD.OF(nameof(PropFlare))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Flare);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(TimeBurnOut)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Scale)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Light),
+ nameof(Smoke),
+ nameof(PropFlare),
+ ];
- [NetworkName("m_flTimeBurnOut")]
+ [NetworkVar("m_flTimeBurnOut")]
public float TimeBurnOut;
- [NetworkName("m_flScale")]
+ [NetworkVar("m_flScale")]
public float Scale;
- [NetworkName("m_bLight")]
+ [NetworkVar("m_bLight")]
public bool Light;
- [NetworkName("m_bSmoke")]
+ [NetworkVar("m_bSmoke")]
public bool Smoke;
- [NetworkName("m_bPropFlare")]
+ [NetworkVar("m_bPropFlare")]
public bool PropFlare;
}
diff --git a/Game.Client/C_FleshEffectTarget.cs b/Game.Client/C_FleshEffectTarget.cs
index a08277c9..5e912b78 100644
--- a/Game.Client/C_FleshEffectTarget.cs
+++ b/Game.Client/C_FleshEffectTarget.cs
@@ -3,18 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFleshEffectTarget")]
-public class C_FleshEffectTarget : C_BaseEntity
+public partial class C_FleshEffectTarget : C_BaseEntity
{
- public static readonly RecvTable DT_FleshEffectTarget = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(Radius))),
- RecvPropFloat(FIELD.OF(nameof(ScaleTime))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FleshEffectTarget);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Radius)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(ScaleTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_flRadius")]
+ [NetworkVar("m_flRadius")]
public float Radius;
- [NetworkName("m_flScaleTime")]
+ [NetworkVar("m_flScaleTime")]
public float ScaleTime;
}
diff --git a/Game.Client/C_FlexManipulate.cs b/Game.Client/C_FlexManipulate.cs
index c294b73d..db1d6e1e 100644
--- a/Game.Client/C_FlexManipulate.cs
+++ b/Game.Client/C_FlexManipulate.cs
@@ -3,23 +3,22 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[LinkEntityToClass("manipulate_flex")]
[NetworkName("CFlexManipulate")]
-public class C_FlexManipulate : C_BaseEntity
+public partial class C_FlexManipulate : C_BaseEntity
{
- public static readonly RecvTable DT_FlexManipulate = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(ExScale))),
- RecvPropVector(FIELD.OF(nameof(EyesLocalTarget))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(FlexWeights)), RecvPropFloat(null!)),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FlexManipulate);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(ExScale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(EyesLocalTarget)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FlexWeights)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_flexScale")]
+ [NetworkVar("m_flexScale")]
public float ExScale;
- [NetworkName("m_EyesLocalTarget")]
+ [NetworkVar("m_EyesLocalTarget")]
public Vector3 EyesLocalTarget;
- [NetworkName("m_iFlexWeights")]
+ [NetworkVar("m_iFlexWeights")]
public InlineArray96 FlexWeights;
public void SetFlexWeight(byte index, float weight) {
diff --git a/Game.Client/C_FogController.cs b/Game.Client/C_FogController.cs
index ee70dd5b..effbf697 100644
--- a/Game.Client/C_FogController.cs
+++ b/Game.Client/C_FogController.cs
@@ -1,38 +1,36 @@
-using Game.Client;
-using Game.Shared;
-
-using Source.Common;
-
-namespace Game.Server;
-using FIELD = Source.FIELD;
-
-[NetworkName("CFogController")]
-public class C_FogController : C_BaseEntity
-{
- [NetworkName("m_fog")]
- public FogParams Fog;
- public static readonly RecvTable DT_FogController = new([
- RecvPropInt(FIELD.OF("Fog.Enable")),
- RecvPropInt(FIELD.OF("Fog.Blend")),
- RecvPropInt(FIELD.OF("Fog.Radial")),
- RecvPropVector(FIELD.OF("Fog.DirPrimary")),
- RecvPropInt(FIELD.OF("Fog.ColorPrimary")),
- RecvPropInt(FIELD.OF("Fog.ColorSecondary")),
- RecvPropInt(FIELD.OF("Fog.ColorPrimaryHDR")),
- RecvPropInt(FIELD.OF("Fog.ColorSecondaryHDR")),
- RecvPropFloat(FIELD.OF("Fog.Start")),
- RecvPropFloat(FIELD.OF("Fog.End")),
- RecvPropFloat(FIELD.OF("Fog.MaxDensity")),
- RecvPropFloat(FIELD.OF("Fog.FarZ")),
-
- RecvPropInt(FIELD.OF("Fog.ColorPrimaryLerpTo")),
- RecvPropInt(FIELD.OF("Fog.ColorSecondaryLerpTo")),
- RecvPropFloat(FIELD.OF("Fog.StartLerpTo")),
- RecvPropFloat(FIELD.OF("Fog.EndLerpTo")),
- RecvPropFloat(FIELD.OF("Fog.MaxDensityLerpTo")),
- RecvPropFloat(FIELD.OF("Fog.LerpTime")),
- RecvPropFloat(FIELD.OF("Fog.Duration")),
- RecvPropFloat(FIELD.OF("Fog.HDRColorScale")),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FogController);
-}
\ No newline at end of file
+using Game.Client;
+using Game.Shared;
+
+using Source.Common;
+
+namespace Game.Server;
+[NetworkName("CFogController")]
+public partial class C_FogController : C_BaseEntity
+{
+ [NetworkVar("m_fog")]
+ public FogParams Fog;
+ [NetworkTable(NoBase = true)]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Fog.Enable),
+ nameof(Fog.Blend),
+ nameof(Fog.Radial),
+ nameof(Fog.DirPrimary),
+ new(nameof(Fog.ColorPrimary)) { Encoding = NetEncoding.Int },
+ new(nameof(Fog.ColorSecondary)) { Encoding = NetEncoding.Int },
+ new(nameof(Fog.ColorPrimaryHDR)) { Encoding = NetEncoding.Int },
+ new(nameof(Fog.ColorSecondaryHDR)) { Encoding = NetEncoding.Int },
+ nameof(Fog.Start),
+ nameof(Fog.End),
+ nameof(Fog.FarZ),
+ nameof(Fog.MaxDensity),
+
+ new(nameof(Fog.ColorPrimaryLerpTo)) { Encoding = NetEncoding.Int },
+ new(nameof(Fog.ColorSecondaryLerpTo)) { Encoding = NetEncoding.Int },
+ nameof(Fog.StartLerpTo),
+ nameof(Fog.EndLerpTo),
+ nameof(Fog.MaxDensityLerpTo),
+ new(nameof(Fog.LerpTime)) { Encoding = NetEncoding.Float },
+ new(nameof(Fog.Duration)) { Encoding = NetEncoding.Float },
+ nameof(Fog.HDRColorScale),
+ ];
+}
\ No newline at end of file
diff --git a/Game.Client/C_FuncAreaPortalWindow.cs b/Game.Client/C_FuncAreaPortalWindow.cs
index 0d2b0952..b5130e67 100644
--- a/Game.Client/C_FuncAreaPortalWindow.cs
+++ b/Game.Client/C_FuncAreaPortalWindow.cs
@@ -7,26 +7,25 @@
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFuncAreaPortalWindow")]
-public class C_FuncAreaPortalWindow : C_BaseEntity
+public partial class C_FuncAreaPortalWindow : C_BaseEntity
{
- public static readonly RecvTable DT_FuncAreaPortalWindow = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(FadeDist))),
- RecvPropFloat(FIELD.OF(nameof(FadeStartDist))),
- RecvPropFloat(FIELD.OF(nameof(TranslucencyLimit))),
- RecvPropInt(FIELD.OF(nameof(BackgroundModelIndex)))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FuncAreaPortalWindow);
-
- [NetworkName("m_flFadeDist")]
- public float FadeDist;
- [NetworkName("m_flFadeStartDist")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(FadeStartDist)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeDist)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(TranslucencyLimit)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(BackgroundModelIndex)) { Encoding = NetEncoding.ModelIndex },
+ ];
+
+ [NetworkVar("m_flFadeStartDist")]
public float FadeStartDist;
- [NetworkName("m_flTranslucencyLimit")]
+ [NetworkVar("m_flFadeDist")]
+ public float FadeDist;
+ [NetworkVar("m_flTranslucencyLimit")]
public float TranslucencyLimit;
- [NetworkName("m_iBackgroundModelIndex")]
+ [NetworkVar("m_iBackgroundModelIndex")]
public int BackgroundModelIndex;
public override void ComputeFxBlend() {
diff --git a/Game.Client/C_FuncConveyor.cs b/Game.Client/C_FuncConveyor.cs
index 35869c9e..e9f723c3 100644
--- a/Game.Client/C_FuncConveyor.cs
+++ b/Game.Client/C_FuncConveyor.cs
@@ -5,15 +5,15 @@
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFuncConveyor")]
-public class C_FuncConveyor : C_BaseEntity
+public partial class C_FuncConveyor : C_BaseEntity
{
- public static readonly RecvTable DT_FuncConveyor = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(ConveyorSpeed))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FuncConveyor);
- [NetworkName("m_flConveyorSpeed")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(ConveyorSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
+
+ [NetworkVar("m_flConveyorSpeed")]
public float ConveyorSpeed;
}
diff --git a/Game.Client/C_FuncMonitor.cs b/Game.Client/C_FuncMonitor.cs
index f5d659b3..9e6f1342 100644
--- a/Game.Client/C_FuncMonitor.cs
+++ b/Game.Client/C_FuncMonitor.cs
@@ -5,8 +5,10 @@
namespace Game.Client;
[NetworkName("CFuncMonitor")]
-public class C_FuncMonitor : C_BaseEntity
+public partial class C_FuncMonitor : C_BaseEntity
{
- public static readonly RecvTable DT_FuncMonitor = new(DT_BaseEntity, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FuncMonitor);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_FuncOccluder.cs b/Game.Client/C_FuncOccluder.cs
index b70f8b6b..460c8b1e 100644
--- a/Game.Client/C_FuncOccluder.cs
+++ b/Game.Client/C_FuncOccluder.cs
@@ -4,20 +4,19 @@
using Source.Common;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFuncOccluder")]
-public class C_FuncOccluder : C_BaseEntity
+public partial class C_FuncOccluder : C_BaseEntity
{
- public static readonly RecvTable DT_FuncOccluder = new([
- RecvPropBool(FIELD.OF(nameof(Active))),
- RecvPropInt(FIELD.OF(nameof(OccluderIndex))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FuncOccluder);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Active),
+ new(nameof(OccluderIndex)) { Bits = 10, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_bActive")]
+ [NetworkVar("m_bActive")]
public bool Active;
- [NetworkName("m_nOccluderIndex")]
+ [NetworkVar("m_nOccluderIndex")]
public int OccluderIndex;
}
diff --git a/Game.Client/C_FuncReflectiveGlass.cs b/Game.Client/C_FuncReflectiveGlass.cs
index 348c7518..1ce8724e 100644
--- a/Game.Client/C_FuncReflectiveGlass.cs
+++ b/Game.Client/C_FuncReflectiveGlass.cs
@@ -5,8 +5,10 @@
namespace Game.Client;
[NetworkName("CFuncReflectiveGlass")]
-public class C_FuncReflectiveGlass : C_BaseEntity
+public partial class C_FuncReflectiveGlass : C_BaseEntity
{
- public static readonly RecvTable DT_FuncReflectiveGlass = new(DT_BaseEntity, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FuncReflectiveGlass);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_FuncRotating.cs b/Game.Client/C_FuncRotating.cs
index 043d5a67..c3f8f539 100644
--- a/Game.Client/C_FuncRotating.cs
+++ b/Game.Client/C_FuncRotating.cs
@@ -3,18 +3,15 @@
using Source;
using Source.Common;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFuncRotating")]
-public class C_FuncRotating : C_BaseEntity
+public partial class C_FuncRotating : C_BaseEntity
{
- public static readonly RecvTable DT_FuncRotating = new(DT_BaseEntity, [
- RecvPropVector(FIELD.OF_NAMED(nameof(NetworkOrigin), "m_vecOrigin")),
- RecvPropFloat(FIELD.OF_NAMED($"{nameof(NetworkAngles)}[0]", "m_angRotation[0]")),
- RecvPropFloat(FIELD.OF_NAMED($"{nameof(NetworkAngles)}[1]", "m_angRotation[1]")),
- RecvPropFloat(FIELD.OF_NAMED($"{nameof(NetworkAngles)}[2]", "m_angRotation[2]")),
- RecvPropInt(FIELD.OF(nameof(SimulationTime)), 0, RecvProxy_SimulationTime)
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FuncRotating);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(NetworkOrigin),
+ new(nameof(NetworkAngles)) { Encoding = NetEncoding.VectorElements },
+ new(nameof(SimulationTime)) { Encoding = NetEncoding.Int, Proxy = typeof(SimulationTimeProxy) },
+ ];
}
diff --git a/Game.Client/C_FuncSmokeVolume.cs b/Game.Client/C_FuncSmokeVolume.cs
index a4b58abb..94c47427 100644
--- a/Game.Client/C_FuncSmokeVolume.cs
+++ b/Game.Client/C_FuncSmokeVolume.cs
@@ -1,45 +1,46 @@
using Game.Shared;
+using Game.Shared;
+
using Source;
using Source.Common;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFuncSmokeVolume")]
-public class C_FuncSmokeVolume : C_BaseParticleEntity
+public partial class C_FuncSmokeVolume : C_BaseParticleEntity
{
- public static readonly RecvTable DT_FuncSmokeVolume = new(DT_BaseParticleEntity, [
- RecvPropInt(FIELD.OF(nameof(Color1)), 0, RecvProxy_IntToColor32),
- RecvPropInt(FIELD.OF(nameof(Color2)), 0, RecvProxy_IntToColor32),
- RecvPropString(FIELD.OF(nameof(MaterialName))),
- RecvPropFloat(FIELD.OF(nameof(ParticleDrawWidth))),
- RecvPropFloat(FIELD.OF(nameof(ParticleSpacingDistance))),
- RecvPropFloat(FIELD.OF(nameof(DensityRampSpeed))),
- RecvPropFloat(FIELD.OF(nameof(RotationSpeed))),
- RecvPropFloat(FIELD.OF(nameof(MovementSpeed))),
- RecvPropFloat(FIELD.OF(nameof(Density))),
- RecvPropInt(FIELD.OF(nameof(SpawnFlags))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FuncSmokeVolume);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Color1)) { Encoding = NetEncoding.Int, Bits = 32, Flags = PropFlags.Unsigned, Proxy = typeof(Color32Proxy) },
+ new(nameof(Color2)) { Encoding = NetEncoding.Int, Bits = 32, Flags = PropFlags.Unsigned, Proxy = typeof(Color32Proxy) },
+ new(nameof(MaterialName)) { Encoding = NetEncoding.String },
+ new(nameof(ParticleDrawWidth)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(ParticleSpacingDistance)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(DensityRampSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(RotationSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MovementSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Density)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SpawnFlags)) { Encoding = NetEncoding.Int, Bits = 8, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_Color1")]
+ [NetworkVar("m_Color1")]
public Color Color1;
- [NetworkName("m_Color2")]
+ [NetworkVar("m_Color2")]
public Color Color2;
- [NetworkName("m_MaterialName")]
+ [NetworkVar("m_MaterialName")]
public InlineArray255 MaterialName;
- [NetworkName("m_ParticleDrawWidth")]
+ [NetworkVar("m_ParticleDrawWidth")]
public float ParticleDrawWidth;
- [NetworkName("m_ParticleSpacingDistance")]
+ [NetworkVar("m_ParticleSpacingDistance")]
public float ParticleSpacingDistance;
- [NetworkName("m_DensityRampSpeed")]
+ [NetworkVar("m_DensityRampSpeed")]
public float DensityRampSpeed;
- [NetworkName("m_RotationSpeed")]
+ [NetworkVar("m_RotationSpeed")]
public float RotationSpeed;
- [NetworkName("m_MovementSpeed")]
+ [NetworkVar("m_MovementSpeed")]
public float MovementSpeed;
- [NetworkName("m_Density")]
+ [NetworkVar("m_Density")]
public float Density;
}
diff --git a/Game.Client/C_FuncTrackTrain.cs b/Game.Client/C_FuncTrackTrain.cs
index efc83dd0..f79d8250 100644
--- a/Game.Client/C_FuncTrackTrain.cs
+++ b/Game.Client/C_FuncTrackTrain.cs
@@ -5,8 +5,10 @@
namespace Game.Client;
[NetworkName("CFuncTrackTrain")]
-public class C_FuncTrackTrain : C_BaseEntity
+public partial class C_FuncTrackTrain : C_BaseEntity
{
- public static readonly RecvTable DT_FuncTrackTrain = new(DT_BaseEntity, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_FuncTrackTrain);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_Func_Dust.cs b/Game.Client/C_Func_Dust.cs
index d1d162a3..387ba783 100644
--- a/Game.Client/C_Func_Dust.cs
+++ b/Game.Client/C_Func_Dust.cs
@@ -5,49 +5,48 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CFunc_Dust")]
-public class C_Func_Dust : C_BaseEntity
+[NetworkName("CFunc_Dust", NoBase = true)]
+public partial class C_Func_Dust : C_BaseEntity
{
- public static readonly RecvTable DT_Func_Dust = new([
- RecvPropInt(FIELD.OF(nameof(Color))),
- RecvPropInt(FIELD.OF(nameof(SpawnRate))),
- RecvPropInt(FIELD.OF(nameof(SpeedMax))),
- RecvPropFloat(FIELD.OF(nameof(SizeMin))),
- RecvPropFloat(FIELD.OF(nameof(SizeMax))),
- RecvPropInt(FIELD.OF(nameof(DistMax))),
- RecvPropInt(FIELD.OF(nameof(LifetimeMin))),
- RecvPropInt(FIELD.OF(nameof(LifetimeMax))),
- RecvPropInt(FIELD.OF(nameof(DustFlags))),
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropFloat(FIELD.OF(nameof(FallSpeed))),
- RecvPropBool(FIELD.OF(nameof(AffectedByWind))),
- RecvPropDataTable("m_Collision", CollisionProperty.DT_CollisionProperty, 0, RECV_GET_OBJECT_AT_FIELD(FIELD.OF(nameof(Collision))))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Func_Dust);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Color)) { Encoding = NetEncoding.Int, Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(SpawnRate)) { Bits = 12, Flags = PropFlags.Unsigned },
+ new(nameof(SizeMin)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SizeMax)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(LifetimeMin)) { Bits = 4, Flags = PropFlags.Unsigned },
+ new(nameof(LifetimeMax)) { Bits = 4, Flags = PropFlags.Unsigned },
+ new(nameof(DustFlags)) { Bits = 3, Flags = PropFlags.Unsigned },
+ new(nameof(SpeedMax)) { Bits = 12, Flags = PropFlags.Unsigned },
+ new(nameof(DistMax)) { Bits = 16, Flags = PropFlags.Unsigned },
+ new(nameof(ModelIndex)) { Encoding = NetEncoding.ModelIndex },
+ new(nameof(FallSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(AffectedByWind),
+ new(nameof(Collision)) { Encoding = NetEncoding.DataTable, DataTable = "DT_CollisionProperty" },
+ ];
- [NetworkName("m_Color")]
+ [NetworkVar("m_Color")]
public Color Color;
- [NetworkName("m_SpawnRate")]
+ [NetworkVar("m_SpawnRate")]
public int SpawnRate;
- [NetworkName("m_SpeedMax")]
- public int SpeedMax;
- [NetworkName("m_flSizeMin")]
+ [NetworkVar("m_flSizeMin")]
public float SizeMin;
- [NetworkName("m_flSizeMax")]
+ [NetworkVar("m_flSizeMax")]
public float SizeMax;
- [NetworkName("m_DistMax")]
- public int DistMax;
- [NetworkName("m_LifetimeMin")]
+ [NetworkVar("m_LifetimeMin")]
public int LifetimeMin;
- [NetworkName("m_LifetimeMax")]
+ [NetworkVar("m_LifetimeMax")]
public int LifetimeMax;
- [NetworkName("m_DustFlags")]
+ [NetworkVar("m_DustFlags")]
public int DustFlags;
- [NetworkName("m_FallSpeed")]
+ [NetworkVar("m_SpeedMax")]
+ public int SpeedMax;
+ [NetworkVar("m_DistMax")]
+ public int DistMax;
+ [NetworkVar("m_FallSpeed")]
public float FallSpeed;
- [NetworkName("m_bAffectedByWind")]
+ [NetworkVar("m_bAffectedByWind")]
public bool AffectedByWind;
}
diff --git a/Game.Client/C_Func_LOD.cs b/Game.Client/C_Func_LOD.cs
index 7690fe60..f4a1b915 100644
--- a/Game.Client/C_Func_LOD.cs
+++ b/Game.Client/C_Func_LOD.cs
@@ -5,19 +5,18 @@
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CFunc_LOD")]
-public class C_Func_LOD : C_BaseEntity
+public partial class C_Func_LOD : C_BaseEntity
{
- public static readonly RecvTable DT_Func_LOD = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(DisappearMinDist))),
- RecvPropFloat(FIELD.OF(nameof(DisappearMaxDist))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Func_LOD);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(DisappearMinDist)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(DisappearMaxDist)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_fDisappearMinDist")]
+ [NetworkVar("m_fDisappearMinDist")]
public float DisappearMinDist = 5000.0f;
- [NetworkName("m_fDisappearMaxDist")]
+ [NetworkVar("m_fDisappearMaxDist")]
public float DisappearMaxDist = 5800.0f;
}
diff --git a/Game.Client/C_InfoOverlayAccessor.cs b/Game.Client/C_InfoOverlayAccessor.cs
index eaa4540b..2ff2f02f 100644
--- a/Game.Client/C_InfoOverlayAccessor.cs
+++ b/Game.Client/C_InfoOverlayAccessor.cs
@@ -3,17 +3,16 @@
using Source.Common;
namespace Game.Client;
-using FIELD = Source.FIELD;
-[NetworkName("CInfoOverlayAccessor")]
+[NetworkName("CInfoOverlayAccessor", NoBase = true)]
public partial class C_InfoOverlayAccessor : C_BaseEntity
{
- public static readonly RecvTable DT_InfoOverlayAccessor = new( [
- RecvPropInt(FIELD.OF(nameof(TextureFrameIndex))),
- RecvPropInt(FIELD.OF(nameof(OverlayID)))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_InfoOverlayAccessor);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(TextureFrameIndex)) { Encoding = NetEncoding.Int, Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(OverlayID)) { Bits = 32, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_iOverlayID")]
+ [NetworkVar("m_iOverlayID")]
public int OverlayID;
}
diff --git a/Game.Client/C_LightGlow.cs b/Game.Client/C_LightGlow.cs
index 039ae2a2..80817471 100644
--- a/Game.Client/C_LightGlow.cs
+++ b/Game.Client/C_LightGlow.cs
@@ -4,42 +4,42 @@
using Source.Common;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CLightGlow")]
-public class C_LightGlow : C_BaseEntity
+[NetworkName("CLightGlow", NoBase = true)]
+public partial class C_LightGlow : C_BaseEntity
{
- public static readonly RecvTable DT_LightGlow = new([
- RecvPropInt(FIELD.OF(nameof(RenderColor)), 0, RecvProxy_IntToColor32),
- RecvPropInt(FIELD.OF(nameof(HorizontalSize))),
- RecvPropInt(FIELD.OF(nameof(VerticalSize))),
- RecvPropInt(FIELD.OF(nameof(MinDist))),
- RecvPropInt(FIELD.OF(nameof(MaxDist))),
- RecvPropInt(FIELD.OF(nameof(OuterMaxDist))),
- RecvPropInt(FIELD.OF(nameof(SpawnFlags))),
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropVector(FIELD.OF(nameof(Rotation))),
- RecvPropEHandle(FIELD.OF(nameof(MoveParent))),
- RecvPropFloat(FIELD.OF(nameof(GlowProxySize))),
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(RenderColor)) { Encoding = NetEncoding.Int, Proxy = typeof(Color32Proxy) },
+ nameof(HorizontalSize),
+ nameof(VerticalSize),
+ nameof(MinDist),
+ nameof(MaxDist),
+ nameof(OuterMaxDist),
+ nameof(SpawnFlags),
+ nameof(Origin),
+ nameof(Rotation),
+ new(nameof(NetworkMoveParent)) { Encoding = NetEncoding.Int, Proxy = typeof(MoveParentProxy) },
+ nameof(GlowProxySize),
// todo: RecvProxy_HDRColorScale
- RecvPropFloat(FIELD.OF(nameof(HDRColorScale))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_LightGlow);
+ nameof(HDRColorScale),
+ ];
- [NetworkName("m_clrRender")]
+ [NetworkVar("m_clrRender")]
public Color RenderColor;
- [NetworkName("m_nHorizontalSize")]
+ [NetworkVar("m_nHorizontalSize")]
public int HorizontalSize;
- [NetworkName("m_nVerticalSize")]
+ [NetworkVar("m_nVerticalSize")]
public int VerticalSize;
- [NetworkName("m_nMinDist")]
+ [NetworkVar("m_nMinDist")]
public int MinDist;
- [NetworkName("m_nMaxDist")]
+ [NetworkVar("m_nMaxDist")]
public int MaxDist;
- [NetworkName("m_nOuterMaxDist")]
+ [NetworkVar("m_nOuterMaxDist")]
public int OuterMaxDist;
- [NetworkName("m_flGlowProxySize")]
+ [NetworkVar("m_flGlowProxySize")]
public float GlowProxySize;
+ [NetworkVar("HDRColorScale")]
public float HDRColorScale;
}
diff --git a/Game.Client/C_MaterialModifyControl.cs b/Game.Client/C_MaterialModifyControl.cs
index 0288b655..a03362eb 100644
--- a/Game.Client/C_MaterialModifyControl.cs
+++ b/Game.Client/C_MaterialModifyControl.cs
@@ -3,48 +3,47 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CMaterialModifyControl")]
-public class C_MaterialModifyControl : C_BaseEntity
+public partial class C_MaterialModifyControl : C_BaseEntity
{
- public static readonly RecvTable DT_MaterialModifyControl = new(DT_BaseEntity, [
- RecvPropString(FIELD.OF(nameof(SzMaterialName))),
- RecvPropString(FIELD.OF(nameof(SzMaterialVar))),
- RecvPropString(FIELD.OF(nameof(SzMaterialVarValue))),
- RecvPropInt(FIELD.OF(nameof(FrameStart))),
- RecvPropInt(FIELD.OF(nameof(FrameEnd))),
- RecvPropBool(FIELD.OF(nameof(Wrap))),
- RecvPropFloat(FIELD.OF(nameof(Framerate))),
- RecvPropBool(FIELD.OF(nameof(NewAnimCommandsSemaphore))),
- RecvPropFloat(FIELD.OF(nameof(FloatLerpStartValue))),
- RecvPropFloat(FIELD.OF(nameof(FloatLerpEndValue))),
- RecvPropFloat(FIELD.OF(nameof(FloatLerpTransitionTime))),
- RecvPropInt(FIELD.OF(nameof(ModifyMode))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_MaterialModifyControl);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SzMaterialName)) { Encoding = NetEncoding.String },
+ new(nameof(SzMaterialVar)) { Encoding = NetEncoding.String },
+ new(nameof(SzMaterialVarValue)) { Encoding = NetEncoding.String },
+ new(nameof(FrameStart)) { Bits = 8 },
+ new(nameof(FrameEnd)) { Bits = 8 },
+ nameof(Wrap),
+ new(nameof(Framerate)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(NewAnimCommandsSemaphore),
+ new(nameof(FloatLerpStartValue)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FloatLerpEndValue)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FloatLerpTransitionTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(ModifyMode)) { Bits = 2, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_szMaterialName")]
+ [NetworkVar("m_szMaterialName")]
public InlineArray255 SzMaterialName;
- [NetworkName("m_szMaterialVar")]
+ [NetworkVar("m_szMaterialVar")]
public InlineArray255 SzMaterialVar;
- [NetworkName("m_szMaterialVarValue")]
+ [NetworkVar("m_szMaterialVarValue")]
public InlineArray255 SzMaterialVarValue;
- [NetworkName("m_iFrameStart")]
+ [NetworkVar("m_iFrameStart")]
public int FrameStart;
- [NetworkName("m_iFrameEnd")]
+ [NetworkVar("m_iFrameEnd")]
public int FrameEnd;
- [NetworkName("m_bWrap")]
+ [NetworkVar("m_bWrap")]
public bool Wrap;
- [NetworkName("m_flFramerate")]
+ [NetworkVar("m_flFramerate")]
public float Framerate;
- [NetworkName("m_bNewAnimCommandsSemaphore")]
+ [NetworkVar("m_bNewAnimCommandsSemaphore")]
public bool NewAnimCommandsSemaphore;
- [NetworkName("m_flFloatLerpStartValue")]
+ [NetworkVar("m_flFloatLerpStartValue")]
public float FloatLerpStartValue;
- [NetworkName("m_flFloatLerpEndValue")]
+ [NetworkVar("m_flFloatLerpEndValue")]
public float FloatLerpEndValue;
- [NetworkName("m_flFloatLerpTransitionTime")]
+ [NetworkVar("m_flFloatLerpTransitionTime")]
public float FloatLerpTransitionTime;
- [NetworkName("m_nModifyMode")]
+ [NetworkVar("m_nModifyMode")]
public int ModifyMode;
}
diff --git a/Game.Client/C_MortarShell.cs b/Game.Client/C_MortarShell.cs
index 83b23366..84c47620 100644
--- a/Game.Client/C_MortarShell.cs
+++ b/Game.Client/C_MortarShell.cs
@@ -3,21 +3,20 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CMortarShell")]
-public class C_MortarShell : C_BaseEntity
+public partial class C_MortarShell : C_BaseEntity
{
- public static readonly RecvTable DT_MortarShell = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(Lifespan))),
- RecvPropFloat(FIELD.OF(nameof(Radius))),
- RecvPropVector(FIELD.OF(nameof(SurfaceNormal))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_MortarShell);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Lifespan)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Radius)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SurfaceNormal)) { Bits = 0, Flags = PropFlags.VarInt | PropFlags.VarInt },
+ ];
- [NetworkName("m_flLifespan")]
+ [NetworkVar("m_flLifespan")]
public float Lifespan;
- [NetworkName("m_flRadius")]
+ [NetworkVar("m_flRadius")]
public float Radius;
- [NetworkName("m_vecSurfaceNormal")]
+ [NetworkVar("m_vecSurfaceNormal")]
public Vector3 SurfaceNormal;
}
diff --git a/Game.Client/C_MovieExplosion.cs b/Game.Client/C_MovieExplosion.cs
index e0a91df5..5b0ec2d0 100644
--- a/Game.Client/C_MovieExplosion.cs
+++ b/Game.Client/C_MovieExplosion.cs
@@ -4,10 +4,7 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("MovieExplosion")]
-public class C_MovieExplosion : C_BaseParticleEntity
+[NetworkName("MovieExplosion", Table = "DT_MovieExplosion")]
+public partial class C_MovieExplosion : C_BaseParticleEntity
{
- public static readonly RecvTable DT_MovieExplosion = new(DT_BaseParticleEntity, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_MovieExplosion);
}
diff --git a/Game.Client/C_NPC_AntlionGuard.cs b/Game.Client/C_NPC_AntlionGuard.cs
index cd8020ba..14310ca8 100644
--- a/Game.Client/C_NPC_AntlionGuard.cs
+++ b/Game.Client/C_NPC_AntlionGuard.cs
@@ -3,21 +3,20 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CNPC_AntlionGuard")]
-public class C_NPC_AntlionGuard : C_AI_BaseNPC
+public partial class C_NPC_AntlionGuard : C_AI_BaseNPC
{
- public static readonly RecvTable DT_NPC_AntlionGuard = new(DT_AI_BaseNPC, [
- RecvPropBool(FIELD.OF(nameof(CavernBreed))),
- RecvPropBool(FIELD.OF(nameof(InCavern))),
- RecvPropInt(FIELD.OF(nameof(BleedingLevel))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_NPC_AntlionGuard);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(CavernBreed),
+ nameof(InCavern),
+ new(nameof(BleedingLevel)) { Bits = 2, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_bCavernBreed")]
+ [NetworkVar("m_bCavernBreed")]
public bool CavernBreed;
- [NetworkName("m_bInCavern")]
+ [NetworkVar("m_bInCavern")]
public bool InCavern;
- [NetworkName("m_iBleedingLevel")]
+ [NetworkVar("m_iBleedingLevel")]
public int BleedingLevel;
}
diff --git a/Game.Client/C_NPC_Barnacle.cs b/Game.Client/C_NPC_Barnacle.cs
index 9e5f2fc0..2203fafa 100644
--- a/Game.Client/C_NPC_Barnacle.cs
+++ b/Game.Client/C_NPC_Barnacle.cs
@@ -3,24 +3,23 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CNPC_Barnacle")]
-public class C_NPC_Barnacle : C_AI_BaseNPC
+[NetworkName("CNPC_Barnacle", Table = "DT_Barnacle")]
+public partial class C_NPC_Barnacle : C_AI_BaseNPC
{
- public static readonly RecvTable DT_Barnacle = new(DT_AI_BaseNPC, [
- RecvPropFloat(FIELD.OF(nameof(Altitude))),
- RecvPropVector(FIELD.OF(nameof(Root))),
- RecvPropVector(FIELD.OF(nameof(Tip))),
- RecvPropVector(FIELD.OF(nameof(TipDrawOffset))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Barnacle);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Altitude)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Root)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Tip)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(TipDrawOffset)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_flAltitude")]
+ [NetworkVar("m_flAltitude")]
public float Altitude;
- [NetworkName("m_vecRoot")]
+ [NetworkVar("m_vecRoot")]
public Vector3 Root;
- [NetworkName("m_vecTip")]
+ [NetworkVar("m_vecTip")]
public Vector3 Tip;
- [NetworkName("m_vecTipDrawOffset")]
+ [NetworkVar("m_vecTipDrawOffset")]
public Vector3 TipDrawOffset;
}
diff --git a/Game.Client/C_NPC_Barney.cs b/Game.Client/C_NPC_Barney.cs
index 1fc9fbbd..a4dc5e25 100644
--- a/Game.Client/C_NPC_Barney.cs
+++ b/Game.Client/C_NPC_Barney.cs
@@ -4,10 +4,11 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CNPC_Barney")]
-public class C_NPC_Barney : C_AI_BaseNPC
+public partial class C_NPC_Barney : C_AI_BaseNPC
{
- public static readonly RecvTable DT_NPC_Barney = new(DT_AI_BaseNPC, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_NPC_Barney);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_NPC_CombineGunship.cs b/Game.Client/C_NPC_CombineGunship.cs
index f329b552..76c7f1ce 100644
--- a/Game.Client/C_NPC_CombineGunship.cs
+++ b/Game.Client/C_NPC_CombineGunship.cs
@@ -3,15 +3,14 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CNPC_CombineGunship")]
-public class C_NPC_CombineGunship : C_BaseHelicopter
+[NetworkName("CNPC_CombineGunship", Table = "DT_CombineGunship")]
+public partial class C_NPC_CombineGunship : C_BaseHelicopter
{
- public static readonly RecvTable DT_CombineGunship = new(DT_BaseHelicopter, [
- RecvPropVector(FIELD.OF(nameof(HitPos))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_CombineGunship);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(HitPos)) { Bits = 0, Flags = PropFlags.Coord },
+ ];
- [NetworkName("m_vecHitPos")]
+ [NetworkVar("m_vecHitPos")]
public Vector3 HitPos;
}
diff --git a/Game.Client/C_NPC_Manhack.cs b/Game.Client/C_NPC_Manhack.cs
index 34a02ec8..538cfd55 100644
--- a/Game.Client/C_NPC_Manhack.cs
+++ b/Game.Client/C_NPC_Manhack.cs
@@ -3,21 +3,20 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CNPC_Manhack")]
-public class C_NPC_Manhack : C_AI_BaseNPC
+public partial class C_NPC_Manhack : C_AI_BaseNPC
{
- public static readonly RecvTable DT_NPC_Manhack = new(DT_AI_BaseNPC, [
- RecvPropInt(FIELD.OF(nameof(EnginePitch1))),
- RecvPropFloat(FIELD.OF(nameof(EnginePitch1Time))),
- RecvPropInt(FIELD.OF(nameof(EnginePitch2))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_NPC_Manhack);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(EnginePitch1)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(EnginePitch1Time)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(EnginePitch2)) { Bits = 8, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_nEnginePitch1")]
+ [NetworkVar("m_nEnginePitch1")]
public int EnginePitch1;
- [NetworkName("m_flEnginePitch1Time")]
+ [NetworkVar("m_flEnginePitch1Time")]
public float EnginePitch1Time;
- [NetworkName("m_nEnginePitch2")]
+ [NetworkVar("m_nEnginePitch2")]
public int EnginePitch2;
}
diff --git a/Game.Client/C_NPC_Portal_FloorTurret.cs b/Game.Client/C_NPC_Portal_FloorTurret.cs
index c74bc53b..68deafa6 100644
--- a/Game.Client/C_NPC_Portal_FloorTurret.cs
+++ b/Game.Client/C_NPC_Portal_FloorTurret.cs
@@ -3,21 +3,20 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CNPC_Portal_FloorTurret")]
-public class C_NPC_Portal_FloorTurret : C_AI_BaseNPC
+public partial class C_NPC_Portal_FloorTurret : C_AI_BaseNPC
{
- public static readonly RecvTable DT_NPC_Portal_FloorTurret = new(DT_AI_BaseNPC, [
- RecvPropBool(FIELD.OF(nameof(OutOfAmmo))),
- RecvPropBool(FIELD.OF(nameof(LaserOn))),
- RecvPropInt(FIELD.OF(nameof(LaserHaloSprite))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_NPC_Portal_FloorTurret);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(OutOfAmmo),
+ nameof(LaserOn),
+ new(nameof(LaserHaloSprite)) { Bits = 16, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_bOutOfAmmo")]
+ [NetworkVar("m_bOutOfAmmo")]
public bool OutOfAmmo;
- [NetworkName("m_bLaserOn")]
+ [NetworkVar("m_bLaserOn")]
public bool LaserOn;
- [NetworkName("m_sLaserHaloSprite")]
+ [NetworkVar("m_sLaserHaloSprite")]
public int LaserHaloSprite;
}
diff --git a/Game.Client/C_NPC_Puppet.cs b/Game.Client/C_NPC_Puppet.cs
index 38537704..eae02424 100644
--- a/Game.Client/C_NPC_Puppet.cs
+++ b/Game.Client/C_NPC_Puppet.cs
@@ -3,18 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CNPC_Puppet")]
-public class C_NPC_Puppet : C_AI_BaseNPC
+public partial class C_NPC_Puppet : C_AI_BaseNPC
{
- public static readonly RecvTable DT_NPC_Puppet = new(DT_AI_BaseNPC, [
- RecvPropEHandle(FIELD.OF(nameof(AnimationTarget))),
- RecvPropInt(FIELD.OF(nameof(TargetAttachment))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_NPC_Puppet);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(AnimationTarget),
+ new(nameof(TargetAttachment)) { Bits = 12 },
+ ];
- [NetworkName("m_hAnimationTarget")]
+ [NetworkVar("m_hAnimationTarget")]
public EHANDLE AnimationTarget = new();
- [NetworkName("m_nTargetAttachment")]
+ [NetworkVar("m_nTargetAttachment")]
public int TargetAttachment;
}
diff --git a/Game.Client/C_NPC_RocketTurret.cs b/Game.Client/C_NPC_RocketTurret.cs
index d4c6e5fd..eb181ded 100644
--- a/Game.Client/C_NPC_RocketTurret.cs
+++ b/Game.Client/C_NPC_RocketTurret.cs
@@ -3,21 +3,20 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CNPC_RocketTurret")]
-public class C_NPC_RocketTurret : C_AI_BaseNPC
+public partial class C_NPC_RocketTurret : C_AI_BaseNPC
{
- public static readonly RecvTable DT_NPC_RocketTurret = new(DT_AI_BaseNPC, [
- RecvPropInt(FIELD.OF(nameof(LaserState))),
- RecvPropInt(FIELD.OF(nameof(SiteHalo))),
- RecvPropVector(FIELD.OF(nameof(CurrentAngles))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_NPC_RocketTurret);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(LaserState)) { Bits = 2 },
+ new(nameof(SiteHalo)) { Bits = 16, Flags = PropFlags.Unsigned },
+ new(nameof(CurrentAngles)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_iLaserState")]
+ [NetworkVar("m_iLaserState")]
public int LaserState;
- [NetworkName("m_nSiteHalo")]
+ [NetworkVar("m_nSiteHalo")]
public int SiteHalo;
- [NetworkName("m_vecCurrentAngles")]
+ [NetworkVar("m_vecCurrentAngles")]
public Vector3 CurrentAngles;
}
diff --git a/Game.Client/C_NPC_RollerMine.cs b/Game.Client/C_NPC_RollerMine.cs
index b234ba31..afc16932 100644
--- a/Game.Client/C_NPC_RollerMine.cs
+++ b/Game.Client/C_NPC_RollerMine.cs
@@ -3,24 +3,23 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CNPC_RollerMine")]
-public class C_NPC_RollerMine : C_AI_BaseNPC
+[NetworkName("CNPC_RollerMine", Table = "DT_RollerMine")]
+public partial class C_NPC_RollerMine : C_AI_BaseNPC
{
- public static readonly RecvTable DT_RollerMine = new(DT_AI_BaseNPC, [
- RecvPropBool(FIELD.OF(nameof(IsOpen))),
- RecvPropFloat(FIELD.OF(nameof(ActiveTime))),
- RecvPropBool(FIELD.OF(nameof(HackedByAlyx))),
- RecvPropBool(FIELD.OF(nameof(PowerDown))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_RollerMine);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(IsOpen),
+ new(nameof(ActiveTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(HackedByAlyx),
+ nameof(PowerDown),
+ ];
- [NetworkName("m_bIsOpen")]
+ [NetworkVar("m_bIsOpen")]
public bool IsOpen;
- [NetworkName("m_flActiveTime")]
+ [NetworkVar("m_flActiveTime")]
public float ActiveTime;
- [NetworkName("m_bHackedByAlyx")]
+ [NetworkVar("m_bHackedByAlyx")]
public bool HackedByAlyx;
- [NetworkName("m_bPowerDown")]
+ [NetworkVar("m_bPowerDown")]
public bool PowerDown;
}
diff --git a/Game.Client/C_NPC_Vortigaunt.cs b/Game.Client/C_NPC_Vortigaunt.cs
index 5f7b170d..c4b3a1e6 100644
--- a/Game.Client/C_NPC_Vortigaunt.cs
+++ b/Game.Client/C_NPC_Vortigaunt.cs
@@ -3,21 +3,20 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CNPC_Vortigaunt")]
-public class C_NPC_Vortigaunt : C_AI_BaseNPC
+public partial class C_NPC_Vortigaunt : C_AI_BaseNPC
{
- public static readonly RecvTable DT_NPC_Vortigaunt = new(DT_AI_BaseNPC, [
- RecvPropFloat(FIELD.OF(nameof(BlueEndFadeTime))),
- RecvPropBool(FIELD.OF(nameof(IsBlue))),
- RecvPropBool(FIELD.OF(nameof(IsBlack))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_NPC_Vortigaunt);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(BlueEndFadeTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(IsBlue),
+ nameof(IsBlack),
+ ];
- [NetworkName("m_flBlueEndFadeTime")]
+ [NetworkVar("m_flBlueEndFadeTime")]
public float BlueEndFadeTime;
- [NetworkName("m_bIsBlue")]
+ [NetworkVar("m_bIsBlue")]
public bool IsBlue;
- [NetworkName("m_bIsBlack")]
+ [NetworkVar("m_bIsBlack")]
public bool IsBlack;
}
diff --git a/Game.Client/C_ParticlePerformanceMonitor.cs b/Game.Client/C_ParticlePerformanceMonitor.cs
index 7fdae6d7..34a2c5c4 100644
--- a/Game.Client/C_ParticlePerformanceMonitor.cs
+++ b/Game.Client/C_ParticlePerformanceMonitor.cs
@@ -3,18 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CParticlePerformanceMonitor")]
-public class C_ParticlePerformanceMonitor : C_BaseEntity
+public partial class C_ParticlePerformanceMonitor : C_BaseEntity
{
- public static readonly RecvTable DT_ParticlePerformanceMonitor = new(DT_BaseEntity, [
- RecvPropBool(FIELD.OF(nameof(DisplayPerf))),
- RecvPropBool(FIELD.OF(nameof(MeasurePerf))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_ParticlePerformanceMonitor);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(MeasurePerf),
+ nameof(DisplayPerf),
+ ];
- [NetworkName("m_bDisplayPerf")]
- public bool DisplayPerf;
- [NetworkName("m_bMeasurePerf")]
+ [NetworkVar("m_bMeasurePerf")]
public bool MeasurePerf;
+ [NetworkVar("m_bDisplayPerf")]
+ public bool DisplayPerf;
}
diff --git a/Game.Client/C_ParticleSmokeGrenade.cs b/Game.Client/C_ParticleSmokeGrenade.cs
index d52e9619..85246d57 100644
--- a/Game.Client/C_ParticleSmokeGrenade.cs
+++ b/Game.Client/C_ParticleSmokeGrenade.cs
@@ -3,24 +3,23 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("ParticleSmokeGrenade")]
-public class C_ParticleSmokeGrenade : C_BaseParticleEntity
+[NetworkName("ParticleSmokeGrenade", Table = "DT_ParticleSmokeGrenade")]
+public partial class C_ParticleSmokeGrenade : C_BaseParticleEntity
{
- public static readonly RecvTable DT_ParticleSmokeGrenade = new(DT_BaseParticleEntity, [
- RecvPropFloat(FIELD.OF(nameof(SpawnTime))),
- RecvPropFloat(FIELD.OF(nameof(FadeStartTime))),
- RecvPropFloat(FIELD.OF(nameof(FadeEndTime))),
- RecvPropBool(FIELD.OF(nameof(CurrentStage))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_ParticleSmokeGrenade);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SpawnTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeStartTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeEndTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(CurrentStage),
+ ];
- [NetworkName("m_flSpawnTime")]
+ [NetworkVar("m_flSpawnTime")]
public float SpawnTime;
- [NetworkName("m_FadeStartTime")]
+ [NetworkVar("m_FadeStartTime")]
public float FadeStartTime;
- [NetworkName("m_FadeEndTime")]
+ [NetworkVar("m_FadeEndTime")]
public float FadeEndTime;
- [NetworkName("m_CurrentStage")]
+ [NetworkVar("m_CurrentStage")]
public bool CurrentStage;
}
diff --git a/Game.Client/C_ParticleSystem.cs b/Game.Client/C_ParticleSystem.cs
index 9c10a38b..cab86ef4 100644
--- a/Game.Client/C_ParticleSystem.cs
+++ b/Game.Client/C_ParticleSystem.cs
@@ -4,37 +4,37 @@
using Source.Common;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CParticleSystem")]
-public class C_ParticleSystem : C_BaseEntity
+[NetworkName("CParticleSystem", NoBase = true)]
+public partial class C_ParticleSystem : C_BaseEntity
{
- public static readonly RecvTable DT_ParticleSystem = new([
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropEHandle(FIELD.OF(nameof(OwnerEntity))),
- RecvPropEHandle(FIELD.OF(nameof(MoveParent))),
- RecvPropInt(FIELD.OF(nameof(ParentAttachment))),
- RecvPropVector(FIELD.OF(nameof(Rotation))),
- RecvPropInt(FIELD.OF(nameof(EffectIndex))),
- RecvPropBool(FIELD.OF(nameof(Active))),
- RecvPropFloat(FIELD.OF(nameof(StartTime))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(ControlPointEnts)), RecvPropEHandle(FIELD.OF_ARRAYINDEX(nameof(ControlPointEnts), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(ControlPointParents)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(ControlPointParents), 0))),
- RecvPropBool(FIELD.OF(nameof(WeatherEffect))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_ParticleSystem);
- [NetworkName("m_iEffectIndex")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Origin)) { Encoding = NetEncoding.Vector, Bits = 0, Flags = PropFlags.Coord | PropFlags.ChangesOften },
+ new(nameof(OwnerEntity)) { Encoding = NetEncoding.EHandle },
+ new(nameof(NetworkMoveParent)) { Encoding = NetEncoding.Int, Proxy = typeof(MoveParentProxy) },
+ new(nameof(ParentAttachment)) { Encoding = NetEncoding.Int, Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Rotation)) { Encoding = NetEncoding.Vector, Bits = 13, Flags = PropFlags.RoundDown | PropFlags.ChangesOften },
+ new(nameof(EffectIndex)) { Bits = 12, Flags = PropFlags.Unsigned },
+ nameof(Active),
+ new(nameof(StartTime)) { Encoding = NetEncoding.Float, Bits = 0, Flags = PropFlags.NoScale },
+ nameof(ControlPointEnts),
+ new(nameof(ControlPointParents)) { Bits = 3, Flags = PropFlags.Unsigned },
+ nameof(WeatherEffect),
+ ];
+
+ [NetworkVar("m_iEffectIndex")]
public int EffectIndex;
- [NetworkName("m_bActive")]
+ [NetworkVar("m_bActive")]
public bool Active;
- [NetworkName("m_flStartTime")]
+ [NetworkVar("m_flStartTime")]
public TimeUnit_t StartTime;
- [NetworkName("m_bWeatherEffect")]
- public bool WeatherEffect;
-
- [NetworkName("m_hControlPointEnts")]
+ [NetworkVar("m_hControlPointEnts")]
public InlineArrayNewMaxControlPoints ControlPointEnts = new();
- [NetworkName("m_iControlPointParents")]
+
+ [NetworkVar("m_iControlPointParents")]
public InlineArrayNewMaxControlPoints ControlPointParents = new();
+ [NetworkVar("m_bWeatherEffect")]
+ public bool WeatherEffect;
}
diff --git a/Game.Client/C_PhysBox.cs b/Game.Client/C_PhysBox.cs
index c280861b..d72e4892 100644
--- a/Game.Client/C_PhysBox.cs
+++ b/Game.Client/C_PhysBox.cs
@@ -5,8 +5,10 @@
namespace Game.Client;
[NetworkName("CPhysBox")]
-public class C_PhysBox : C_BaseEntity
+public partial class C_PhysBox : C_BaseEntity
{
- public static readonly RecvTable DT_PhysBox = new(DT_BaseEntity, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PhysBox);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_PhysMagnet.cs b/Game.Client/C_PhysMagnet.cs
index 2b304551..10f4ab58 100644
--- a/Game.Client/C_PhysMagnet.cs
+++ b/Game.Client/C_PhysMagnet.cs
@@ -5,8 +5,10 @@
namespace Game.Client;
[NetworkName("CPhysMagnet")]
-public class C_PhysMagnet : C_BaseAnimating
+public partial class C_PhysMagnet : C_BaseAnimating
{
- public static readonly RecvTable DT_PhysMagnet = new(DT_BaseAnimating, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PhysMagnet);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_PhysicsProp.cs b/Game.Client/C_PhysicsProp.cs
index c5ed4053..6ef119d7 100644
--- a/Game.Client/C_PhysicsProp.cs
+++ b/Game.Client/C_PhysicsProp.cs
@@ -4,15 +4,15 @@
using Source.Common;
namespace Game.Client;
-using FIELD = Source.FIELD;
[NetworkName("CPhysicsProp")]
-public class C_PhysicsProp : C_BreakableProp
+public partial class C_PhysicsProp : C_BreakableProp
{
- public static readonly RecvTable DT_PhysicsProp = new(DT_BreakableProp, [
- RecvPropBool(FIELD.OF(nameof(Awake)))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PhysicsProp);
- [NetworkName("m_bAwake")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Awake),
+ ];
+
+ [NetworkVar("m_bAwake")]
public bool Awake;
}
diff --git a/Game.Client/C_Plasma.cs b/Game.Client/C_Plasma.cs
index a3749a98..b53c488e 100644
--- a/Game.Client/C_Plasma.cs
+++ b/Game.Client/C_Plasma.cs
@@ -3,30 +3,29 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CPlasma")]
-public class C_Plasma : C_BaseEntity
+public partial class C_Plasma : C_BaseEntity
{
- public static readonly RecvTable DT_Plasma = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(Scale))),
- RecvPropFloat(FIELD.OF(nameof(ScaleTime))),
- RecvPropInt(FIELD.OF(nameof(Flags))),
- RecvPropInt(FIELD.OF(nameof(PlasmaModelIndex))),
- RecvPropInt(FIELD.OF(nameof(PlasmaModelIndex2))),
- RecvPropInt(FIELD.OF(nameof(GlowModelIndex))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Plasma);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Scale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(ScaleTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Flags)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(PlasmaModelIndex)) { Bits = 14 },
+ new(nameof(PlasmaModelIndex2)) { Bits = 14 },
+ new(nameof(GlowModelIndex)) { Bits = 14 },
+ ];
- [NetworkName("m_flScale")]
+ [NetworkVar("m_flScale")]
public float Scale;
- [NetworkName("m_flScaleTime")]
+ [NetworkVar("m_flScaleTime")]
public float ScaleTime;
- [NetworkName("m_nFlags")]
+ [NetworkVar("m_nFlags")]
public int Flags;
- [NetworkName("m_nPlasmaModelIndex")]
+ [NetworkVar("m_nPlasmaModelIndex")]
public int PlasmaModelIndex;
- [NetworkName("m_nPlasmaModelIndex2")]
+ [NetworkVar("m_nPlasmaModelIndex2")]
public int PlasmaModelIndex2;
- [NetworkName("m_nGlowModelIndex")]
+ [NetworkVar("m_nGlowModelIndex")]
public int GlowModelIndex;
}
diff --git a/Game.Client/C_PlayerResource.cs b/Game.Client/C_PlayerResource.cs
index 17e40276..90ed8fc0 100644
--- a/Game.Client/C_PlayerResource.cs
+++ b/Game.Client/C_PlayerResource.cs
@@ -10,42 +10,40 @@ namespace Game.Client;
using Game.Client.GarrysMod;
-using FIELD = Source.FIELD;
-
public static class PlayerResourceGlobals
{
public static C_PlayerResource? g_pPlayerResource;
}
-[NetworkName("CPlayerResource")]
-public class C_PlayerResource : C_BaseEntity
+[NetworkName("CPlayerResource", NoBase = true)]
+public partial class C_PlayerResource : C_BaseEntity
{
- public static readonly RecvTable DT_PlayerResource = new([
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Ping)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(Ping), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Score)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(Score), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Deaths)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(Deaths), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Connected)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(Connected), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Team)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(Team), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Alive)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(Alive), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Health)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(Health), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(Armor)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(Armor)))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PlayerResource);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Ping)) { Bits = 12, Flags = PropFlags.Unsigned },
+ new(nameof(Score)) { Bits = 32 },
+ new(nameof(Deaths)) { Bits = 32 },
+ new(nameof(Connected)) { Encoding = NetEncoding.Int, Bits = 1, Flags = PropFlags.Unsigned },
+ new(nameof(Team)) { Bits = 16 },
+ new(nameof(Alive)) { Encoding = NetEncoding.Int, Bits = 1, Flags = PropFlags.Unsigned },
+ new(nameof(Health)) { Bits = 32, Flags = PropFlags.VarInt | PropFlags.Unsigned | PropFlags.Normal },
+ new(nameof(Armor)) { Bits = 32, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_iPing")]
+ [NetworkVar("m_iPing")]
InlineArrayMaxPlayersPlusOne Ping = new();
- [NetworkName("m_iScore")]
+ [NetworkVar("m_iScore")]
InlineArrayMaxPlayersPlusOne Score = new();
- [NetworkName("m_iDeaths")]
+ [NetworkVar("m_iDeaths")]
InlineArrayMaxPlayersPlusOne Deaths = new();
- [NetworkName("m_bConnected")]
+ [NetworkVar("m_bConnected")]
InlineArrayMaxPlayersPlusOne Connected = new();
- [NetworkName("m_iTeam")]
+ [NetworkVar("m_iTeam")]
InlineArrayMaxPlayersPlusOne Team = new();
- [NetworkName("m_bAlive")]
+ [NetworkVar("m_bAlive")]
InlineArrayMaxPlayersPlusOne Alive = new();
- [NetworkName("m_iHealth")]
+ [NetworkVar("m_iHealth")]
new InlineArrayMaxPlayersPlusOne Health = new();
- [NetworkName("m_iArmor")]
+ [NetworkVar("m_iArmor")]
InlineArrayMaxPlayersPlusOne Armor = new();
const string PLAYER_UNCONNECTED_NAME = "unconnected";
diff --git a/Game.Client/C_PointCamera.cs b/Game.Client/C_PointCamera.cs
index c2975af0..a5a9ba06 100644
--- a/Game.Client/C_PointCamera.cs
+++ b/Game.Client/C_PointCamera.cs
@@ -3,48 +3,47 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CPointCamera")]
-public class C_PointCamera : C_BaseEntity
+public partial class C_PointCamera : C_BaseEntity
{
- public static readonly RecvTable DT_PointCamera = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(FOV))),
- RecvPropFloat(FIELD.OF(nameof(Resolution))),
- RecvPropBool(FIELD.OF(nameof(FogEnable))),
- RecvPropInt(FIELD.OF(nameof(FogColor))),
- RecvPropInt(FIELD.OF(nameof(FogColorHDR))),
- RecvPropFloat(FIELD.OF(nameof(FogStart))),
- RecvPropFloat(FIELD.OF(nameof(FogEnd))),
- RecvPropFloat(FIELD.OF(nameof(FogMaxDensity))),
- RecvPropBool(FIELD.OF(nameof(FogRadial))),
- RecvPropBool(FIELD.OF(nameof(Active))),
- RecvPropBool(FIELD.OF(nameof(UseScreenAspectRatio))),
- RecvPropBool(FIELD.OF(nameof(GlobalOverride))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PointCamera);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(FOV)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Resolution)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(FogEnable),
+ new(nameof(FogColor)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(FogColorHDR)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(FogStart)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FogEnd)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FogMaxDensity)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(FogRadial),
+ nameof(Active),
+ nameof(UseScreenAspectRatio),
+ nameof(GlobalOverride),
+ ];
- [NetworkName("m_FOV")]
+ [NetworkVar("m_FOV")]
public float FOV;
- [NetworkName("m_Resolution")]
+ [NetworkVar("m_Resolution")]
public float Resolution;
- [NetworkName("m_bFogEnable")]
+ [NetworkVar("m_bFogEnable")]
public bool FogEnable;
- [NetworkName("m_FogColor")]
+ [NetworkVar("m_FogColor")]
public int FogColor;
- [NetworkName("m_FogColorHDR")]
+ [NetworkVar("m_FogColorHDR")]
public int FogColorHDR;
- [NetworkName("m_flFogStart")]
+ [NetworkVar("m_flFogStart")]
public float FogStart;
- [NetworkName("m_flFogEnd")]
+ [NetworkVar("m_flFogEnd")]
public float FogEnd;
- [NetworkName("m_flFogMaxDensity")]
+ [NetworkVar("m_flFogMaxDensity")]
public float FogMaxDensity;
- [NetworkName("m_bFogRadial")]
+ [NetworkVar("m_bFogRadial")]
public bool FogRadial;
- [NetworkName("m_bActive")]
+ [NetworkVar("m_bActive")]
public bool Active;
- [NetworkName("m_bUseScreenAspectRatio")]
+ [NetworkVar("m_bUseScreenAspectRatio")]
public bool UseScreenAspectRatio;
- [NetworkName("m_bGlobalOverride")]
+ [NetworkVar("m_bGlobalOverride")]
public bool GlobalOverride;
}
diff --git a/Game.Client/C_PointWorldText.cs b/Game.Client/C_PointWorldText.cs
index d89be4ea..88358516 100644
--- a/Game.Client/C_PointWorldText.cs
+++ b/Game.Client/C_PointWorldText.cs
@@ -3,37 +3,36 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[LinkEntityToClass("point_worldtext")]
[NetworkName("CPointWorldText")]
-public class C_PointWorldText : C_BaseEntity
+public partial class C_PointWorldText : C_BaseEntity
{
- public static readonly RecvTable DT_PointWorldText = new(DT_BaseEntity, [
- RecvPropString(FIELD.OF(nameof(SzText))),
- RecvPropInt(FIELD.OF(nameof(ColTextColor))),
- RecvPropFloat(FIELD.OF(nameof(TextSize))),
- RecvPropFloat(FIELD.OF(nameof(TextSpacingX))),
- RecvPropFloat(FIELD.OF(nameof(TextSpacingY))),
- RecvPropInt(FIELD.OF(nameof(Orientation))),
- RecvPropBool(FIELD.OF(nameof(Rainbow))),
- RecvPropBool(FIELD.OF(nameof(TextEnabled))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PointWorldText);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SzText)) { Encoding = NetEncoding.String },
+ new(nameof(ColTextColor)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(TextSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(TextSpacingX)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(TextSpacingY)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Orientation)) { Bits = 3, Flags = PropFlags.Unsigned },
+ nameof(Rainbow),
+ nameof(TextEnabled),
+ ];
- [NetworkName("m_szText")]
+ [NetworkVar("m_szText")]
public InlineArray512 SzText;
- [NetworkName("m_colTextColor")]
+ [NetworkVar("m_colTextColor")]
public int ColTextColor;
- [NetworkName("m_flTextSize")]
+ [NetworkVar("m_flTextSize")]
public float TextSize;
- [NetworkName("m_flTextSpacingX")]
+ [NetworkVar("m_flTextSpacingX")]
public float TextSpacingX;
- [NetworkName("m_flTextSpacingY")]
+ [NetworkVar("m_flTextSpacingY")]
public float TextSpacingY;
- [NetworkName("m_nOrientation")]
+ [NetworkVar("m_nOrientation")]
public int Orientation;
- [NetworkName("m_bRainbow")]
+ [NetworkVar("m_bRainbow")]
public bool Rainbow;
- [NetworkName("m_bTextEnabled")]
+ [NetworkVar("m_bTextEnabled")]
public bool TextEnabled;
}
diff --git a/Game.Client/C_PoseController.cs b/Game.Client/C_PoseController.cs
index c54e6b0e..4e9f5e0e 100644
--- a/Game.Client/C_PoseController.cs
+++ b/Game.Client/C_PoseController.cs
@@ -3,46 +3,45 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CPoseController")]
-public class C_PoseController : C_BaseEntity
+public partial class C_PoseController : C_BaseEntity
{
- public static readonly RecvTable DT_PoseController = new(DT_BaseEntity, [
- RecvPropArray3(FIELD.OF_ARRAY(nameof(HProps)), RecvPropEHandle(FIELD.OF_ARRAYINDEX(nameof(HProps), 0))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(ChPoseIndex)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(ChPoseIndex), 0))),
- RecvPropBool(FIELD.OF(nameof(PoseValueParity))),
- RecvPropFloat(FIELD.OF(nameof(PoseValue))),
- RecvPropFloat(FIELD.OF(nameof(InterpolationTime))),
- RecvPropBool(FIELD.OF(nameof(InterpolationWrap))),
- RecvPropFloat(FIELD.OF(nameof(CycleFrequency))),
- RecvPropInt(FIELD.OF(nameof(FModType))),
- RecvPropFloat(FIELD.OF(nameof(FModTimeOffset))),
- RecvPropFloat(FIELD.OF(nameof(FModRate))),
- RecvPropFloat(FIELD.OF(nameof(FModAmplitude))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PoseController);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(HProps),
+ new(nameof(ChPoseIndex)) { Bits = 5, Flags = PropFlags.Unsigned },
+ nameof(PoseValueParity),
+ new(nameof(PoseValue)) { Bits = 11, Low = 0.0f, High = 1.0f },
+ new(nameof(InterpolationTime)) { Bits = 11, Low = 0.0f, High = 10.0f },
+ nameof(InterpolationWrap),
+ new(nameof(CycleFrequency)) { Bits = 11, Low = -10.0f, High = 10.0f },
+ new(nameof(FModType)) { Bits = 3, Flags = PropFlags.Unsigned },
+ new(nameof(FModTimeOffset)) { Bits = 11, Low = -1.0f, High = 1.0f },
+ new(nameof(FModRate)) { Bits = 11, Low = -10.0f, High = 10.0f },
+ new(nameof(FModAmplitude)) { Bits = 11, Low = 0.0f, High = 10.0f },
+ ];
public const int MAX_POSE_CONTROLLED_PROPS = 4;
- [NetworkName("m_hProps")]
+ [NetworkVar("m_hProps")]
public InlineArray4 HProps;
- [NetworkName("m_chPoseIndex")]
+ [NetworkVar("m_chPoseIndex")]
public InlineArray4 ChPoseIndex;
- [NetworkName("m_bPoseValueParity")]
+ [NetworkVar("m_bPoseValueParity")]
public bool PoseValueParity;
- [NetworkName("m_fPoseValue")]
+ [NetworkVar("m_fPoseValue")]
public float PoseValue;
- [NetworkName("m_fInterpolationTime")]
+ [NetworkVar("m_fInterpolationTime")]
public float InterpolationTime;
- [NetworkName("m_bInterpolationWrap")]
+ [NetworkVar("m_bInterpolationWrap")]
public bool InterpolationWrap;
- [NetworkName("m_fCycleFrequency")]
+ [NetworkVar("m_fCycleFrequency")]
public float CycleFrequency;
- [NetworkName("m_nFModType")]
+ [NetworkVar("m_nFModType")]
public int FModType;
- [NetworkName("m_fFModTimeOffset")]
+ [NetworkVar("m_fFModTimeOffset")]
public float FModTimeOffset;
- [NetworkName("m_fFModRate")]
+ [NetworkVar("m_fFModRate")]
public float FModRate;
- [NetworkName("m_fFModAmplitude")]
+ [NetworkVar("m_fFModAmplitude")]
public float FModAmplitude;
}
diff --git a/Game.Client/C_Precipitation.cs b/Game.Client/C_Precipitation.cs
index e77d382c..bad5ef7a 100644
--- a/Game.Client/C_Precipitation.cs
+++ b/Game.Client/C_Precipitation.cs
@@ -3,27 +3,26 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CPrecipitation")]
-public class C_Precipitation : C_BaseEntity
+public partial class C_Precipitation : C_BaseEntity
{
- public static readonly RecvTable DT_Precipitation = new(DT_BaseEntity, [
- RecvPropInt(FIELD.OF(nameof(PrecipType))),
- RecvPropString(FIELD.OF(nameof(ParticleNameClose))),
- RecvPropString(FIELD.OF(nameof(ParticleNameInner))),
- RecvPropString(FIELD.OF(nameof(ParticleNameOuter))),
- RecvPropFloat(FIELD.OF(nameof(ParticleDist))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Precipitation);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(PrecipType)) { Bits = 4, Flags = PropFlags.Unsigned },
+ new(nameof(ParticleNameClose)) { Encoding = NetEncoding.String },
+ new(nameof(ParticleNameInner)) { Encoding = NetEncoding.String },
+ new(nameof(ParticleNameOuter)) { Encoding = NetEncoding.String },
+ new(nameof(ParticleDist)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_nPrecipType")]
+ [NetworkVar("m_nPrecipType")]
public int PrecipType;
- [NetworkName("m_sParticleNameClose")]
+ [NetworkVar("m_sParticleNameClose")]
public InlineArray512 ParticleNameClose;
- [NetworkName("m_sParticleNameInner")]
+ [NetworkVar("m_sParticleNameInner")]
public InlineArray512 ParticleNameInner;
- [NetworkName("m_sParticleNameOuter")]
+ [NetworkVar("m_sParticleNameOuter")]
public InlineArray512 ParticleNameOuter;
- [NetworkName("m_flParticleDist")]
+ [NetworkVar("m_flParticleDist")]
public float ParticleDist;
}
diff --git a/Game.Client/C_PrecipitationBlocker.cs b/Game.Client/C_PrecipitationBlocker.cs
index 7f6acd74..c0f706d9 100644
--- a/Game.Client/C_PrecipitationBlocker.cs
+++ b/Game.Client/C_PrecipitationBlocker.cs
@@ -3,10 +3,11 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CPrecipitationBlocker")]
-public class C_PrecipitationBlocker : C_BaseEntity
+public partial class C_PrecipitationBlocker : C_BaseEntity
{
- public static readonly RecvTable DT_PrecipitationBlocker = new(DT_BaseEntity, [ ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PrecipitationBlocker);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_PropCrane.cs b/Game.Client/C_PropCrane.cs
index 734dd864..ea573b06 100644
--- a/Game.Client/C_PropCrane.cs
+++ b/Game.Client/C_PropCrane.cs
@@ -3,27 +3,26 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CPropCrane")]
-public class C_PropCrane : C_BaseAnimating
+public partial class C_PropCrane : C_BaseAnimating
{
- public static readonly RecvTable DT_PropCrane = new(DT_BaseAnimating, [
- RecvPropEHandle(FIELD.OF(nameof(Player))),
- RecvPropBool(FIELD.OF(nameof(MagnetOn))),
- RecvPropBool(FIELD.OF(nameof(EnterAnimOn))),
- RecvPropBool(FIELD.OF(nameof(ExitAnimOn))),
- RecvPropVector(FIELD.OF(nameof(EyeExitEndpoint))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PropCrane);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Player),
+ nameof(MagnetOn),
+ nameof(EnterAnimOn),
+ nameof(ExitAnimOn),
+ new(nameof(EyeExitEndpoint)) { Bits = 0, Flags = PropFlags.Coord },
+ ];
- [NetworkName("m_hPlayer")]
+ [NetworkVar("m_hPlayer")]
public EHANDLE Player = new();
- [NetworkName("m_bMagnetOn")]
+ [NetworkVar("m_bMagnetOn")]
public bool MagnetOn;
- [NetworkName("m_bEnterAnimOn")]
+ [NetworkVar("m_bEnterAnimOn")]
public bool EnterAnimOn;
- [NetworkName("m_bExitAnimOn")]
+ [NetworkVar("m_bExitAnimOn")]
public bool ExitAnimOn;
- [NetworkName("m_vecEyeExitEndpoint")]
+ [NetworkVar("m_vecEyeExitEndpoint")]
public Vector3 EyeExitEndpoint;
}
diff --git a/Game.Client/C_PropEnergyBall.cs b/Game.Client/C_PropEnergyBall.cs
index dafdbc9b..b32abdb6 100644
--- a/Game.Client/C_PropEnergyBall.cs
+++ b/Game.Client/C_PropEnergyBall.cs
@@ -4,19 +4,18 @@
using System.Numerics;
using Game.Client.HL2;
namespace Game.Client;
-using FIELD = FIELD;
[LinkEntityToClass("prop_energy_ball")]
[NetworkName("CPropEnergyBall")]
-public class C_PropEnergyBall : C_PropCombineBall
+public partial class C_PropEnergyBall : C_PropCombineBall
{
- public static readonly RecvTable DT_PropEnergyBall = new(DT_PropCombineBall, [
- RecvPropBool(FIELD.OF(nameof(IsInfiniteLife))),
- RecvPropFloat(FIELD.OF(nameof(TimeTillDeath))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PropEnergyBall);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(IsInfiniteLife),
+ new(nameof(TimeTillDeath)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_bIsInfiniteLife")]
+ [NetworkVar("m_bIsInfiniteLife")]
public bool IsInfiniteLife;
- [NetworkName("m_fTimeTillDeath")]
+ [NetworkVar("m_fTimeTillDeath")]
public float TimeTillDeath;
}
diff --git a/Game.Client/C_PropJeep.cs b/Game.Client/C_PropJeep.cs
index f70b0ad0..5889db21 100644
--- a/Game.Client/C_PropJeep.cs
+++ b/Game.Client/C_PropJeep.cs
@@ -6,40 +6,34 @@
using System.Numerics;
namespace Game.Client;
-using FIELD_PJ = Source.FIELD;
-using FIELD_PJE = Source.FIELD;
[NetworkName("CPropJeep")]
-public class C_PropJeep : C_PropVehicleDriveable
+public partial class C_PropJeep : C_PropVehicleDriveable
{
- public static readonly RecvTable DT_PropJeep = new(DT_PropVehicleDriveable, [
- RecvPropBool(FIELD_PJ.OF(nameof(HeadlightIsOn)))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PropJeep);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(HeadlightIsOn),
+ ];
- [NetworkName("m_bHeadlightIsOn")]
+ [NetworkVar("m_bHeadlightIsOn")]
public bool HeadlightIsOn;
public override bool IsJeep() => true;
}
-[NetworkName("CPropJeepEpisodic")]
-public class C_PropJeepEpisodic : C_PropJeep
+[NetworkName("CPropJeepEpisodic", Table = "DT_CPropJeepEpisodic")]
+public partial class C_PropJeepEpisodic : C_PropJeep
{
- public static readonly RecvTable DT_CPropJeepEpisodic = new(DT_PropJeep, [
- RecvPropInt(FIELD_PJE.OF(nameof(NumRadarContacts))),
-
- RecvPropVector(FIELD_PJE.OF_ARRAYINDEX(nameof(RadarContactPos), 0)),
- RecvPropArray2(null!, 24, "m_vecRadarContactPos"),
-
- RecvPropInt(FIELD_PJE.OF_ARRAYINDEX(nameof(RadarContactType), 0)),
- RecvPropArray2(null!, 24, "m_iRadarContactType"),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_CPropJeepEpisodic);
-
- [NetworkName("m_iNumRadarContacts")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(NumRadarContacts),
+ new(nameof(RadarContactPos)) { Encoding = NetEncoding.Array2 },
+ new(nameof(RadarContactType)) { Encoding = NetEncoding.Array2 },
+ ];
+
+ [NetworkVar("m_iNumRadarContacts")]
public int NumRadarContacts;
- [NetworkName("m_vecRadarContactPos")]
+ [NetworkVar("m_vecRadarContactPos")]
public InlineArray24 RadarContactPos;
- [NetworkName("m_iRadarContactType")]
+ [NetworkVar("m_iRadarContactType")]
public InlineArray24 RadarContactType;
}
diff --git a/Game.Client/C_PropScalable.cs b/Game.Client/C_PropScalable.cs
index c84239d4..8d9ce673 100644
--- a/Game.Client/C_PropScalable.cs
+++ b/Game.Client/C_PropScalable.cs
@@ -3,42 +3,41 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CPropScalable")]
-public class C_PropScalable : C_BaseAnimating
+public partial class C_PropScalable : C_BaseAnimating
{
- public static readonly RecvTable DT_PropScalable = new(DT_BaseAnimating, [
- // todo: RecvProxy_ScaleX
- RecvPropFloat(FIELD.OF(nameof(ScaleX))),
- // todo: RecvProxy_ScaleY
- RecvPropFloat(FIELD.OF(nameof(ScaleY))),
- // todo: RecvProxy_ScaleZ
- RecvPropFloat(FIELD.OF(nameof(ScaleZ))),
- RecvPropFloat(FIELD.OF(nameof(LerpTimeX))),
- RecvPropFloat(FIELD.OF(nameof(LerpTimeY))),
- RecvPropFloat(FIELD.OF(nameof(LerpTimeZ))),
- RecvPropFloat(FIELD.OF(nameof(GoalTimeX))),
- RecvPropFloat(FIELD.OF(nameof(GoalTimeY))),
- RecvPropFloat(FIELD.OF(nameof(GoalTimeZ))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PropScalable);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(ScaleX)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(ScaleY)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(ScaleZ)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(LerpTimeX)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(LerpTimeY)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(LerpTimeZ)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(GoalTimeX)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(GoalTimeY)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(GoalTimeZ)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_flScaleX")]
+ // todo: RecvProxy_ScaleX
+ [NetworkVar("m_flScaleX")]
public float ScaleX;
- [NetworkName("m_flScaleY")]
+ // todo: RecvProxy_ScaleY
+ [NetworkVar("m_flScaleY")]
public float ScaleY;
- [NetworkName("m_flScaleZ")]
+ // todo: RecvProxy_ScaleZ
+ [NetworkVar("m_flScaleZ")]
public float ScaleZ;
- [NetworkName("m_flLerpTimeX")]
+ [NetworkVar("m_flLerpTimeX")]
public float LerpTimeX;
- [NetworkName("m_flLerpTimeY")]
+ [NetworkVar("m_flLerpTimeY")]
public float LerpTimeY;
- [NetworkName("m_flLerpTimeZ")]
+ [NetworkVar("m_flLerpTimeZ")]
public float LerpTimeZ;
- [NetworkName("m_flGoalTimeX")]
+ [NetworkVar("m_flGoalTimeX")]
public float GoalTimeX;
- [NetworkName("m_flGoalTimeY")]
+ [NetworkVar("m_flGoalTimeY")]
public float GoalTimeY;
- [NetworkName("m_flGoalTimeZ")]
+ [NetworkVar("m_flGoalTimeZ")]
public float GoalTimeZ;
}
diff --git a/Game.Client/C_PropVehicleChoreoGeneric.cs b/Game.Client/C_PropVehicleChoreoGeneric.cs
index f2c561c6..de1fd019 100644
--- a/Game.Client/C_PropVehicleChoreoGeneric.cs
+++ b/Game.Client/C_PropVehicleChoreoGeneric.cs
@@ -4,58 +4,58 @@
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CPropVehicleChoreoGeneric")]
-public class C_PropVehicleChoreoGeneric : C_DynamicProp
+public partial class C_PropVehicleChoreoGeneric : C_DynamicProp
{
- [NetworkName("m_hPlayer")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Player),
+ nameof(EnterAnimOn),
+ nameof(ExitAnimOn),
+ nameof(ForceEyesToAttachment),
+ new(nameof(EyeExitEndpoint)) { Bits = 0, Flags = PropFlags.Coord },
+ nameof(VehicleViewClampEyeAngles),
+ new(nameof(VehicleViewPitchCurveZero)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VehicleViewPitchCurveLinear)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VehicleViewRollCurveZero)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VehicleViewRollCurveLinear)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VehicleViewFOV)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VehicleViewYawMin)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VehicleViewYawMax)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VehicleViewPitchMin)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(VehicleViewPitchMax)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
+
+ [NetworkVar("m_hPlayer")]
public EHANDLE Player;
- [NetworkName("m_bEnterAnimOn")]
+ [NetworkVar("m_bEnterAnimOn")]
public bool EnterAnimOn;
- [NetworkName("m_bExitAnimOn")]
+ [NetworkVar("m_bExitAnimOn")]
public bool ExitAnimOn;
- [NetworkName("m_bForceEyesToAttachment")]
+ [NetworkVar("m_bForceEyesToAttachment")]
public bool ForceEyesToAttachment;
- [NetworkName("m_vecEyeExitEndpoint")]
+ [NetworkVar("m_vecEyeExitEndpoint")]
public Vector3 EyeExitEndpoint;
- [NetworkName("m_vehicleView.bClampEyeAngles")]
+ [NetworkVar("m_vehicleView.bClampEyeAngles")]
public bool VehicleViewClampEyeAngles;
- [NetworkName("m_vehicleView.flPitchCurveZero")]
+ [NetworkVar("m_vehicleView.flPitchCurveZero")]
public float VehicleViewPitchCurveZero;
- [NetworkName("m_vehicleView.flPitchCurveLinear")]
+ [NetworkVar("m_vehicleView.flPitchCurveLinear")]
public float VehicleViewPitchCurveLinear;
- [NetworkName("m_vehicleView.flRollCurveZero")]
+ [NetworkVar("m_vehicleView.flRollCurveZero")]
public float VehicleViewRollCurveZero;
- [NetworkName("m_vehicleView.flRollCurveLinear")]
+ [NetworkVar("m_vehicleView.flRollCurveLinear")]
public float VehicleViewRollCurveLinear;
- [NetworkName("m_vehicleView.flFOV")]
+ [NetworkVar("m_vehicleView.flFOV")]
public float VehicleViewFOV;
- [NetworkName("m_vehicleView.flYawMin")]
+ [NetworkVar("m_vehicleView.flYawMin")]
public float VehicleViewYawMin;
- [NetworkName("m_vehicleView.flYawMax")]
+ [NetworkVar("m_vehicleView.flYawMax")]
public float VehicleViewYawMax;
- [NetworkName("m_vehicleView.flPitchMin")]
+ [NetworkVar("m_vehicleView.flPitchMin")]
public float VehicleViewPitchMin;
- [NetworkName("m_vehicleView.flPitchMax")]
+ [NetworkVar("m_vehicleView.flPitchMax")]
public float VehicleViewPitchMax;
- public static readonly RecvTable DT_PropVehicleChoreoGeneric = new(DT_DynamicProp, [
- RecvPropEHandle(FIELD.OF(nameof(Player))),
- RecvPropBool(FIELD.OF(nameof(EnterAnimOn))),
- RecvPropBool(FIELD.OF(nameof(ExitAnimOn))),
- RecvPropBool(FIELD.OF(nameof(ForceEyesToAttachment))),
- RecvPropVector(FIELD.OF(nameof(EyeExitEndpoint))),
- RecvPropBool(FIELD.OF(nameof(VehicleViewClampEyeAngles))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewPitchCurveZero))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewPitchCurveLinear))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewRollCurveZero))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewRollCurveLinear))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewFOV))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewYawMin))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewYawMax))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewPitchMin))),
- RecvPropFloat(FIELD.OF(nameof(VehicleViewPitchMax))),
- ]);
- public static new readonly ClientClass ClientClass = new ClientClass(DT_PropVehicleChoreoGeneric);
}
diff --git a/Game.Client/C_PropVehicleDriveable.cs b/Game.Client/C_PropVehicleDriveable.cs
index bcdafcf2..bec66cc8 100644
--- a/Game.Client/C_PropVehicleDriveable.cs
+++ b/Game.Client/C_PropVehicleDriveable.cs
@@ -5,52 +5,51 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = Source.FIELD;
[NetworkName("CPropVehicleDriveable")]
-public class C_PropVehicleDriveable : C_BaseAnimating
+public partial class C_PropVehicleDriveable : C_BaseAnimating
{
- public static readonly RecvTable DT_PropVehicleDriveable = new(DT_BaseAnimating, [
- RecvPropEHandle(FIELD.OF(nameof(Player))),
- RecvPropInt(FIELD.OF(nameof(Speed))),
- RecvPropInt(FIELD.OF(nameof(RPM))),
- RecvPropFloat(FIELD.OF(nameof(Throttle))),
- RecvPropInt(FIELD.OF(nameof(BoostTimeLeft))),
- RecvPropBool(FIELD.OF(nameof(HasBoost))),
- RecvPropBool(FIELD.OF(nameof(EnterAnimOn))),
- RecvPropBool(FIELD.OF(nameof(ExitAnimOn))),
- RecvPropBool(FIELD.OF(nameof(UnableToFire))),
- RecvPropVector(FIELD.OF(nameof(EyeExitEndpoint))),
- RecvPropBool(FIELD.OF(nameof(HasGun))),
- RecvPropVector(FIELD.OF(nameof(GunCrosshair))),
- RecvPropBool(FIELD.OF(nameof(Locked))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PropVehicleDriveable);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Player),
+ nameof(Speed),
+ new(nameof(RPM)) { Bits = 13 },
+ new(nameof(Throttle)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(BoostTimeLeft)) { Bits = 8 },
+ nameof(HasBoost),
+ nameof(EnterAnimOn),
+ nameof(ExitAnimOn),
+ nameof(UnableToFire),
+ new(nameof(EyeExitEndpoint)) { Bits = 0, Flags = PropFlags.Coord },
+ nameof(HasGun),
+ new(nameof(GunCrosshair)) { Bits = 0, Flags = PropFlags.Coord },
+ nameof(Locked),
+ ];
- [NetworkName("m_hPlayer")]
+ [NetworkVar("m_hPlayer")]
public EHANDLE Player = new();
- [NetworkName("m_nRPM")]
+ [NetworkVar("m_nRPM")]
public int RPM;
- [NetworkName("m_flThrottle")]
+ [NetworkVar("m_flThrottle")]
public float Throttle;
- [NetworkName("m_nBoostTimeLeft")]
+ [NetworkVar("m_nBoostTimeLeft")]
public int BoostTimeLeft;
- [NetworkName("m_nHasBoost")]
+ [NetworkVar("m_nHasBoost")]
public bool HasBoost;
public bool ScannerDisabledWeapons;
public bool ScannerDisabledVehicle;
- [NetworkName("m_bEnterAnimOn")]
+ [NetworkVar("m_bEnterAnimOn")]
public bool EnterAnimOn;
- [NetworkName("m_bExitAnimOn")]
+ [NetworkVar("m_bExitAnimOn")]
public bool ExitAnimOn;
- [NetworkName("m_bUnableToFire")]
+ [NetworkVar("m_bUnableToFire")]
public bool UnableToFire;
- [NetworkName("m_vecEyeExitEndpoint")]
+ [NetworkVar("m_vecEyeExitEndpoint")]
public Vector3 EyeExitEndpoint;
- [NetworkName("m_bHasGun")]
+ [NetworkVar("m_bHasGun")]
public bool HasGun;
- [NetworkName("m_vecGunCrosshair")]
+ [NetworkVar("m_vecGunCrosshair")]
public Vector3 GunCrosshair;
- [NetworkName("m_bLocked")]
+ [NetworkVar("m_bLocked")]
public bool Locked;
}
diff --git a/Game.Client/C_Props.cs b/Game.Client/C_Props.cs
index a76468d7..0402a2c6 100644
--- a/Game.Client/C_Props.cs
+++ b/Game.Client/C_Props.cs
@@ -6,77 +6,81 @@
namespace Game.Client;
using System.Numerics;
-using FIELD_DP = Source.FIELD;
using FIELD_PBM = Source.FIELD;
using FIELD_BPD = Source.FIELD;
using FIELD_PPM = Source.FIELD;
[NetworkName("CDynamicProp")]
-public class C_DynamicProp : C_BreakableProp
+public partial class C_DynamicProp : C_BreakableProp
{
- public static readonly RecvTable DT_DynamicProp = new(DT_BreakableProp, [
- RecvPropBool(FIELD_DP.OF(nameof(UseHitboxesForRenderBox)))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_DynamicProp);
- [NetworkName("m_bUseHitboxesForRenderBox")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(UseHitboxesForRenderBox),
+ ];
+
+ [NetworkVar("m_bUseHitboxesForRenderBox")]
public bool UseHitboxesForRenderBox;
}
[NetworkName("CPhysicsPropMultiplayer")]
-public class PhysicsPropMultiplayer : C_PhysicsProp
+public partial class PhysicsPropMultiplayer : C_PhysicsProp
{
- public static readonly RecvTable DT_PhysicsPropMultiplayer = new(DT_PhysicsProp, [
- RecvPropInt(FIELD_PPM.OF(nameof(PhysicsMode))),
- RecvPropFloat(FIELD_PPM.OF(nameof(Mass))),
- RecvPropVector(FIELD_PPM.OF(nameof(CollisionMins))),
- RecvPropVector(FIELD_PPM.OF(nameof(CollisionMaxs))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PhysicsPropMultiplayer);
-
- [NetworkName("m_iPhysicsMode")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(PhysicsMode)) { Bits = 2, Flags = PropFlags.Unsigned },
+ new(nameof(Mass)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(CollisionMins)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(CollisionMaxs)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
+
+ [NetworkVar("m_iPhysicsMode")]
public int PhysicsMode;
- [NetworkName("m_fMass")]
+ [NetworkVar("m_fMass")]
public float Mass;
- [NetworkName("m_collisionMins")]
+ [NetworkVar("m_collisionMins")]
public Vector3 CollisionMins;
- [NetworkName("m_collisionMaxs")]
+ [NetworkVar("m_collisionMaxs")]
public Vector3 CollisionMaxs;
}
[NetworkName("CPhysBoxMultiplayer")]
-public class PhysBoxMultiplayer : C_PhysBox
+public partial class PhysBoxMultiplayer : C_PhysBox
{
- public static readonly RecvTable DT_PhysBoxMultiplayer = new(DT_PhysBox, [
- RecvPropInt(FIELD_PBM.OF(nameof(PhysicsMode)), PropFlags.Unsigned),
- RecvPropFloat(FIELD_PBM.OF(nameof(Mass)))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PhysBoxMultiplayer);
- [NetworkName("m_iPhysicsMode")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(PhysicsMode)) { Bits = 1, Flags = PropFlags.Unsigned },
+ new(nameof(Mass)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
+
+ [NetworkVar("m_iPhysicsMode")]
public int PhysicsMode;
- [NetworkName("m_fMass")]
+ [NetworkVar("m_fMass")]
public float Mass;
}
[NetworkName("CBasePropDoor")]
-public class C_BasePropDoor : C_DynamicProp
+public partial class C_BasePropDoor : C_DynamicProp
{
- [NetworkName("m_bLocked")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Locked),
+ new(nameof(DoorState)) { Bits = 3, Flags = PropFlags.Unsigned },
+ ];
+
+ [NetworkVar("m_bLocked")]
bool Locked;
- [NetworkName("m_eDoorState")]
+ [NetworkVar("m_eDoorState")]
int DoorState;
- public static readonly RecvTable DT_BasePropDoor = new(DT_DynamicProp, [
- RecvPropBool(FIELD_BPD.OF(nameof(Locked))),
- RecvPropInt(FIELD_BPD.OF(nameof(DoorState)))
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_BasePropDoor);
}
[NetworkName("CPropDoorRotating")]
-public class C_PropDoorRotating : C_BasePropDoor
+public partial class C_PropDoorRotating : C_BasePropDoor
{
- public static readonly RecvTable DT_PropDoorRotating = new(DT_BasePropDoor, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_PropDoorRotating);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_RagdollManager.cs b/Game.Client/C_RagdollManager.cs
index 1863562c..b20b7f50 100644
--- a/Game.Client/C_RagdollManager.cs
+++ b/Game.Client/C_RagdollManager.cs
@@ -3,16 +3,14 @@
namespace Game.Client;
-using FIELD = FIELD;
-
-[NetworkName("CRagdollManager")]
-public class C_RagdollManager : C_BaseEntity
+[NetworkName("CRagdollManager", NoBase = true)]
+public partial class C_RagdollManager : C_BaseEntity
{
- [NetworkName("m_iCurrentMaxRagdollCount")]
- public int CurrentMaxRagdollCount;
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(CurrentMaxRagdollCount)) { Bits = 6 },
+ ];
- public static readonly RecvTable DT_RagdollManager = new([
- RecvPropInt(FIELD.OF(nameof(CurrentMaxRagdollCount))),
- ]);
- public static new readonly ClientClass ClientClass = new ClientClass(DT_RagdollManager);
+ [NetworkVar("m_iCurrentMaxRagdollCount")]
+ public int CurrentMaxRagdollCount;
}
diff --git a/Game.Client/C_RagdollProp.cs b/Game.Client/C_RagdollProp.cs
index 3b6b1934..613bbee6 100644
--- a/Game.Client/C_RagdollProp.cs
+++ b/Game.Client/C_RagdollProp.cs
@@ -1,32 +1,31 @@
using Source.Common;
+using Source.Common.Mathematics;
using Source;
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CRagdollProp")]
-public class C_RagdollProp : C_BaseAnimating
+[NetworkName("CRagdollProp", Table = "DT_Ragdoll")]
+public partial class C_RagdollProp : C_BaseAnimating
{
const int RAGDOLL_MAX_ELEMENTS = 32;
- public static readonly RecvTable DT_Ragdoll = new(DT_BaseAnimating, [
- .. Enumerable.Range(0, RAGDOLL_MAX_ELEMENTS).Select(i => RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(RagPos), i))),
- .. Enumerable.Range(0, RAGDOLL_MAX_ELEMENTS).Select(i => RecvPropQAngles(FIELD.OF_ARRAYINDEX(nameof(RagAngles), i))),
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(RagPos)) { Encoding = NetEncoding.Elements, Count = RAGDOLL_MAX_ELEMENTS },
+ new(nameof(RagAngles)) { Encoding = NetEncoding.Elements, Count = RAGDOLL_MAX_ELEMENTS },
+ nameof(HUnragdoll),
+ nameof(BlendWeight),
+ nameof(OverlaySequence),
+ ];
- RecvPropEHandle(FIELD.OF(nameof(HUnragdoll))),
- RecvPropFloat(FIELD.OF(nameof(BlendWeight))),
- RecvPropInt(FIELD.OF(nameof(OverlaySequence))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Ragdoll);
-
- [NetworkName("m_ragPos[ {0} ]")]
+ [NetworkVar("m_ragPos[ {0} ]")]
public InlineArray32 RagPos;
- [NetworkName("m_ragAngles[ {0} ]")]
- public InlineArray32 RagAngles;
- [NetworkName("m_hUnragdoll")]
+ [NetworkVar("m_ragAngles[ {0} ]")]
+ public InlineArray32 RagAngles;
+ [NetworkVar("m_hUnragdoll")]
public EHANDLE HUnragdoll = new();
- [NetworkName("m_flBlendWeight")]
+ [NetworkVar("m_flBlendWeight")]
public float BlendWeight;
- [NetworkName("m_nOverlaySequence")]
+ [NetworkVar("m_nOverlaySequence")]
public int OverlaySequence;
public override bool IsRagdollProp() => true;
diff --git a/Game.Client/C_RagdollPropAttached.cs b/Game.Client/C_RagdollPropAttached.cs
index 498923f9..371d4c3c 100644
--- a/Game.Client/C_RagdollPropAttached.cs
+++ b/Game.Client/C_RagdollPropAttached.cs
@@ -4,25 +4,23 @@
namespace Game.Client;
-using FIELD = FIELD;
-
-[NetworkName("CRagdollPropAttached")]
-public class C_RagdollPropAttached : C_RagdollProp
+[NetworkName("CRagdollPropAttached", Table = "DT_Ragdoll_Attached")]
+public partial class C_RagdollPropAttached : C_RagdollProp
{
- [NetworkName("m_boneIndexAttached")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(BoneIndexAttached)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(RagdollAttachedObjectIndex)) { Bits = 6, Flags = PropFlags.Unsigned },
+ new(nameof(AttachmentPointBoneSpace)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(AttachmentPointRagdollSpace)) { Bits = 0, Flags = PropFlags.Coord },
+ ];
+
+ [NetworkVar("m_boneIndexAttached")]
public int BoneIndexAttached;
- [NetworkName("m_ragdollAttachedObjectIndex")]
+ [NetworkVar("m_ragdollAttachedObjectIndex")]
public int RagdollAttachedObjectIndex;
- [NetworkName("m_attachmentPointBoneSpace")]
+ [NetworkVar("m_attachmentPointBoneSpace")]
public Vector3 AttachmentPointBoneSpace;
- [NetworkName("m_attachmentPointRagdollSpace")]
+ [NetworkVar("m_attachmentPointRagdollSpace")]
public Vector3 AttachmentPointRagdollSpace;
-
- public static readonly RecvTable DT_Ragdoll_Attached = new(DT_Ragdoll, [
- RecvPropInt(FIELD.OF(nameof(BoneIndexAttached))),
- RecvPropInt(FIELD.OF(nameof(RagdollAttachedObjectIndex))),
- RecvPropVector(FIELD.OF(nameof(AttachmentPointBoneSpace))),
- RecvPropVector(FIELD.OF(nameof(AttachmentPointRagdollSpace))),
- ]);
- public static new readonly ClientClass ClientClass = new ClientClass(DT_Ragdoll_Attached);
}
diff --git a/Game.Client/C_RocketTrail.cs b/Game.Client/C_RocketTrail.cs
index d27bd49a..6694701a 100644
--- a/Game.Client/C_RocketTrail.cs
+++ b/Game.Client/C_RocketTrail.cs
@@ -3,57 +3,56 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("RocketTrail")]
-public class C_RocketTrail : C_BaseParticleEntity
+[NetworkName("RocketTrail", Table = "DT_RocketTrail")]
+public partial class C_RocketTrail : C_BaseParticleEntity
{
- public static readonly RecvTable DT_RocketTrail = new(DT_BaseParticleEntity, [
- RecvPropFloat(FIELD.OF(nameof(SpawnRate))),
- RecvPropVector(FIELD.OF(nameof(StartColor))),
- RecvPropVector(FIELD.OF(nameof(EndColor))),
- RecvPropFloat(FIELD.OF(nameof(ParticleLifetime))),
- RecvPropFloat(FIELD.OF(nameof(StopEmitTime))),
- RecvPropFloat(FIELD.OF(nameof(MinSpeed))),
- RecvPropFloat(FIELD.OF(nameof(MaxSpeed))),
- RecvPropFloat(FIELD.OF(nameof(StartSize))),
- RecvPropFloat(FIELD.OF(nameof(EndSize))),
- RecvPropFloat(FIELD.OF(nameof(SpawnRadius))),
- RecvPropBool(FIELD.OF(nameof(Emit))),
- RecvPropInt(FIELD.OF(nameof(Attachment))),
- RecvPropFloat(FIELD.OF(nameof(Opacity))),
- RecvPropBool(FIELD.OF(nameof(Damaged))),
- RecvPropFloat(FIELD.OF(nameof(FlareScale))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_RocketTrail);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SpawnRate)) { Bits = 8, Low = 1.0f, High = 1024.0f },
+ new(nameof(StartColor)) { Bits = 8, Low = 0.0f, High = 1.0f },
+ new(nameof(EndColor)) { Bits = 8, Low = 0.0f, High = 1.0f },
+ new(nameof(ParticleLifetime)) { Bits = 16, Flags = PropFlags.RoundUp, Low = 0.1f, High = 100.0f },
+ new(nameof(StopEmitTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MinSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaxSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(StartSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(EndSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SpawnRadius)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Emit),
+ new(nameof(Attachment)) { Bits = 12 },
+ new(nameof(Opacity)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Damaged),
+ new(nameof(FlareScale)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_SpawnRate")]
+ [NetworkVar("m_SpawnRate")]
public float SpawnRate;
- [NetworkName("m_StartColor")]
+ [NetworkVar("m_StartColor")]
public Vector3 StartColor;
- [NetworkName("m_EndColor")]
+ [NetworkVar("m_EndColor")]
public Vector3 EndColor;
- [NetworkName("m_ParticleLifetime")]
+ [NetworkVar("m_ParticleLifetime")]
public float ParticleLifetime;
- [NetworkName("m_StopEmitTime")]
+ [NetworkVar("m_StopEmitTime")]
public float StopEmitTime;
- [NetworkName("m_MinSpeed")]
+ [NetworkVar("m_MinSpeed")]
public float MinSpeed;
- [NetworkName("m_MaxSpeed")]
+ [NetworkVar("m_MaxSpeed")]
public float MaxSpeed;
- [NetworkName("m_StartSize")]
+ [NetworkVar("m_StartSize")]
public float StartSize;
- [NetworkName("m_EndSize")]
+ [NetworkVar("m_EndSize")]
public float EndSize;
- [NetworkName("m_SpawnRadius")]
+ [NetworkVar("m_SpawnRadius")]
public float SpawnRadius;
- [NetworkName("m_bEmit")]
+ [NetworkVar("m_bEmit")]
public bool Emit;
- [NetworkName("m_nAttachment")]
+ [NetworkVar("m_nAttachment")]
public int Attachment;
- [NetworkName("m_Opacity")]
+ [NetworkVar("m_Opacity")]
public float Opacity;
- [NetworkName("m_bDamaged")]
+ [NetworkVar("m_bDamaged")]
public bool Damaged;
- [NetworkName("m_flFlareScale")]
+ [NetworkVar("m_flFlareScale")]
public float FlareScale;
}
diff --git a/Game.Client/C_Rope.cs b/Game.Client/C_Rope.cs
index 3c37efe4..be89ffd4 100644
--- a/Game.Client/C_Rope.cs
+++ b/Game.Client/C_Rope.cs
@@ -8,79 +8,78 @@
using Source.Common.MaterialSystem;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CRopeKeyframe")]
-public class C_RopeKeyframe : C_BaseEntity
+[NetworkName("CRopeKeyframe", NoBase = true)]
+public partial class C_RopeKeyframe : C_BaseEntity
{
- public static readonly RecvTable DT_RopeKeyframe = new([
- RecvPropEHandle(FIELD.OF(nameof(StartPoint))),
- RecvPropEHandle(FIELD.OF(nameof(EndPoint))),
- RecvPropInt(FIELD.OF(nameof(StartAttachment))),
- RecvPropInt(FIELD.OF(nameof(EndAttachment))),
- RecvPropInt(FIELD.OF(nameof(StartBone))),
- RecvPropInt(FIELD.OF(nameof(EndBone))),
- RecvPropVector(FIELD.OF(nameof(StartOffset))),
- RecvPropVector(FIELD.OF(nameof(EndOffset))),
- RecvPropInt(FIELD.OF(nameof(RenderColor))),
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(RopeMaterialModelIndex),
+ nameof(StartPoint),
+ nameof(EndPoint),
+ nameof(StartAttachment),
+ nameof(EndAttachment),
+ nameof(StartBone),
+ nameof(EndBone),
+ nameof(StartOffset),
+ nameof(EndOffset),
+ new(nameof(RenderColor)) { Encoding = NetEncoding.Int },
+ nameof(LockedPoints),
// todo: RecvProxy_RecomputeSprings
- RecvPropInt(FIELD.OF(nameof(Slack))),
+ nameof(Slack),
// todo: RecvProxy_RecomputeSprings
- RecvPropInt(FIELD.OF(nameof(RopeLength))),
- RecvPropInt(FIELD.OF(nameof(LockedPoints))),
- RecvPropInt(FIELD.OF(nameof(RopeFlags))),
- RecvPropInt(FIELD.OF(nameof(Segments))),
- RecvPropBool(FIELD.OF(nameof(ConstrainBetweenEndpoints))),
- RecvPropInt(FIELD.OF(nameof(RopeMaterialModelIndex))),
- RecvPropInt(FIELD.OF(nameof(Subdiv))),
- RecvPropFloat(FIELD.OF(nameof(TextureScale))),
- RecvPropFloat(FIELD.OF(nameof(Width))),
- RecvPropFloat(FIELD.OF(nameof(ScrollSpeed))),
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropEHandle(FIELD.OF(nameof(MoveParent))),
- RecvPropInt(FIELD.OF(nameof(ParentAttachment))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_RopeKeyframe);
+ nameof(RopeLength),
+ nameof(RopeFlags),
+ nameof(TextureScale),
+ nameof(Segments),
+ nameof(ConstrainBetweenEndpoints),
+ nameof(Subdiv),
+ nameof(Width),
+ nameof(ScrollSpeed),
+ nameof(Origin),
+ new(nameof(NetworkMoveParent)) { Encoding = NetEncoding.Int, Proxy = typeof(MoveParentProxy) },
+ nameof(ParentAttachment),
+ ];
- [NetworkName("m_hStartPoint")]
+ [NetworkVar("m_hStartPoint")]
public EHANDLE StartPoint = new();
- [NetworkName("m_hEndPoint")]
+ [NetworkVar("m_hEndPoint")]
public EHANDLE EndPoint = new();
- [NetworkName("m_iStartAttachment")]
+ [NetworkVar("m_iStartAttachment")]
public int StartAttachment;
- [NetworkName("m_iEndAttachment")]
+ [NetworkVar("m_iEndAttachment")]
public int EndAttachment;
- [NetworkName("m_iStartBone")]
+ [NetworkVar("m_iStartBone")]
public int StartBone;
- [NetworkName("m_iEndBone")]
+ [NetworkVar("m_iEndBone")]
public int EndBone;
- [NetworkName("m_vecStartOffset")]
+ [NetworkVar("m_vecStartOffset")]
public Vector3 StartOffset;
- [NetworkName("m_vecEndOffset")]
+ [NetworkVar("m_vecEndOffset")]
public Vector3 EndOffset;
- [NetworkName("m_clrRender")]
+ [NetworkVar("m_clrRender")]
public Color RenderColor;
- [NetworkName("m_Slack")]
+ [NetworkVar("m_Slack")]
public int Slack;
- [NetworkName("m_RopeLength")]
+ [NetworkVar("m_RopeLength")]
public int RopeLength;
- [NetworkName("m_fLockedPoints")]
+ [NetworkVar("m_fLockedPoints")]
public int LockedPoints;
- [NetworkName("m_RopeFlags")]
+ [NetworkVar("m_RopeFlags")]
public int RopeFlags;
- [NetworkName("m_nSegments")]
+ [NetworkVar("m_nSegments")]
public int Segments;
- [NetworkName("m_bConstrainBetweenEndpoints")]
+ [NetworkVar("m_bConstrainBetweenEndpoints")]
public bool ConstrainBetweenEndpoints;
- [NetworkName("m_iRopeMaterialModelIndex")]
+ [NetworkVar("m_iRopeMaterialModelIndex")]
public int RopeMaterialModelIndex;
- [NetworkName("m_Subdiv")]
+ [NetworkVar("m_Subdiv")]
public int Subdiv;
- [NetworkName("m_TextureScale")]
+ [NetworkVar("m_TextureScale")]
public float TextureScale;
- [NetworkName("m_Width")]
+ [NetworkVar("m_Width")]
public float Width;
- [NetworkName("m_flScrollSpeed")]
+ [NetworkVar("m_flScrollSpeed")]
public float ScrollSpeed;
}
diff --git a/Game.Client/C_RotorWashEmitter.cs b/Game.Client/C_RotorWashEmitter.cs
index 9d5ef56f..4ee6bae1 100644
--- a/Game.Client/C_RotorWashEmitter.cs
+++ b/Game.Client/C_RotorWashEmitter.cs
@@ -3,15 +3,14 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CRotorWashEmitter")]
-public class C_RotorWashEmitter : C_BaseEntity
+public partial class C_RotorWashEmitter : C_BaseEntity
{
- public static readonly RecvTable DT_RotorWashEmitter = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(Altitude))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_RotorWashEmitter);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Altitude)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_flAltitude")]
+ [NetworkVar("m_flAltitude")]
public float Altitude;
}
diff --git a/Game.Client/C_RpgRocket.cs b/Game.Client/C_RpgRocket.cs
index 28efc603..20bbcdee 100644
--- a/Game.Client/C_RpgRocket.cs
+++ b/Game.Client/C_RpgRocket.cs
@@ -4,10 +4,11 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CRpgRocket")]
-public class C_RpgRocket : C_BaseGrenade
+public partial class C_RpgRocket : C_BaseGrenade
{
- public static readonly RecvTable DT_RpgRocket = new(DT_BaseGrenade, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_RpgRocket);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
diff --git a/Game.Client/C_SceneEntity.cs b/Game.Client/C_SceneEntity.cs
index 978e2b57..045c373c 100644
--- a/Game.Client/C_SceneEntity.cs
+++ b/Game.Client/C_SceneEntity.cs
@@ -6,7 +6,6 @@
namespace Game.Client;
-using FIELD = FIELD;
using EventType = Game.Shared.ChoreoEvent.EventType;
public class ChoreoStringPool : IChoreoStringPool
@@ -28,45 +27,51 @@ public bool GetString(short stringId, Span buff) {
}
[NetworkName("CSceneEntity")]
-public class C_SceneEntity : C_BaseEntity, IChoreoEventCallback
+public partial class C_SceneEntity : C_BaseEntity, IChoreoEventCallback
{
public const int MAX_ACTORS_IN_SCENE = 16;
static readonly ChoreoStringPool g_ChoreoStringPool = new();
- [NetworkName("m_nSceneStringIndex")]
+ [NetworkVar("m_nSceneStringIndex")]
public int SceneStringIndex;
- [NetworkName("m_bIsPlayingBack")]
+ [NetworkVar("m_bIsPlayingBack")]
public bool IsPlayingBack;
- [NetworkName("m_bPaused")]
+ [NetworkVar("m_bPaused")]
public bool Paused;
- [NetworkName("m_bMultiplayer")]
+ [NetworkVar("m_bMultiplayer")]
public bool Multiplayer;
- [NetworkName("m_flForceClientTime")]
+ [NetworkVar("m_flForceClientTime")]
public float ForceClientTime;
- [NetworkName("m_hActorList")]
+ [NetworkVar("m_hActorList")]
readonly List ActorList = [];
- public static readonly RecvTable DT_SceneEntity = new([
- RecvPropInt(FIELD.OF(nameof(SceneStringIndex))),
- RecvPropBool(FIELD.OF(nameof(IsPlayingBack))),
- RecvPropBool(FIELD.OF(nameof(Paused))),
- RecvPropBool(FIELD.OF(nameof(Multiplayer))),
- RecvPropFloat(FIELD.OF(nameof(ForceClientTime)), 0, RecvProxy_ForcedClientTime),
- RecvPropList(FIELD.OF_LIST(nameof(ActorList), MAX_ACTORS_IN_SCENE), ResizeActorList, RecvPropEHandle()),
- ]);
- public static new readonly ClientClass ClientClass = new ClientClass(DT_SceneEntity);
-
- static void ResizeActorList(object instance, object list, int len) {
- var vec = (List)list;
- while (vec.Count < len) vec.Add(new());
- while (vec.Count > len) vec.RemoveAt(vec.Count - 1);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(SceneStringIndex),
+ nameof(IsPlayingBack),
+ nameof(Paused),
+ nameof(Multiplayer),
+ new(nameof(ForceClientTime)) { Proxy = typeof(ForceClientTimeProxy) },
+ new(nameof(ActorList)) { Encoding = NetEncoding.List, Count = MAX_ACTORS_IN_SCENE, Proxy = typeof(ActorListProxy) },
+ ];
+
+ public static class ActorListProxy
+ {
+ public static void Resize(object instance, object list, int len) {
+ var vec = (List)list;
+ while (vec.Count < len) vec.Add(new());
+ while (vec.Count > len) vec.RemoveAt(vec.Count - 1);
+ }
}
- static void RecvProxy_ForcedClientTime(ref readonly RecvProxyData data, object instance, IFieldAccessor field) {
- C_SceneEntity scene = (C_SceneEntity)instance;
- field.SetValue(instance, data.Value.Float);
- scene.OnResetClientTime();
+ public static class ForceClientTimeProxy
+ {
+ public static void Recv(ref readonly RecvProxyData data, object instance, IFieldAccessor field) {
+ C_SceneEntity scene = (C_SceneEntity)instance;
+ field.SetValue(instance, data.Value.Float);
+ scene.OnResetClientTime();
+ }
}
struct QueuedEvents
diff --git a/Game.Client/C_ScriptIntro.cs b/Game.Client/C_ScriptIntro.cs
index e98e2932..ed2bf0e0 100644
--- a/Game.Client/C_ScriptIntro.cs
+++ b/Game.Client/C_ScriptIntro.cs
@@ -7,68 +7,65 @@
namespace Game.Client;
-using FIELD = FIELD;
-
[NetworkName("CScriptIntro")]
-public class C_ScriptIntro : C_BaseEntity
+public partial class C_ScriptIntro : C_BaseEntity
{
- [NetworkName("m_vecCameraView")]
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(CameraView)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(CameraViewAngles)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(BlendMode)) { Bits = 5 },
+ new(nameof(NextBlendMode)) { Bits = 5 },
+ new(nameof(NextBlendTime)) { Encoding = NetEncoding.Time64 },
+ new(nameof(BlendStartTime)) { Encoding = NetEncoding.Time64 },
+ nameof(Active),
+ new(nameof(FOV)) { Bits = 9 },
+ new(nameof(NextFOV)) { Bits = 9 },
+ new(nameof(StartFOV)) { Bits = 9 },
+ new(nameof(NextFOVBlendTime)) { Encoding = NetEncoding.Time64 },
+ new(nameof(FOVBlendStartTime)) { Encoding = NetEncoding.Time64 },
+ nameof(AlternateFOV),
+ new(nameof(FadeAlpha)) { Bits = 10 },
+ new(nameof(FadeColor)) { Encoding = NetEncoding.Array2, Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(FadeDuration)) { Bits = 10, Flags = PropFlags.RoundDown, Low = 0.0f, High = 255.0f },
+ nameof(CameraEntity),
+ ];
+
+ [NetworkVar("m_vecCameraView")]
public Vector3 CameraView;
- [NetworkName("m_vecCameraViewAngles")]
+ [NetworkVar("m_vecCameraViewAngles")]
public Vector3 CameraViewAngles;
- [NetworkName("m_iBlendMode")]
+ [NetworkVar("m_iBlendMode")]
public int BlendMode;
- [NetworkName("m_iNextBlendMode")]
+ [NetworkVar("m_iNextBlendMode")]
public int NextBlendMode;
- [NetworkName("m_flNextBlendTime")]
+ [NetworkVar("m_flNextBlendTime")]
public TimeUnit_t NextBlendTime;
- [NetworkName("m_flBlendStartTime")]
+ [NetworkVar("m_flBlendStartTime")]
public TimeUnit_t BlendStartTime;
- [NetworkName("m_bActive")]
+ [NetworkVar("m_bActive")]
public bool Active;
- [NetworkName("m_iFOV")]
+ [NetworkVar("m_iFOV")]
public int FOV;
- [NetworkName("m_iNextFOV")]
+ [NetworkVar("m_iNextFOV")]
public int NextFOV;
- [NetworkName("m_iStartFOV")]
+ [NetworkVar("m_iStartFOV")]
public int StartFOV;
- [NetworkName("m_flNextFOVBlendTime")]
+ [NetworkVar("m_flNextFOVBlendTime")]
public TimeUnit_t NextFOVBlendTime;
- [NetworkName("m_flFOVBlendStartTime")]
+ [NetworkVar("m_flFOVBlendStartTime")]
public TimeUnit_t FOVBlendStartTime;
- [NetworkName("m_bAlternateFOV")]
+ [NetworkVar("m_bAlternateFOV")]
public bool AlternateFOV;
- [NetworkName("m_flFadeAlpha")]
+ [NetworkVar("m_flFadeAlpha")]
public float FadeAlpha;
- [NetworkName("m_flFadeColor")]
+ [NetworkVar("m_flFadeColor")]
public InlineArray3 FadeColor;
- [NetworkName("m_flFadeDuration")]
+ [NetworkVar("m_flFadeDuration")]
public float FadeDuration;
- [NetworkName("m_hCameraEntity")]
+ [NetworkVar("m_hCameraEntity")]
public EHANDLE CameraEntity = new();
- public static readonly RecvTable DT_ScriptIntro = new(DT_BaseEntity, [
- RecvPropVector(FIELD.OF(nameof(CameraView))),
- RecvPropVector(FIELD.OF(nameof(CameraViewAngles))),
- RecvPropInt(FIELD.OF(nameof(BlendMode))),
- RecvPropInt(FIELD.OF(nameof(NextBlendMode))),
- RecvPropTime64(FIELD.OF(nameof(NextBlendTime))),
- RecvPropTime64(FIELD.OF(nameof(BlendStartTime))),
- RecvPropBool(FIELD.OF(nameof(Active))),
- RecvPropInt(FIELD.OF(nameof(FOV))),
- RecvPropInt(FIELD.OF(nameof(NextFOV))),
- RecvPropInt(FIELD.OF(nameof(StartFOV))),
- RecvPropTime64(FIELD.OF(nameof(NextFOVBlendTime))),
- RecvPropTime64(FIELD.OF(nameof(FOVBlendStartTime))),
- RecvPropBool(FIELD.OF(nameof(AlternateFOV))),
- RecvPropFloat(FIELD.OF(nameof(FadeAlpha))),
- RecvPropFloat(FIELD.OF_ARRAYINDEX(nameof(FadeColor), 0)),
- RecvPropArray(FIELD.OF_ARRAY(nameof(FadeColor))),
- RecvPropFloat(FIELD.OF(nameof(FadeDuration))),
- RecvPropEHandle(FIELD.OF(nameof(CameraEntity))),
- ]);
- public static new readonly ClientClass ClientClass = new ClientClass(DT_ScriptIntro);
-
int PrevFOV;
readonly IntroData IntroData = new();
diff --git a/Game.Client/C_ShadowControl.cs b/Game.Client/C_ShadowControl.cs
index 080b087e..673cb798 100644
--- a/Game.Client/C_ShadowControl.cs
+++ b/Game.Client/C_ShadowControl.cs
@@ -7,28 +7,27 @@
using System.Numerics;
namespace Game.Server;
-using FIELD = Source.FIELD;
[NetworkName("CShadowControl")]
-public class C_ShadowControl : C_BaseEntity
+public partial class C_ShadowControl : C_BaseEntity
{
- public static readonly RecvTable DT_ShadowControl = new([
- RecvPropVector(FIELD.OF(nameof(ShadowDirection))),
- RecvPropInt(FIELD.OF(nameof(ShadowColor))),
- RecvPropFloat(FIELD.OF(nameof(ShadowMaxDist))),
- RecvPropBool(FIELD.OF(nameof(DisableShadows))),
- RecvPropBool(FIELD.OF(nameof(EnableLocalLightShadows))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_ShadowControl);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(ShadowDirection)) { Bits = -1, Flags = PropFlags.NoScale },
+ new(nameof(ShadowColor)) { Encoding = NetEncoding.Int, Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(ShadowMaxDist)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(DisableShadows),
+ nameof(EnableLocalLightShadows),
+ ];
- [NetworkName("m_shadowDirection")]
+ [NetworkVar("m_shadowDirection")]
public Vector3 ShadowDirection;
- [NetworkName("m_shadowColor")]
+ [NetworkVar("m_shadowColor")]
public Color ShadowColor;
- [NetworkName("m_flShadowMaxDist")]
+ [NetworkVar("m_flShadowMaxDist")]
public float ShadowMaxDist;
- [NetworkName("m_bDisableShadows")]
+ [NetworkVar("m_bDisableShadows")]
public bool DisableShadows;
- [NetworkName("m_bEnableLocalLightShadows")]
+ [NetworkVar("m_bEnableLocalLightShadows")]
public bool EnableLocalLightShadows;
}
diff --git a/Game.Client/C_SlideshowDisplay.cs b/Game.Client/C_SlideshowDisplay.cs
index b2b22127..34a194ff 100644
--- a/Game.Client/C_SlideshowDisplay.cs
+++ b/Game.Client/C_SlideshowDisplay.cs
@@ -3,36 +3,35 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CSlideshowDisplay")]
-public class C_SlideshowDisplay : C_BaseEntity
+public partial class C_SlideshowDisplay : C_BaseEntity
{
- public static readonly RecvTable DT_SlideshowDisplay = new(DT_BaseEntity, [
- RecvPropBool(FIELD.OF(nameof(Enabled))),
- RecvPropString(FIELD.OF(nameof(DisplayText))),
- RecvPropString(FIELD.OF(nameof(SlideshowDirectory))),
- RecvPropArray3(FIELD.OF_ARRAY(nameof(ChCurrentSlideLists)), RecvPropInt(FIELD.OF_ARRAYINDEX(nameof(ChCurrentSlideLists), 0))),
- RecvPropFloat(FIELD.OF(nameof(MinSlideTime))),
- RecvPropFloat(FIELD.OF(nameof(MaxSlideTime))),
- RecvPropInt(FIELD.OF(nameof(CycleType))),
- RecvPropBool(FIELD.OF(nameof(NoListRepeats))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_SlideshowDisplay);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(Enabled),
+ new(nameof(DisplayText)) { Encoding = NetEncoding.String },
+ new(nameof(SlideshowDirectory)) { Encoding = NetEncoding.String },
+ new(nameof(ChCurrentSlideLists)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(MinSlideTime)) { Bits = 11, Low = 0.0f, High = 20.0f },
+ new(nameof(MaxSlideTime)) { Bits = 11, Low = 0.0f, High = 20.0f },
+ new(nameof(CycleType)) { Bits = 2, Flags = PropFlags.Unsigned },
+ nameof(NoListRepeats),
+ ];
- [NetworkName("m_bEnabled")]
+ [NetworkVar("m_bEnabled")]
public bool Enabled;
- [NetworkName("m_szDisplayText")]
+ [NetworkVar("m_szDisplayText")]
public InlineArray128 DisplayText;
- [NetworkName("m_szSlideshowDirectory")]
+ [NetworkVar("m_szSlideshowDirectory")]
public InlineArray128 SlideshowDirectory;
- [NetworkName("m_chCurrentSlideLists")]
+ [NetworkVar("m_chCurrentSlideLists")]
public InlineArray16 ChCurrentSlideLists;
- [NetworkName("m_fMinSlideTime")]
+ [NetworkVar("m_fMinSlideTime")]
public float MinSlideTime;
- [NetworkName("m_fMaxSlideTime")]
+ [NetworkVar("m_fMaxSlideTime")]
public float MaxSlideTime;
- [NetworkName("m_iCycleType")]
+ [NetworkVar("m_iCycleType")]
public int CycleType;
- [NetworkName("m_bNoListRepeats")]
+ [NetworkVar("m_bNoListRepeats")]
public bool NoListRepeats;
}
diff --git a/Game.Client/C_SmokeStack.cs b/Game.Client/C_SmokeStack.cs
index 7676ea2c..2ebb1161 100644
--- a/Game.Client/C_SmokeStack.cs
+++ b/Game.Client/C_SmokeStack.cs
@@ -3,58 +3,57 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CSmokeStack")]
-public class C_SmokeStack : C_BaseParticleEntity
+public partial class C_SmokeStack : C_BaseParticleEntity
{
- public static readonly RecvTable DT_SmokeStack = new(DT_BaseParticleEntity, [
- RecvPropFloat(FIELD.OF(nameof(SpreadSpeed))),
- RecvPropFloat(FIELD.OF(nameof(Speed))),
- RecvPropFloat(FIELD.OF(nameof(StartSize))),
- RecvPropFloat(FIELD.OF(nameof(EndSize))),
- RecvPropFloat(FIELD.OF(nameof(Rate))),
- RecvPropFloat(FIELD.OF(nameof(JetLength))),
- RecvPropBool(FIELD.OF(nameof(Emit))),
- RecvPropFloat(FIELD.OF(nameof(BaseSpread))),
- RecvPropFloat(FIELD.OF(nameof(RollSpeed))),
- RecvPropVector(FIELD.OF("DirLight.Pos")),
- RecvPropVector(FIELD.OF("DirLight.Color")),
- RecvPropFloat(FIELD.OF("DirLight.Intensity")),
- RecvPropVector(FIELD.OF("AmbientLight.Pos")),
- RecvPropVector(FIELD.OF("AmbientLight.Color")),
- RecvPropFloat(FIELD.OF("AmbientLight.Intensity")),
- RecvPropVector(FIELD.OF(nameof(Wind))),
- RecvPropFloat(FIELD.OF(nameof(Twist))),
- RecvPropIntWithMinusOneFlag(FIELD.OF(nameof(MaterialModel))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_SmokeStack);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SpreadSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Speed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(StartSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(EndSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Rate)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(JetLength)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Emit),
+ new(nameof(BaseSpread)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Twist)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(RollSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaterialModel)) { Bits = 16, Encoding = NetEncoding.IntWithMinusOneFlag },
+ new(nameof(AmbientLight.Pos)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(AmbientLight.Color)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(AmbientLight.Intensity)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(DirLight.Pos)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(DirLight.Color)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(DirLight.Intensity)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Wind)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_SpreadSpeed")]
+ [NetworkVar("m_SpreadSpeed")]
public float SpreadSpeed;
- [NetworkName("m_Speed")]
+ [NetworkVar("m_Speed")]
public new float Speed;
- [NetworkName("m_StartSize")]
+ [NetworkVar("m_StartSize")]
public float StartSize;
- [NetworkName("m_EndSize")]
+ [NetworkVar("m_EndSize")]
public float EndSize;
- [NetworkName("m_Rate")]
+ [NetworkVar("m_Rate")]
public float Rate;
- [NetworkName("m_JetLength")]
+ [NetworkVar("m_JetLength")]
public float JetLength;
- [NetworkName("m_bEmit")]
+ [NetworkVar("m_bEmit")]
public bool Emit;
- [NetworkName("m_flBaseSpread")]
+ [NetworkVar("m_flBaseSpread")]
public float BaseSpread;
- [NetworkName("m_flRollSpeed")]
+ [NetworkVar("m_flRollSpeed")]
public float RollSpeed;
- [NetworkName("m_AmbientLight")]
+ [NetworkVar("m_AmbientLight")]
public ParticleLightInfo AmbientLight;
- [NetworkName("m_DirLight")]
+ [NetworkVar("m_DirLight")]
public ParticleLightInfo DirLight;
- [NetworkName("m_vWind")]
+ [NetworkVar("m_vWind")]
public Vector3 Wind;
- [NetworkName("m_flTwist")]
+ [NetworkVar("m_flTwist")]
public float Twist;
- [NetworkName("m_iMaterialModel")]
+ [NetworkVar("m_iMaterialModel")]
public int MaterialModel;
}
diff --git a/Game.Client/C_SmokeTrail.cs b/Game.Client/C_SmokeTrail.cs
index 02f03964..8f0c50f6 100644
--- a/Game.Client/C_SmokeTrail.cs
+++ b/Game.Client/C_SmokeTrail.cs
@@ -3,57 +3,56 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("SmokeTrail")]
-public class C_SmokeTrail : C_BaseParticleEntity
+[NetworkName("SmokeTrail", Table = "DT_SmokeTrail")]
+public partial class C_SmokeTrail : C_BaseParticleEntity
{
- public static readonly RecvTable DT_SmokeTrail = new(DT_BaseParticleEntity, [
- RecvPropFloat(FIELD.OF(nameof(SpawnRate))),
- RecvPropVector(FIELD.OF(nameof(StartColor))),
- RecvPropVector(FIELD.OF(nameof(EndColor))),
- RecvPropFloat(FIELD.OF(nameof(ParticleLifetime))),
- RecvPropFloat(FIELD.OF(nameof(StopEmitTime))),
- RecvPropFloat(FIELD.OF(nameof(MinSpeed))),
- RecvPropFloat(FIELD.OF(nameof(MaxSpeed))),
- RecvPropFloat(FIELD.OF(nameof(MinDirectedSpeed))),
- RecvPropFloat(FIELD.OF(nameof(MaxDirectedSpeed))),
- RecvPropFloat(FIELD.OF(nameof(StartSize))),
- RecvPropFloat(FIELD.OF(nameof(EndSize))),
- RecvPropFloat(FIELD.OF(nameof(SpawnRadius))),
- RecvPropBool(FIELD.OF(nameof(Emit))),
- RecvPropInt(FIELD.OF(nameof(Attachment))),
- RecvPropFloat(FIELD.OF(nameof(Opacity))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_SmokeTrail);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SpawnRate)) { Bits = 8, Low = 1.0f, High = 1024.0f },
+ new(nameof(StartColor)) { Bits = 8, Low = 0.0f, High = 1.0f },
+ new(nameof(EndColor)) { Bits = 8, Low = 0.0f, High = 1.0f },
+ new(nameof(ParticleLifetime)) { Bits = 16, Flags = PropFlags.RoundUp, Low = 0.1f, High = 100.0f },
+ new(nameof(StopEmitTime)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MinSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaxSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MinDirectedSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaxDirectedSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(StartSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(EndSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SpawnRadius)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Emit),
+ new(nameof(Attachment)) { Bits = 12 },
+ new(nameof(Opacity)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_SpawnRate")]
+ [NetworkVar("m_SpawnRate")]
public float SpawnRate;
- [NetworkName("m_StartColor")]
+ [NetworkVar("m_StartColor")]
public Vector3 StartColor;
- [NetworkName("m_EndColor")]
+ [NetworkVar("m_EndColor")]
public Vector3 EndColor;
- [NetworkName("m_ParticleLifetime")]
+ [NetworkVar("m_ParticleLifetime")]
public float ParticleLifetime;
- [NetworkName("m_StopEmitTime")]
+ [NetworkVar("m_StopEmitTime")]
public float StopEmitTime;
- [NetworkName("m_MinSpeed")]
+ [NetworkVar("m_MinSpeed")]
public float MinSpeed;
- [NetworkName("m_MaxSpeed")]
+ [NetworkVar("m_MaxSpeed")]
public float MaxSpeed;
- [NetworkName("m_MinDirectedSpeed")]
+ [NetworkVar("m_MinDirectedSpeed")]
public float MinDirectedSpeed;
- [NetworkName("m_MaxDirectedSpeed")]
+ [NetworkVar("m_MaxDirectedSpeed")]
public float MaxDirectedSpeed;
- [NetworkName("m_StartSize")]
+ [NetworkVar("m_StartSize")]
public float StartSize;
- [NetworkName("m_EndSize")]
+ [NetworkVar("m_EndSize")]
public float EndSize;
- [NetworkName("m_SpawnRadius")]
+ [NetworkVar("m_SpawnRadius")]
public float SpawnRadius;
- [NetworkName("m_bEmit")]
+ [NetworkVar("m_bEmit")]
public bool Emit;
- [NetworkName("m_nAttachment")]
+ [NetworkVar("m_nAttachment")]
public int Attachment;
- [NetworkName("m_Opacity")]
+ [NetworkVar("m_Opacity")]
public float Opacity;
}
diff --git a/Game.Client/C_SpatialEntity.cs b/Game.Client/C_SpatialEntity.cs
index 61311045..021fb4c4 100644
--- a/Game.Client/C_SpatialEntity.cs
+++ b/Game.Client/C_SpatialEntity.cs
@@ -4,26 +4,24 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-
[NetworkName("CSpatialEntity")]
-public class C_SpatialEntity : C_BaseEntity
+public partial class C_SpatialEntity : C_BaseEntity
{
- public static readonly RecvTable DT_SpatialEntity = new([
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropFloat(FIELD.OF(nameof(MinFalloff))),
- RecvPropFloat(FIELD.OF(nameof(MaxFalloff))),
- RecvPropFloat(FIELD.OF(nameof(CurWeight))),
- RecvPropBool(FIELD.OF(nameof(Enabled))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_SpatialEntity);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Origin)) { Encoding = NetEncoding.Vector, Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MinFalloff)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(MaxFalloff)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(CurWeight)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Enabled),
+ ];
- [NetworkName("m_MinFalloff")]
+ [NetworkVar("m_minFalloff")]
public float MinFalloff;
- [NetworkName("m_MaxFalloff")]
+ [NetworkVar("m_maxFalloff")]
public float MaxFalloff;
- [NetworkName("m_flCurWeight")]
+ [NetworkVar("m_flCurWeight")]
public float CurWeight;
- [NetworkName("m_bEnabled")]
+ [NetworkVar("m_bEnabled")]
public bool Enabled;
}
diff --git a/Game.Client/C_SporeExplosion.cs b/Game.Client/C_SporeExplosion.cs
index e3a7c83d..5350fd36 100644
--- a/Game.Client/C_SporeExplosion.cs
+++ b/Game.Client/C_SporeExplosion.cs
@@ -3,33 +3,32 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("SporeExplosion")]
-public class C_SporeExplosion : C_BaseParticleEntity
+[NetworkName("SporeExplosion", Table = "DT_SporeExplosion")]
+public partial class C_SporeExplosion : C_BaseParticleEntity
{
- public static readonly RecvTable DT_SporeExplosion = new(DT_BaseParticleEntity, [
- RecvPropFloat(FIELD.OF(nameof(SpawnRate))),
- RecvPropFloat(FIELD.OF(nameof(ParticleLifetime))),
- RecvPropFloat(FIELD.OF(nameof(StartSize))),
- RecvPropFloat(FIELD.OF(nameof(EndSize))),
- RecvPropFloat(FIELD.OF(nameof(SpawnRadius))),
- RecvPropBool(FIELD.OF(nameof(Emit))),
- RecvPropBool(FIELD.OF(nameof(DontRemove))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_SporeExplosion);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SpawnRate)) { Bits = 8, Low = 1.0f, High = 1024.0f },
+ new(nameof(ParticleLifetime)) { Bits = 16, Flags = PropFlags.RoundUp, Low = 0.1f, High = 100.0f },
+ new(nameof(StartSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(EndSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(SpawnRadius)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Emit),
+ nameof(DontRemove),
+ ];
- [NetworkName("m_flSpawnRate")]
+ [NetworkVar("m_flSpawnRate")]
public float SpawnRate;
- [NetworkName("m_flParticleLifetime")]
+ [NetworkVar("m_flParticleLifetime")]
public float ParticleLifetime;
- [NetworkName("m_flStartSize")]
+ [NetworkVar("m_flStartSize")]
public float StartSize;
- [NetworkName("m_flEndSize")]
+ [NetworkVar("m_flEndSize")]
public float EndSize;
- [NetworkName("m_flSpawnRadius")]
+ [NetworkVar("m_flSpawnRadius")]
public float SpawnRadius;
- [NetworkName("m_bEmit")]
+ [NetworkVar("m_bEmit")]
public bool Emit;
- [NetworkName("m_bDontRemove")]
+ [NetworkVar("m_bDontRemove")]
public bool DontRemove;
}
diff --git a/Game.Client/C_SporeTrail.cs b/Game.Client/C_SporeTrail.cs
index 88f72fc5..9c5657bb 100644
--- a/Game.Client/C_SporeTrail.cs
+++ b/Game.Client/C_SporeTrail.cs
@@ -3,33 +3,32 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("SporeTrail")]
-public class C_SporeTrail : C_BaseParticleEntity
+[NetworkName("SporeTrail", Table = "DT_SporeTrail")]
+public partial class C_SporeTrail : C_BaseParticleEntity
{
- public static readonly RecvTable DT_SporeTrail = new(DT_BaseParticleEntity, [
- RecvPropFloat(FIELD.OF(nameof(SpawnRate))),
- RecvPropVector(FIELD.OF(nameof(EndColor))),
- RecvPropFloat(FIELD.OF(nameof(ParticleLifetime))),
- RecvPropFloat(FIELD.OF(nameof(StartSize))),
- RecvPropFloat(FIELD.OF(nameof(EndSize))),
- RecvPropFloat(FIELD.OF(nameof(SpawnRadius))),
- RecvPropInt(FIELD.OF(nameof(Emit))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_SporeTrail);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SpawnRate)) { Bits = 8, Low = 1.0f, High = 1024.0f },
+ new(nameof(EndColor)) { Bits = 8, Low = 0.0f, High = 1.0f },
+ new(nameof(ParticleLifetime)) { Bits = 16, Flags = PropFlags.RoundUp, Low = 0.1f, High = 100.0f },
+ new(nameof(StartSize)) { Bits = -1, Flags = PropFlags.NoScale },
+ new(nameof(EndSize)) { Bits = -1, Flags = PropFlags.NoScale },
+ new(nameof(SpawnRadius)) { Bits = -1, Flags = PropFlags.NoScale },
+ nameof(Emit),
+ ];
- [NetworkName("m_flSpawnRate")]
+ [NetworkVar("m_flSpawnRate")]
public float SpawnRate;
- [NetworkName("m_vecEndColor")]
+ [NetworkVar("m_vecEndColor")]
public Vector3 EndColor;
- [NetworkName("m_flParticleLifetime")]
+ [NetworkVar("m_flParticleLifetime")]
public float ParticleLifetime;
- [NetworkName("m_flStartSize")]
+ [NetworkVar("m_flStartSize")]
public float StartSize;
- [NetworkName("m_flEndSize")]
+ [NetworkVar("m_flEndSize")]
public float EndSize;
- [NetworkName("m_flSpawnRadius")]
+ [NetworkVar("m_flSpawnRadius")]
public float SpawnRadius;
- [NetworkName("m_bEmit")]
+ [NetworkVar("m_bEmit")]
public bool Emit;
}
diff --git a/Game.Client/C_SpotlightEnd.cs b/Game.Client/C_SpotlightEnd.cs
index c4234d1e..8021238b 100644
--- a/Game.Client/C_SpotlightEnd.cs
+++ b/Game.Client/C_SpotlightEnd.cs
@@ -4,20 +4,19 @@
using Source.Common;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CSpotlightEnd")]
-public class C_SpotlightEnd : C_BaseEntity
+public partial class C_SpotlightEnd : C_BaseEntity
{
- public static readonly RecvTable DT_SpotlightEnd = new(DT_BaseEntity, [
- RecvPropFloat(FIELD.OF(nameof(LightScale))),
- RecvPropFloat(FIELD.OF(nameof(Radius))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_SpotlightEnd);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(LightScale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Radius)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_flLightScale")]
+ [NetworkVar("m_flLightScale")]
public float LightScale;
- [NetworkName("m_Radius")]
+ [NetworkVar("m_Radius")]
public float Radius;
}
diff --git a/Game.Client/C_SteamJet.cs b/Game.Client/C_SteamJet.cs
index 4528e75a..37c707ad 100644
--- a/Game.Client/C_SteamJet.cs
+++ b/Game.Client/C_SteamJet.cs
@@ -3,45 +3,44 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CSteamJet")]
-public class C_SteamJet : C_BaseParticleEntity
+public partial class C_SteamJet : C_BaseParticleEntity
{
- public static readonly RecvTable DT_SteamJet = new(DT_BaseParticleEntity, [
- RecvPropFloat(FIELD.OF(nameof(SpreadSpeed))),
- RecvPropFloat(FIELD.OF(nameof(Speed))),
- RecvPropFloat(FIELD.OF(nameof(StartSize))),
- RecvPropFloat(FIELD.OF(nameof(EndSize))),
- RecvPropFloat(FIELD.OF(nameof(Rate))),
- RecvPropFloat(FIELD.OF(nameof(JetLength))),
- RecvPropBool(FIELD.OF(nameof(Emit))),
- RecvPropBool(FIELD.OF(nameof(FaceLeft))),
- RecvPropInt(FIELD.OF(nameof(Type))),
- RecvPropInt(FIELD.OF(nameof(Spawnflags))),
- RecvPropFloat(FIELD.OF(nameof(RollSpeed))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_SteamJet);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(SpreadSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Speed)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(StartSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(EndSize)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Rate)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(JetLength)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(Emit),
+ nameof(FaceLeft),
+ new(nameof(Type)) { Bits = 2, Flags = PropFlags.Unsigned },
+ new(nameof(Spawnflags)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(RollSpeed)) { Bits = 0, Flags = PropFlags.NoScale },
+ ];
- [NetworkName("m_SpreadSpeed")]
+ [NetworkVar("m_SpreadSpeed")]
public float SpreadSpeed;
- [NetworkName("m_Speed")]
+ [NetworkVar("m_Speed")]
public new float Speed;
- [NetworkName("m_StartSize")]
+ [NetworkVar("m_StartSize")]
public float StartSize;
- [NetworkName("m_EndSize")]
+ [NetworkVar("m_EndSize")]
public float EndSize;
- [NetworkName("m_Rate")]
+ [NetworkVar("m_Rate")]
public float Rate;
- [NetworkName("m_JetLength")]
+ [NetworkVar("m_JetLength")]
public float JetLength;
- [NetworkName("m_bEmit")]
+ [NetworkVar("m_bEmit")]
public bool Emit;
- [NetworkName("m_bFaceLeft")]
+ [NetworkVar("m_bFaceLeft")]
public bool FaceLeft;
- [NetworkName("m_nType")]
+ [NetworkVar("m_nType")]
public int Type;
- [NetworkName("m_spawnflags")]
+ [NetworkVar("m_spawnflags")]
public int Spawnflags;
- [NetworkName("m_flRollSpeed")]
+ [NetworkVar("m_flRollSpeed")]
public float RollSpeed;
}
diff --git a/Game.Client/C_Strider.cs b/Game.Client/C_Strider.cs
index dc8804c5..99df4f62 100644
--- a/Game.Client/C_Strider.cs
+++ b/Game.Client/C_Strider.cs
@@ -3,23 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CNPC_Strider")]
-public class C_Strider : C_AI_BaseNPC
+public partial class C_Strider : C_AI_BaseNPC
{
- public static readonly RecvTable DT_NPC_Strider = new(DT_AI_BaseNPC, [
- RecvPropVector(FIELD.OF(nameof(HitPos))),
- RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(IKTarget), 0)),
- RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(IKTarget), 1)),
- RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(IKTarget), 2)),
- RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(IKTarget), 3)),
- RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(IKTarget), 4)),
- RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(IKTarget), 5)),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_NPC_Strider);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ nameof(HitPos),
+ new(nameof(IKTarget)) { Encoding = NetEncoding.Elements },
+ ];
- [NetworkName("m_vecHitPos")]
+ [NetworkVar("m_vecHitPos")]
public Vector3 HitPos;
- [NetworkName("m_vecIKTarget")]
+ [NetworkVar("m_vecIKTarget")]
public InlineArray6 IKTarget;
}
diff --git a/Game.Client/C_Sun.cs b/Game.Client/C_Sun.cs
index f5b7817d..302344d2 100644
--- a/Game.Client/C_Sun.cs
+++ b/Game.Client/C_Sun.cs
@@ -7,40 +7,40 @@
using System.Numerics;
namespace Game.Server;
-using FIELD = Source.FIELD;
-[NetworkName("CSun")]
-public class C_Sun : C_BaseEntity
+[NetworkName("CSun", NoBase = true)]
+public partial class C_Sun : C_BaseEntity
{
- public static readonly RecvTable DT_Sun = new([
- RecvPropInt(FIELD.OF(nameof(Render)), 0, RecvProxy_IntToColor32),
- RecvPropInt(FIELD.OF(nameof(Overlay)), 0, RecvProxy_IntToColor32),
- RecvPropVector(FIELD.OF(nameof(Direction))),
- RecvPropInt(FIELD.OF(nameof(On))),
- RecvPropInt(FIELD.OF(nameof(Size))),
- RecvPropInt(FIELD.OF(nameof(OverlaySize))),
- RecvPropInt(FIELD.OF(nameof(Material))),
- RecvPropInt(FIELD.OF(nameof(OverlayMaterial))),
- // todo: RecvProxy_HDRColorScale
- RecvPropFloat(FIELD.OF(nameof(HDRColorScale))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_Sun);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Render)) { Encoding = NetEncoding.Int, Bits = 32, Flags = PropFlags.Unsigned, Proxy = typeof(Color32Proxy) },
+ new(nameof(Overlay)) { Encoding = NetEncoding.Int, Bits = 32, Flags = PropFlags.Unsigned, Proxy = typeof(Color32Proxy) },
+ new(nameof(Direction)) { Bits = 0, Flags = PropFlags.Normal },
+ new(nameof(On)) { Encoding = NetEncoding.Int, Bits = 1, Flags = PropFlags.Unsigned },
+ new(nameof(Size)) { Bits = 10, Flags = PropFlags.Unsigned },
+ new(nameof(OverlaySize)) { Bits = 10, Flags = PropFlags.Unsigned },
+ new(nameof(Material)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(OverlayMaterial)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(HDRColorScale)) { Encoding = NetEncoding.Float, Bits = 0, Flags = PropFlags.NoScale, Low = 0.0f, High = 100.0f },
+ ];
- [NetworkName("m_clrRender")]
+ [NetworkVar("m_clrRender")]
public Color Render;
- [NetworkName("m_clrOverlay")]
+ [NetworkVar("m_clrOverlay")]
public Color Overlay;
- [NetworkName("m_vDirection")]
+ [NetworkVar("m_vDirection")]
public Vector3 Direction;
- [NetworkName("m_bOn")]
+ [NetworkVar("m_bOn")]
public bool On;
- [NetworkName("m_nSize")]
+ [NetworkVar("m_nSize")]
public int Size;
- [NetworkName("m_nOverlaySize")]
+ [NetworkVar("m_nOverlaySize")]
public int OverlaySize;
- [NetworkName("m_nMaterial")]
+ [NetworkVar("m_nMaterial")]
public int Material;
- [NetworkName("m_nOverlayMaterial")]
+ [NetworkVar("m_nOverlayMaterial")]
public int OverlayMaterial;
+ // todo: RecvProxy_HDRColorScale
+ [NetworkVar("HDRColorScale")]
public int HDRColorScale;
}
\ No newline at end of file
diff --git a/Game.Client/C_TEAntlionDust.cs b/Game.Client/C_TEAntlionDust.cs
index b9edd21d..224c620a 100644
--- a/Game.Client/C_TEAntlionDust.cs
+++ b/Game.Client/C_TEAntlionDust.cs
@@ -4,19 +4,18 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEAntlionDust")]
-public class C_TEAntlionDust : C_TEParticleSystem
+public partial class C_TEAntlionDust : C_TEParticleSystem
{
- public static readonly RecvTable DT_TEAntlionDust = new(DT_TEParticleSystem, [
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropVector(FIELD.OF(nameof(Angles))),
- RecvPropBool(FIELD.OF(nameof(BlockedSpawner))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEAntlionDust);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Origin)) { Encoding = NetEncoding.Vector, Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Angles)) { Bits = 0, Flags = PropFlags.NoScale },
+ nameof(BlockedSpawner),
+ ];
- [NetworkName("m_vecAngles")]
+ [NetworkVar("m_vecAngles")]
public Vector3 Angles;
- [NetworkName("m_bBlockedSpawner")]
+ [NetworkVar("m_bBlockedSpawner")]
public bool BlockedSpawner;
}
diff --git a/Game.Client/C_TEArmorRicochet.cs b/Game.Client/C_TEArmorRicochet.cs
index 2ec96ddf..1fbed858 100644
--- a/Game.Client/C_TEArmorRicochet.cs
+++ b/Game.Client/C_TEArmorRicochet.cs
@@ -3,12 +3,13 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEArmorRicochet")]
-public class C_TEArmorRicochet : C_TEMetalSparks
+public partial class C_TEArmorRicochet : C_TEMetalSparks
{
- public static readonly RecvTable DT_TEArmorRicochet = new(DT_TEMetalSparks, []);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEArmorRicochet);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ ];
+
}
public static partial class TempEnts
diff --git a/Game.Client/C_TEBSPDecal.cs b/Game.Client/C_TEBSPDecal.cs
index 278acc5c..d80b632a 100644
--- a/Game.Client/C_TEBSPDecal.cs
+++ b/Game.Client/C_TEBSPDecal.cs
@@ -3,22 +3,21 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBSPDecal")]
-public class C_TEBSPDecal : C_BaseTempEntity
+public partial class C_TEBSPDecal : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEBSPDecal = new(DT_BaseTempEntity, [
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropInt(FIELD.OF(nameof(Entity))),
- RecvPropInt(FIELD.OF(nameof(Index))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBSPDecal);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Origin)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Entity)) { Bits = 13, Flags = PropFlags.Unsigned },
+ new(nameof(Index)) { Bits = 9, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_vecOrigin")]
+ [NetworkVar("m_vecOrigin")]
public Vector3 Origin;
- [NetworkName("m_nEntity")]
+ [NetworkVar("m_nEntity")]
public int Entity;
- [NetworkName("m_nIndex")]
+ [NetworkVar("m_nIndex")]
public int Index;
}
diff --git a/Game.Client/C_TEBeamEntPoint.cs b/Game.Client/C_TEBeamEntPoint.cs
index ab6da440..34aa6b82 100644
--- a/Game.Client/C_TEBeamEntPoint.cs
+++ b/Game.Client/C_TEBeamEntPoint.cs
@@ -6,25 +6,24 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBeamEntPoint")]
-public class C_TEBeamEntPoint : C_BaseBeam
+public partial class C_TEBeamEntPoint : C_BaseBeam
{
- public static readonly RecvTable DT_TEBeamEntPoint = new(DT_BaseBeam, [
- RecvPropInt(FIELD.OF(nameof(StartEntity))),
- RecvPropInt(FIELD.OF(nameof(EndEntity))),
- RecvPropVector(FIELD.OF(nameof(StartPoint))),
- RecvPropVector(FIELD.OF(nameof(EndPoint))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBeamEntPoint).AsEvent();
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(StartEntity)) { Bits = 24, Flags = PropFlags.Unsigned },
+ new(nameof(EndEntity)) { Bits = 24, Flags = PropFlags.Unsigned },
+ new(nameof(StartPoint)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(EndPoint)) { Bits = 0, Flags = PropFlags.Coord },
+ ];
- [NetworkName("m_nStartEntity")]
+ [NetworkVar("m_nStartEntity")]
public int StartEntity;
- [NetworkName("m_nEndEntity")]
+ [NetworkVar("m_nEndEntity")]
public int EndEntity;
- [NetworkName("m_vecStartPoint")]
+ [NetworkVar("m_vecStartPoint")]
public Vector3 StartPoint;
- [NetworkName("m_vecEndPoint")]
+ [NetworkVar("m_vecEndPoint")]
public Vector3 EndPoint;
public override void PostDataUpdate(DataUpdateType updateType) {
diff --git a/Game.Client/C_TEBeamEnts.cs b/Game.Client/C_TEBeamEnts.cs
index db91c40d..e12aa167 100644
--- a/Game.Client/C_TEBeamEnts.cs
+++ b/Game.Client/C_TEBeamEnts.cs
@@ -5,19 +5,18 @@
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBeamEnts")]
-public class C_TEBeamEnts : C_BaseBeam
+public partial class C_TEBeamEnts : C_BaseBeam
{
- public static readonly RecvTable DT_TEBeamEnts = new(DT_BaseBeam, [
- RecvPropInt(FIELD.OF(nameof(StartEntity))),
- RecvPropInt(FIELD.OF(nameof(EndEntity))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBeamEnts).AsEvent();
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(StartEntity)) { Bits = 24, Flags = PropFlags.Unsigned },
+ new(nameof(EndEntity)) { Bits = 24, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_nStartEntity")]
+ [NetworkVar("m_nStartEntity")]
public int StartEntity;
- [NetworkName("m_nEndEntity")]
+ [NetworkVar("m_nEndEntity")]
public int EndEntity;
public override void PostDataUpdate(DataUpdateType updateType) {
diff --git a/Game.Client/C_TEBeamFollow.cs b/Game.Client/C_TEBeamFollow.cs
index a227548a..f891fa97 100644
--- a/Game.Client/C_TEBeamFollow.cs
+++ b/Game.Client/C_TEBeamFollow.cs
@@ -3,16 +3,15 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBeamFollow")]
-public class C_TEBeamFollow : C_BaseBeam
+public partial class C_TEBeamFollow : C_BaseBeam
{
- public static readonly RecvTable DT_TEBeamFollow = new(DT_BaseBeam, [
- RecvPropInt(FIELD.OF(nameof(EntIndex))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBeamFollow);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(EntIndex)) { Bits = 24, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_iEntIndex")]
+ [NetworkVar("m_iEntIndex")]
public int EntIndex;
}
diff --git a/Game.Client/C_TEBeamLaser.cs b/Game.Client/C_TEBeamLaser.cs
index 23313093..1e170854 100644
--- a/Game.Client/C_TEBeamLaser.cs
+++ b/Game.Client/C_TEBeamLaser.cs
@@ -5,19 +5,18 @@
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBeamLaser")]
-public class C_TEBeamLaser : C_BaseBeam
+public partial class C_TEBeamLaser : C_BaseBeam
{
- public static readonly RecvTable DT_TEBeamLaser = new(DT_BaseBeam, [
- RecvPropInt(FIELD.OF(nameof(StartEntity))),
- RecvPropInt(FIELD.OF(nameof(EndEntity))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBeamLaser).AsEvent();
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(StartEntity)) { Bits = 24, Flags = PropFlags.Unsigned },
+ new(nameof(EndEntity)) { Bits = 24, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_nStartEntity")]
+ [NetworkVar("m_nStartEntity")]
public int StartEntity;
- [NetworkName("m_nEndEntity")]
+ [NetworkVar("m_nEndEntity")]
public int EndEntity;
public override void PostDataUpdate(DataUpdateType updateType) {
diff --git a/Game.Client/C_TEBeamPoints.cs b/Game.Client/C_TEBeamPoints.cs
index d6d8a636..e74cba40 100644
--- a/Game.Client/C_TEBeamPoints.cs
+++ b/Game.Client/C_TEBeamPoints.cs
@@ -6,19 +6,18 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBeamPoints")]
-public class C_TEBeamPoints : C_BaseBeam
+public partial class C_TEBeamPoints : C_BaseBeam
{
- public static readonly RecvTable DT_TEBeamPoints = new(DT_BaseBeam, [
- RecvPropVector(FIELD.OF(nameof(StartPoint))),
- RecvPropVector(FIELD.OF(nameof(EndPoint))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBeamPoints).AsEvent();
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(StartPoint)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(EndPoint)) { Bits = 0, Flags = PropFlags.Coord },
+ ];
- [NetworkName("m_vecStartPoint")]
+ [NetworkVar("m_vecStartPoint")]
public Vector3 StartPoint;
- [NetworkName("m_vecEndPoint")]
+ [NetworkVar("m_vecEndPoint")]
public Vector3 EndPoint;
public override void PostDataUpdate(DataUpdateType updateType) {
diff --git a/Game.Client/C_TEBeamRing.cs b/Game.Client/C_TEBeamRing.cs
index e2afc147..3215ff17 100644
--- a/Game.Client/C_TEBeamRing.cs
+++ b/Game.Client/C_TEBeamRing.cs
@@ -3,19 +3,18 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBeamRing")]
-public class C_TEBeamRing : C_BaseBeam
+public partial class C_TEBeamRing : C_BaseBeam
{
- public static readonly RecvTable DT_TEBeamRing = new(DT_BaseBeam, [
- RecvPropInt(FIELD.OF(nameof(StartEntity))),
- RecvPropInt(FIELD.OF(nameof(EndEntity))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBeamRing);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(StartEntity)) { Bits = 13, Flags = PropFlags.Unsigned },
+ new(nameof(EndEntity)) { Bits = 13, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_nStartEntity")]
+ [NetworkVar("m_nStartEntity")]
public int StartEntity;
- [NetworkName("m_nEndEntity")]
+ [NetworkVar("m_nEndEntity")]
public int EndEntity;
}
diff --git a/Game.Client/C_TEBeamRingPoint.cs b/Game.Client/C_TEBeamRingPoint.cs
index 89310db3..27efbf59 100644
--- a/Game.Client/C_TEBeamRingPoint.cs
+++ b/Game.Client/C_TEBeamRingPoint.cs
@@ -3,22 +3,21 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBeamRingPoint")]
-public class C_TEBeamRingPoint : C_BaseBeam
+public partial class C_TEBeamRingPoint : C_BaseBeam
{
- public static readonly RecvTable DT_TEBeamRingPoint = new(DT_BaseBeam, [
- RecvPropVector(FIELD.OF(nameof(Center))),
- RecvPropFloat(FIELD.OF(nameof(LStartRadius))),
- RecvPropFloat(FIELD.OF(nameof(LEndRadius))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBeamRingPoint);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Center)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(LStartRadius)) { Bits = 16, Flags = PropFlags.RoundUp, Low = 0.0f, High = 4096.0f },
+ new(nameof(LEndRadius)) { Bits = 16, Flags = PropFlags.RoundUp, Low = 0.0f, High = 4096.0f },
+ ];
- [NetworkName("m_vecCenter")]
+ [NetworkVar("m_vecCenter")]
public Vector3 Center;
- [NetworkName("m_flStartRadius")]
+ [NetworkVar("m_flStartRadius")]
public float LStartRadius;
- [NetworkName("m_flEndRadius")]
+ [NetworkVar("m_flEndRadius")]
public float LEndRadius;
}
diff --git a/Game.Client/C_TEBeamSpline.cs b/Game.Client/C_TEBeamSpline.cs
index ce06f7ab..8baee218 100644
--- a/Game.Client/C_TEBeamSpline.cs
+++ b/Game.Client/C_TEBeamSpline.cs
@@ -6,23 +6,20 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-
-[NetworkName("CTEBeamSpline")]
-public class C_TEBeamSpline : C_BaseTempEntity
+[NetworkName("CTEBeamSpline", NoBase = true)]
+public partial class C_TEBeamSpline : C_BaseTempEntity
{
public const int MAX_SPLINE_POINTS = 16;
- public static readonly RecvTable DT_TEBeamSpline = new([
- RecvPropInt(FIELD.OF(nameof(NumPoints))),
- RecvPropVector(FIELD.OF_ARRAYINDEX(nameof(Points), 0)),
- RecvPropArray(FIELD.OF_ARRAY(nameof(Points))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBeamSpline).AsEvent();
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ nameof(NumPoints),
+ new(nameof(Points)) { Encoding = NetEncoding.Array },
+ ];
- [NetworkName("m_nPoints")]
+ [NetworkVar("m_nPoints")]
public int NumPoints;
- [NetworkName("m_vecPoints")]
+ [NetworkVar("m_vecPoints")]
public InlineArrayMaxSplinePoints Points;
public override void PostDataUpdate(DataUpdateType updateType) {
diff --git a/Game.Client/C_TEBloodSprite.cs b/Game.Client/C_TEBloodSprite.cs
index dfed43af..e1a921ba 100644
--- a/Game.Client/C_TEBloodSprite.cs
+++ b/Game.Client/C_TEBloodSprite.cs
@@ -3,36 +3,35 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CTEBloodSprite")]
-public class C_TEBloodSprite
+[NetworkName("CTEBloodSprite", NoBase = true)]
+public partial class C_TEBloodSprite : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEBloodSprite = new([
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropVector(FIELD.OF(nameof(Direction))),
- RecvPropInt(FIELD.OF(nameof(R))),
- RecvPropInt(FIELD.OF(nameof(G))),
- RecvPropInt(FIELD.OF(nameof(B))),
- RecvPropInt(FIELD.OF(nameof(A))),
- RecvPropInt(FIELD.OF(nameof(Size))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBloodSprite);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ nameof(Origin),
+ nameof(Direction),
+ nameof(R),
+ nameof(G),
+ nameof(B),
+ nameof(A),
+ nameof(Size),
+ ];
- [NetworkName("m_vecOrigin")]
+ [NetworkVar("m_vecOrigin")]
public Vector3 Origin;
- [NetworkName("m_vecDirection")]
+ [NetworkVar("m_vecDirection")]
public Vector3 Direction;
- [NetworkName("r")]
+ [NetworkVar("r")]
public int R;
- [NetworkName("g")]
+ [NetworkVar("g")]
public int G;
- [NetworkName("b")]
+ [NetworkVar("b")]
public int B;
- [NetworkName("a")]
+ [NetworkVar("a")]
public int A;
public int SprayModel;
public int DropModel;
- [NetworkName("m_nSize")]
+ [NetworkVar("m_nSize")]
public int Size;
}
diff --git a/Game.Client/C_TEBloodStream.cs b/Game.Client/C_TEBloodStream.cs
index 234ff6ad..cc3d295a 100644
--- a/Game.Client/C_TEBloodStream.cs
+++ b/Game.Client/C_TEBloodStream.cs
@@ -3,31 +3,30 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBloodStream")]
-public class C_TEBloodStream : C_TEParticleSystem
+public partial class C_TEBloodStream : C_TEParticleSystem
{
- public static readonly RecvTable DT_TEBloodStream = new(DT_TEParticleSystem, [
- RecvPropVector(FIELD.OF(nameof(Direction))),
- RecvPropInt(FIELD.OF(nameof(R))),
- RecvPropInt(FIELD.OF(nameof(G))),
- RecvPropInt(FIELD.OF(nameof(B))),
- RecvPropInt(FIELD.OF(nameof(A))),
- RecvPropInt(FIELD.OF(nameof(Amount))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBloodStream);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Direction)) { Bits = 11, Low = -10.0f, High = 10.0f },
+ new(nameof(R)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(G)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(B)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(A)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Amount)) { Bits = 8, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_vecDirection")]
+ [NetworkVar("m_vecDirection")]
public Vector3 Direction;
- [NetworkName("r")]
+ [NetworkVar("r")]
public int R;
- [NetworkName("g")]
+ [NetworkVar("g")]
public int G;
- [NetworkName("b")]
+ [NetworkVar("b")]
public int B;
- [NetworkName("a")]
+ [NetworkVar("a")]
public int A;
- [NetworkName("m_nAmount")]
+ [NetworkVar("m_nAmount")]
public int Amount;
}
diff --git a/Game.Client/C_TEBreakModel.cs b/Game.Client/C_TEBreakModel.cs
index 8513bb09..f8949bbd 100644
--- a/Game.Client/C_TEBreakModel.cs
+++ b/Game.Client/C_TEBreakModel.cs
@@ -4,42 +4,39 @@
using System.Numerics;
using Source.Common.Mathematics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBreakModel")]
-public class C_TEBreakModel : C_BaseTempEntity
+public partial class C_TEBreakModel : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEBreakModel = new(DT_BaseTempEntity, [
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropFloat(FIELD.OF_VECTORELEM(nameof(Rotation), 0)),
- RecvPropFloat(FIELD.OF_VECTORELEM(nameof(Rotation), 1)),
- RecvPropFloat(FIELD.OF_VECTORELEM(nameof(Rotation), 2)),
- RecvPropVector(FIELD.OF(nameof(Size))),
- RecvPropVector(FIELD.OF(nameof(Velocity))),
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropInt(FIELD.OF(nameof(Randomization))),
- RecvPropInt(FIELD.OF(nameof(Count))),
- RecvPropFloat(FIELD.OF(nameof(Time))),
- RecvPropInt(FIELD.OF(nameof(Flags))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBreakModel);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ nameof(Origin),
+ new(nameof(Rotation)) { Encoding = NetEncoding.VectorElements },
+ nameof(Size),
+ nameof(Velocity),
+ nameof(ModelIndex),
+ nameof(Randomization),
+ nameof(Count),
+ nameof(Time),
+ nameof(Flags),
+ ];
- [NetworkName("m_vecOrigin")]
+ [NetworkVar("m_vecOrigin")]
public Vector3 Origin;
- [NetworkName("m_angRotation")]
+ [NetworkVar("m_angRotation")]
public QAngle Rotation;
- [NetworkName("m_vecSize")]
+ [NetworkVar("m_vecSize")]
public Vector3 Size;
- [NetworkName("m_vecVelocity")]
+ [NetworkVar("m_vecVelocity")]
public Vector3 Velocity;
- [NetworkName("m_nModelIndex")]
+ [NetworkVar("m_nModelIndex")]
public int ModelIndex;
- [NetworkName("m_nRandomization")]
+ [NetworkVar("m_nRandomization")]
public int Randomization;
- [NetworkName("m_nCount")]
+ [NetworkVar("m_nCount")]
public int Count;
- [NetworkName("m_fTime")]
+ [NetworkVar("m_fTime")]
public float Time;
- [NetworkName("m_nFlags")]
+ [NetworkVar("m_nFlags")]
public int Flags;
}
diff --git a/Game.Client/C_TEBubbleTrail.cs b/Game.Client/C_TEBubbleTrail.cs
index ad20045f..8d592408 100644
--- a/Game.Client/C_TEBubbleTrail.cs
+++ b/Game.Client/C_TEBubbleTrail.cs
@@ -3,31 +3,30 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBubbleTrail")]
-public class C_TEBubbleTrail : C_BaseTempEntity
+public partial class C_TEBubbleTrail : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEBubbleTrail = new(DT_BaseTempEntity, [
- RecvPropVector(FIELD.OF(nameof(Mins))),
- RecvPropVector(FIELD.OF(nameof(Maxs))),
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropFloat(FIELD.OF(nameof(LWaterZ))),
- RecvPropInt(FIELD.OF(nameof(Count))),
- RecvPropFloat(FIELD.OF(nameof(Speed))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBubbleTrail);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Mins)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Maxs)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(ModelIndex)) { Bits = 14 },
+ new(nameof(LWaterZ)) { Bits = 17, Low = MIN_COORD_INTEGER, High = MAX_COORD_INTEGER },
+ new(nameof(Count)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Speed)) { Bits = 17, Low = MIN_COORD_INTEGER, High = MAX_COORD_INTEGER },
+ ];
- [NetworkName("m_vecMins")]
+ [NetworkVar("m_vecMins")]
public Vector3 Mins;
- [NetworkName("m_vecMaxs")]
+ [NetworkVar("m_vecMaxs")]
public Vector3 Maxs;
- [NetworkName("m_nModelIndex")]
+ [NetworkVar("m_nModelIndex")]
public int ModelIndex;
- [NetworkName("m_flWaterZ")]
+ [NetworkVar("m_flWaterZ")]
public float LWaterZ;
- [NetworkName("m_nCount")]
+ [NetworkVar("m_nCount")]
public int Count;
- [NetworkName("m_fSpeed")]
+ [NetworkVar("m_fSpeed")]
public float Speed;
}
diff --git a/Game.Client/C_TEBubbles.cs b/Game.Client/C_TEBubbles.cs
index 2a1ad382..f117d222 100644
--- a/Game.Client/C_TEBubbles.cs
+++ b/Game.Client/C_TEBubbles.cs
@@ -3,31 +3,30 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEBubbles")]
-public class C_TEBubbles : C_BaseTempEntity
+public partial class C_TEBubbles : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEBubbles = new(DT_BaseTempEntity, [
- RecvPropVector(FIELD.OF(nameof(Mins))),
- RecvPropVector(FIELD.OF(nameof(Maxs))),
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropFloat(FIELD.OF(nameof(Height))),
- RecvPropInt(FIELD.OF(nameof(Count))),
- RecvPropFloat(FIELD.OF(nameof(Speed))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEBubbles);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Mins)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Maxs)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(ModelIndex)) { Bits = 14 },
+ new(nameof(Height)) { Bits = 17, Low = MIN_COORD_INTEGER, High = MAX_COORD_INTEGER },
+ new(nameof(Count)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Speed)) { Bits = 17, Low = MIN_COORD_INTEGER, High = MAX_COORD_INTEGER },
+ ];
- [NetworkName("m_vecMins")]
+ [NetworkVar("m_vecMins")]
public Vector3 Mins;
- [NetworkName("m_vecMaxs")]
+ [NetworkVar("m_vecMaxs")]
public Vector3 Maxs;
- [NetworkName("m_nModelIndex")]
+ [NetworkVar("m_nModelIndex")]
public int ModelIndex;
- [NetworkName("m_fHeight")]
+ [NetworkVar("m_fHeight")]
public float Height;
- [NetworkName("m_nCount")]
+ [NetworkVar("m_nCount")]
public int Count;
- [NetworkName("m_fSpeed")]
+ [NetworkVar("m_fSpeed")]
public float Speed;
}
diff --git a/Game.Client/C_TEClientProjectile.cs b/Game.Client/C_TEClientProjectile.cs
index de9814bb..ff5d620b 100644
--- a/Game.Client/C_TEClientProjectile.cs
+++ b/Game.Client/C_TEClientProjectile.cs
@@ -3,28 +3,27 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEClientProjectile")]
-public class C_TEClientProjectile : C_BaseTempEntity
+public partial class C_TEClientProjectile : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEClientProjectile = new(DT_BaseTempEntity, [
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropVector(FIELD.OF(nameof(Velocity))),
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropInt(FIELD.OF(nameof(LifeTime))),
- RecvPropInt(FIELD.OF(nameof(HOwner))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEClientProjectile);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Origin)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Velocity)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(ModelIndex)) { Bits = 14 },
+ new(nameof(LifeTime)) { Bits = 6, Flags = PropFlags.Unsigned },
+ new(nameof(HOwner)) { Bits = 23, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_vecOrigin")]
+ [NetworkVar("m_vecOrigin")]
public Vector3 Origin;
- [NetworkName("m_vecVelocity")]
+ [NetworkVar("m_vecVelocity")]
public Vector3 Velocity;
- [NetworkName("m_nModelIndex")]
+ [NetworkVar("m_nModelIndex")]
public int ModelIndex;
- [NetworkName("m_nLifeTime")]
+ [NetworkVar("m_nLifeTime")]
public int LifeTime;
- [NetworkName("m_hOwner")]
+ [NetworkVar("m_hOwner")]
public int HOwner;
}
diff --git a/Game.Client/C_TEConcussiveExplosion.cs b/Game.Client/C_TEConcussiveExplosion.cs
index 07392482..fda63951 100644
--- a/Game.Client/C_TEConcussiveExplosion.cs
+++ b/Game.Client/C_TEConcussiveExplosion.cs
@@ -4,25 +4,24 @@
using System.Numerics;
using Source.Common.Formats.Keyvalues;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEConcussiveExplosion")]
-public class C_TEConcussiveExplosion : C_TEParticleSystem
+public partial class C_TEConcussiveExplosion : C_TEParticleSystem
{
- public static readonly RecvTable DT_TEConcussiveExplosion = new(DT_TEParticleSystem, [
- RecvPropVector(FIELD.OF(nameof(Normal))),
- RecvPropFloat(FIELD.OF(nameof(Scale))),
- RecvPropInt(FIELD.OF(nameof(Radius))),
- RecvPropInt(FIELD.OF(nameof(Magnitude))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEConcussiveExplosion);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Normal)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Scale)) { Bits = 0, Flags = PropFlags.NoScale },
+ new(nameof(Radius)) { Bits = 32, Flags = PropFlags.Unsigned },
+ new(nameof(Magnitude)) { Bits = 32, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_vecNormal")]
+ [NetworkVar("m_vecNormal")]
public Vector3 Normal;
- [NetworkName("m_flScale")]
+ [NetworkVar("m_flScale")]
public float Scale;
- [NetworkName("m_nRadius")]
+ [NetworkVar("m_nRadius")]
public int Radius;
- [NetworkName("m_nMagnitude")]
+ [NetworkVar("m_nMagnitude")]
public int Magnitude;
}
diff --git a/Game.Client/C_TEDecal.cs b/Game.Client/C_TEDecal.cs
index 61a4b5ed..250b4f67 100644
--- a/Game.Client/C_TEDecal.cs
+++ b/Game.Client/C_TEDecal.cs
@@ -5,28 +5,27 @@
using Source.Engine;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEDecal")]
-public class C_TEDecal : C_BaseTempEntity
+public partial class C_TEDecal : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEDecal = new(DT_BaseTempEntity, [
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropVector(FIELD.OF(nameof(Start))),
- RecvPropInt(FIELD.OF(nameof(Entity))),
- RecvPropInt(FIELD.OF(nameof(Hitbox))),
- RecvPropInt(FIELD.OF(nameof(Index))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEDecal);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Origin)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Start)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Entity)) { Bits = 13, Flags = PropFlags.Unsigned },
+ new(nameof(Hitbox)) { Bits = 12, Flags = PropFlags.Unsigned },
+ new(nameof(Index)) { Bits = 9, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_vecOrigin")]
+ [NetworkVar("m_vecOrigin")]
public Vector3 Origin;
- [NetworkName("m_vecStart")]
+ [NetworkVar("m_vecStart")]
public Vector3 Start;
- [NetworkName("m_nEntity")]
+ [NetworkVar("m_nEntity")]
public int Entity;
- [NetworkName("m_nHitbox")]
+ [NetworkVar("m_nHitbox")]
public int Hitbox;
- [NetworkName("m_nIndex")]
+ [NetworkVar("m_nIndex")]
public int Index;
public override void PostDataUpdate(DataUpdateType updateType) {
diff --git a/Game.Client/C_TEDust.cs b/Game.Client/C_TEDust.cs
index c840990c..12717aab 100644
--- a/Game.Client/C_TEDust.cs
+++ b/Game.Client/C_TEDust.cs
@@ -3,21 +3,20 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEDust")]
-public class C_TEDust : C_TEParticleSystem
+public partial class C_TEDust : C_TEParticleSystem
{
- public static readonly RecvTable DT_TEDust = new(DT_TEParticleSystem, [
- RecvPropFloat(FIELD.OF(nameof(LSize))),
- RecvPropFloat(FIELD.OF(nameof(LSpeed))),
- RecvPropVector(FIELD.OF(nameof(Direction))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEDust);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(LSize)) { Bits = 0, Flags = PropFlags.Coord | PropFlags.NoScale },
+ new(nameof(LSpeed)) { Bits = 0, Flags = PropFlags.Coord | PropFlags.NoScale },
+ new(nameof(Direction)) { Bits = 4, Low = -1.0f, High = 1.0f },
+ ];
- [NetworkName("m_flSize")]
+ [NetworkVar("m_flSize")]
public float LSize;
- [NetworkName("m_flSpeed")]
+ [NetworkVar("m_flSpeed")]
public float LSpeed;
- [NetworkName("m_vecDirection")]
+ [NetworkVar("m_vecDirection")]
public Vector3 Direction;
}
diff --git a/Game.Client/C_TEDynamicLight.cs b/Game.Client/C_TEDynamicLight.cs
index 83582a8b..213619c3 100644
--- a/Game.Client/C_TEDynamicLight.cs
+++ b/Game.Client/C_TEDynamicLight.cs
@@ -6,37 +6,36 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEDynamicLight")]
-public class C_TEDynamicLight : C_BaseTempEntity
+public partial class C_TEDynamicLight : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEDynamicLight = new(DT_BaseTempEntity, [
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropInt(FIELD.OF(nameof(R))),
- RecvPropInt(FIELD.OF(nameof(G))),
- RecvPropInt(FIELD.OF(nameof(B))),
- RecvPropInt(FIELD.OF(nameof(Exponent))),
- RecvPropFloat(FIELD.OF(nameof(Radius))),
- RecvPropFloat(FIELD.OF(nameof(Time))),
- RecvPropFloat(FIELD.OF(nameof(Decay))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEDynamicLight).AsEvent();
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Origin)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(R)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(G)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(B)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Exponent)) { Bits = 8 },
+ new(nameof(Radius)) { Bits = 8, Flags = PropFlags.RoundUp, Low = 0, High = 2560.0f },
+ new(nameof(Time)) { Bits = 8, Flags = PropFlags.RoundDown, Low = 0, High = 25.6f },
+ new(nameof(Decay)) { Bits = 8, Flags = PropFlags.RoundDown, Low = 0, High = 2560.0f },
+ ];
- [NetworkName("m_vecOrigin")]
+ [NetworkVar("m_vecOrigin")]
public Vector3 Origin;
- [NetworkName("r")]
+ [NetworkVar("r")]
public int R;
- [NetworkName("g")]
+ [NetworkVar("g")]
public int G;
- [NetworkName("b")]
+ [NetworkVar("b")]
public int B;
- [NetworkName("exponent")]
+ [NetworkVar("exponent")]
public int Exponent;
- [NetworkName("m_fRadius")]
+ [NetworkVar("m_fRadius")]
public float Radius;
- [NetworkName("m_fTime")]
+ [NetworkVar("m_fTime")]
public float Time;
- [NetworkName("m_fDecay")]
+ [NetworkVar("m_fDecay")]
public float Decay;
public override void PostDataUpdate(DataUpdateType updateType) {
diff --git a/Game.Client/C_TEEffectDispatch.cs b/Game.Client/C_TEEffectDispatch.cs
index 6414af43..83407e24 100644
--- a/Game.Client/C_TEEffectDispatch.cs
+++ b/Game.Client/C_TEEffectDispatch.cs
@@ -4,17 +4,16 @@
using System.Numerics;
namespace Game.Client;
-using FIELD = Source.FIELD;
[NetworkName("CTEEffectDispatch")]
-public class C_TEEffectDispatch : C_BaseTempEntity
+public partial class C_TEEffectDispatch : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEEffectDispatch = new(DT_BaseTempEntity, [
- RecvPropDataTable("m_EffectData", FIELD.OF(nameof(EffectData)), EffectData.DT_EffectData, 0, RECV_GET_OBJECT_AT_FIELD(FIELD.OF(nameof(EffectData)))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEEffectDispatch);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(EffectData)) { Encoding = NetEncoding.DataTable, DataTable = "DT_EffectData" },
+ ];
- [NetworkName("m_EffectData")]
+ [NetworkVar("m_EffectData")]
public readonly EffectData EffectData = new();
}
diff --git a/Game.Client/C_TEEnergySplash.cs b/Game.Client/C_TEEnergySplash.cs
index c8c0e09e..8a307be4 100644
--- a/Game.Client/C_TEEnergySplash.cs
+++ b/Game.Client/C_TEEnergySplash.cs
@@ -3,22 +3,21 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
-[NetworkName("CTEEnergySplash")]
-public class C_TEEnergySplash : C_BaseTempEntity
+[NetworkName("CTEEnergySplash", NoBase = true)]
+public partial class C_TEEnergySplash : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEEnergySplash = new([
- RecvPropVector(FIELD.OF(nameof(Pos))),
- RecvPropVector(FIELD.OF(nameof(Dir))),
- RecvPropInt(FIELD.OF(nameof(Explosive))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEEnergySplash);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Pos)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Dir)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Explosive)) { Bits = 1, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_vecPos")]
+ [NetworkVar("m_vecPos")]
public Vector3 Pos;
- [NetworkName("m_vecDir")]
+ [NetworkVar("m_vecDir")]
public Vector3 Dir;
- [NetworkName("m_bExplosive")]
+ [NetworkVar("m_bExplosive")]
public int Explosive;
}
diff --git a/Game.Client/C_TEExplosion.cs b/Game.Client/C_TEExplosion.cs
index 8a74597a..22b9f054 100644
--- a/Game.Client/C_TEExplosion.cs
+++ b/Game.Client/C_TEExplosion.cs
@@ -3,29 +3,28 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEExplosion")]
-public class C_TEExplosion : C_TEParticleSystem
+public partial class C_TEExplosion : C_TEParticleSystem
{
- public static readonly RecvTable DT_TEExplosion = new(DT_TEParticleSystem, [
- RecvPropFloat(FIELD.OF(nameof(Scale))),
- RecvPropInt(FIELD.OF(nameof(Flags))),
- RecvPropInt(FIELD.OF(nameof(Radius))),
- RecvPropInt(FIELD.OF(nameof(Magnitude))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEExplosion);
+ [NetworkTable]
+ public static readonly new NetworkProp[] Props = [
+ new(nameof(Scale)) { Bits = 9, Low = 0.0f, High = 51.2f },
+ new(nameof(Flags)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Radius)) { Bits = 16, Flags = PropFlags.Unsigned },
+ new(nameof(Magnitude)) { Bits = 16, Flags = PropFlags.Unsigned },
+ ];
public int ModelIndex;
- [NetworkName("m_fScale")]
+ [NetworkVar("m_fScale")]
public float Scale;
public int FrameRate;
- [NetworkName("m_nFlags")]
+ [NetworkVar("m_nFlags")]
public int Flags;
public Vector3 Normal;
public int ChMaterialType;
- [NetworkName("m_nRadius")]
+ [NetworkVar("m_nRadius")]
public int Radius;
- [NetworkName("m_nMagnitude")]
+ [NetworkVar("m_nMagnitude")]
public int Magnitude;
}
diff --git a/Game.Client/C_TEFizz.cs b/Game.Client/C_TEFizz.cs
index 0c6d2d7a..2dba3c0d 100644
--- a/Game.Client/C_TEFizz.cs
+++ b/Game.Client/C_TEFizz.cs
@@ -3,25 +3,24 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEFizz")]
-public class C_TEFizz : C_BaseTempEntity
+public partial class C_TEFizz : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEFizz = new(DT_BaseTempEntity, [
- RecvPropInt(FIELD.OF(nameof(Entity))),
- RecvPropInt(FIELD.OF(nameof(ModelIndex))),
- RecvPropInt(FIELD.OF(nameof(Density))),
- RecvPropInt(FIELD.OF(nameof(Current))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEFizz);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Entity)) { Bits = 13, Flags = PropFlags.Unsigned },
+ new(nameof(ModelIndex)) { Bits = 14 },
+ new(nameof(Density)) { Bits = 8, Flags = PropFlags.Unsigned },
+ new(nameof(Current)) { Bits = 16 },
+ ];
- [NetworkName("m_nEntity")]
+ [NetworkVar("m_nEntity")]
public int Entity;
- [NetworkName("m_nModelIndex")]
+ [NetworkVar("m_nModelIndex")]
public int ModelIndex;
- [NetworkName("m_nDensity")]
+ [NetworkVar("m_nDensity")]
public int Density;
- [NetworkName("m_nCurrent")]
+ [NetworkVar("m_nCurrent")]
public int Current;
}
diff --git a/Game.Client/C_TEFootprintDecal.cs b/Game.Client/C_TEFootprintDecal.cs
index fbaf438d..528064b1 100644
--- a/Game.Client/C_TEFootprintDecal.cs
+++ b/Game.Client/C_TEFootprintDecal.cs
@@ -3,25 +3,24 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD;
[NetworkName("CTEFootprintDecal")]
-public class C_TEFootprintDecal : C_BaseTempEntity
+public partial class C_TEFootprintDecal : C_BaseTempEntity
{
- public static readonly RecvTable DT_TEFootprintDecal = new(DT_BaseTempEntity, [
- RecvPropVector(FIELD.OF(nameof(Origin))),
- RecvPropVector(FIELD.OF(nameof(Direction))),
- RecvPropInt(FIELD.OF(nameof(Entity))),
- RecvPropInt(FIELD.OF(nameof(Index))),
- ]);
- public static readonly new ClientClass ClientClass = new ClientClass(DT_TEFootprintDecal);
+ [NetworkTable]
+ public static readonly NetworkProp[] Props = [
+ new(nameof(Origin)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Direction)) { Bits = 0, Flags = PropFlags.Coord },
+ new(nameof(Entity)) { Bits = 11, Flags = PropFlags.Unsigned },
+ new(nameof(Index)) { Bits = 8, Flags = PropFlags.Unsigned },
+ ];
- [NetworkName("m_vecOrigin")]
+ [NetworkVar("m_vecOrigin")]
public Vector3 Origin;
- [NetworkName("m_vecDirection")]
+ [NetworkVar("m_vecDirection")]
public Vector3 Direction;
- [NetworkName("m_nEntity")]
+ [NetworkVar("m_nEntity")]
public int Entity;
- [NetworkName("m_nIndex")]
+ [NetworkVar("m_nIndex")]
public int Index;
public int ChMaterialType;
}
diff --git a/Game.Client/C_TEGaussExplosion.cs b/Game.Client/C_TEGaussExplosion.cs
index 45feb065..937225f4 100644
--- a/Game.Client/C_TEGaussExplosion.cs
+++ b/Game.Client/C_TEGaussExplosion.cs
@@ -3,18 +3,17 @@
using Game.Shared;
using System.Numerics;
namespace Game.Client;
-using FIELD = FIELD