From 27d2bfc88c9de0101cf4bd5bb3d14ed4c751828a Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:09:11 -0700
Subject: [PATCH 01/15] BaseEntity OnControls/IsFollowingEntity, TRAIN_ defines
---
Game.Server/BaseEntity.cs | 4 ++++
Game.Server/FuncTrackTrain.cs | 11 ++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Game.Server/BaseEntity.cs b/Game.Server/BaseEntity.cs
index ca7a3f19a..0171714bf 100644
--- a/Game.Server/BaseEntity.cs
+++ b/Game.Server/BaseEntity.cs
@@ -2958,6 +2958,10 @@ public virtual void Use(BaseEntity? activator, BaseEntity? caller, UseType useTy
Parent.Get()?.Use(activator, caller, useType, value);
}
+ public bool IsFollowingEntity() => IsEffectActive(EntityEffects.BoneMerge) && (GetMoveType() == Source.MoveType.None) && GetMoveParent() != null;
+
+ public virtual bool OnControls(BaseEntity controls) => false;
+
public int ShouldToggle(UseType useType, int currentState) {
if (useType != UseType.Toggle && useType != UseType.Set) {
if ((currentState != 0 && useType == UseType.On) || (currentState == 0 && useType == UseType.Off))
diff --git a/Game.Server/FuncTrackTrain.cs b/Game.Server/FuncTrackTrain.cs
index b900ed367..31f6f4753 100644
--- a/Game.Server/FuncTrackTrain.cs
+++ b/Game.Server/FuncTrackTrain.cs
@@ -40,6 +40,15 @@ public class FuncTrackTrain : BaseEntity
public const int SF_TRACKTRAIN_USE_MAXSPEED_FOR_PITCH = 0x0100;
public const int SF_TRACKTRAIN_UNBLOCKABLE_BY_PLAYER = 0x0200;
+ public const int TRAIN_ACTIVE = 0x80;
+ public const int TRAIN_NEW = 0xc0;
+ public const int TRAIN_OFF = 0x00;
+ public const int TRAIN_NEUTRAL = 0x01;
+ public const int TRAIN_SLOW = 0x02;
+ public const int TRAIN_MEDIUM = 0x03;
+ public const int TRAIN_FAST = 0x04;
+ public const int TRAIN_BACK = 0x05;
+
const float TRAIN_MAXSPEED = 1000;
public static readonly SendTable DT_FuncTrackTrain = new(DT_BaseEntity, []);
@@ -890,7 +899,7 @@ public void SetControls(BaseEntity controls) {
ControlMaxs = controls.WorldAlignMaxs() + offset;
}
- public bool OnControls(BaseEntity test) {
+ public override bool OnControls(BaseEntity test) {
Vector3 offset = test.GetLocalOrigin() - GetLocalOrigin();
if ((SpawnFlags & SF_TRACKTRAIN_NOCONTROL) != 0)
From c18e88d4ea992f27f090ab7f13ecc90b253ed9fa Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:09:11 -0700
Subject: [PATCH 02/15] Player +use: FindUseEntity, PlayerUse, ItemPreFrame
---
Game.Server/Player.cs | 86 +++++++++-
Game.Shared/BasePlayerShared.cs | 279 ++++++++++++++++++++++++++++++++
2 files changed, 357 insertions(+), 8 deletions(-)
diff --git a/Game.Server/Player.cs b/Game.Server/Player.cs
index 7f99f0491..f16091140 100644
--- a/Game.Server/Player.cs
+++ b/Game.Server/Player.cs
@@ -346,7 +346,8 @@ public partial class BasePlayer : BaseCombatCharacter
public int ObserverLastMode;
public bool ForcedObserverMode;
- PlayerPhysFlag PhysicsFlags;
+ protected PlayerPhysFlag PhysicsFlags;
+ public int Train;
public void SetPhysicsFlag(PlayerPhysFlag flag, bool set) {
if (set)
@@ -1604,12 +1605,17 @@ public virtual void PostThink() {
else
SetCollisionBounds(VEC_HULL_MIN, VEC_HULL_MAX);
- // if (UseEntity.Get() != null) {
- // if (UseEntity.OnControls(this) && (!GetActiveWeapon() || GetActiveWeapon()->IsEffectActive(EF_NODRAW) || (GetActiveWeapon()->GetActivity() == ACT_VM_HOLSTER)))
- // UseEntity.Use(this, this, USE_SET, 2);
- // else
- // ClearUseEntity();
- // }
+ // Handle controlling an entity
+ if (UseEntity.Get() != null) {
+ // if they've moved too far from the gun, or deployed another weapon, unuse the gun
+ if (UseEntity.Get()!.OnControls(this) && (GetActiveWeapon() == null || GetActiveWeapon()!.IsEffectActive(EntityEffects.NoDraw) || (GetActiveWeapon()!.GetActivity() == Activity.ACT_VM_HOLSTER))) {
+ UseEntity.Get()!.Use(this, this, UseType.Set, 2); // try fire the gun
+ }
+ else {
+ // they've moved off the controls
+ ClearUseEntity();
+ }
+ }
ItemPostFrame();
@@ -1771,7 +1777,7 @@ public virtual void PreThink() {
if (g_fGameOver /*|| PlayerLocked*/)
return;
- // ItemPreFrame();
+ ItemPreFrame();
WaterMove();
// if (g_pGameRules && g_pGameRules.FAllowFlashlight())
@@ -1882,6 +1888,70 @@ internal void CommitSuicide(bool explode = false, bool force = false) {
SuicideCustomKillFlags = 0;
}
+ public static int TrainSpeed(int speed, int max) {
+ float fSpeed, fMax;
+ int ret = 0;
+
+ fMax = (float)max;
+ fSpeed = speed;
+
+ fSpeed = fSpeed / fMax;
+
+ if (speed < 0)
+ ret = FuncTrackTrain.TRAIN_BACK;
+ else if (speed == 0)
+ ret = FuncTrackTrain.TRAIN_NEUTRAL;
+ else if (fSpeed < 0.33)
+ ret = FuncTrackTrain.TRAIN_SLOW;
+ else if (fSpeed < 0.66)
+ ret = FuncTrackTrain.TRAIN_MEDIUM;
+ else
+ ret = FuncTrackTrain.TRAIN_FAST;
+
+ return ret;
+ }
+
+ public virtual void ObserverUse(bool isPressed) { }
+
+ public virtual void PlayUseDenySound() { }
+
+ public virtual void PickupObject(BaseEntity obj, bool limitMassAndSize = true) { }
+
+ ///
+ /// Return true if this object can be +used by the player
+ ///
+ public virtual bool IsUseableEntity(BaseEntity? entity, EntityCapabilities requiredCaps) {
+ if (entity != null) {
+ EntityCapabilities caps = entity.ObjectCaps();
+ if ((caps & (EntityCapabilities.ImpulseUse | EntityCapabilities.ContinuousUse | EntityCapabilities.OnOffUse | EntityCapabilities.DirectionalUse)) != 0) {
+ if ((caps & requiredCaps) == requiredCaps)
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ ///
+ /// Perhaps a poorly-named function. This function traces against the supplied
+ /// NPC's hitboxes (instead of hull). If the trace hits a different NPC, the
+ /// new NPC is selected. Otherwise, the supplied NPC is determined to be the
+ /// one the citizen wants. This function allows the selection of a citizen over
+ /// another citizen's shoulder, which is impossible without tracing against
+ /// hitboxes instead of the hull (sjb)
+ ///
+ public BaseEntity? DoubleCheckUseNPC(BaseEntity? npc, in Vector3 src, in Vector3 dir) {
+ Util.TraceLine(src, src + dir * 1024, Mask.Shot, this, Source.CollisionGroup.None, out Trace tr);
+
+ if (tr.Ent != null && tr.Ent.MyNPCPointer() != null && tr.Ent != npc) {
+ // Player is selecting a different NPC through some negative space
+ // in the first NPC's hitboxes (between legs, over shoulder, etc).
+ return tr.Ent;
+ }
+
+ return npc;
+ }
+
public bool ClearUseEntity() {
if (UseEntity.Get() != null) {
// Stop controlling the train/object
diff --git a/Game.Shared/BasePlayerShared.cs b/Game.Shared/BasePlayerShared.cs
index 2250dfeaf..8f2bd4371 100644
--- a/Game.Shared/BasePlayerShared.cs
+++ b/Game.Shared/BasePlayerShared.cs
@@ -54,6 +54,24 @@ public static class BasePlayerGlobals
public const TimeUnit_t DEATH_ANIMATION_TIME = 3.0f;
+ // PlayerUse defines
+ public const float PLAYER_USE_RADIUS = 80.0f;
+
+ public static float IntervalDistance(float x, float x0, float x1) {
+ // swap so x0 < x1
+ if (x0 > x1) {
+ float tmp = x0;
+ x0 = x1;
+ x1 = tmp;
+ }
+
+ if (x < x0)
+ return x0 - x;
+ else if (x > x1)
+ return x - x1;
+ return 0;
+ }
+
public static void CopySoundNameWithModifierToken(Span dest, ReadOnlySpan source, int maxLenInChars, ReadOnlySpan token) {
source = source.SliceNullTerminatedString();
token = token.SliceNullTerminatedString();
@@ -657,6 +675,267 @@ Vector3 GetPlayerMaxs() {
}
+#if !CLIENT_DLL
+ ///
+ /// Called every usercmd by the player PreThink
+ ///
+ public virtual void ItemPreFrame() {
+ // Handle use events
+ PlayerUse();
+
+ BaseCombatWeapon? active = GetActiveWeapon();
+
+ // Allow all the holstered weapons to update
+ for (int i = 0; i < WeaponCount(); ++i) {
+ BaseCombatWeapon? weapon = GetWeapon(i);
+
+ if (weapon == null)
+ continue;
+
+ if (active == weapon)
+ continue;
+
+ weapon.ItemHolsterFrame();
+ }
+
+ if (gpGlobals.CurTime < NextAttack)
+ return;
+
+ if (active == null)
+ return;
+
+ active.ItemPreFrame();
+ }
+
+ static readonly ConVar sv_debug_player_use = new("sv_debug_player_use", "0", FCvar.Replicated, "Visualizes +use logic. Green cross=trace success, Red cross=trace too far, Green box=radius success");
+
+ const int NUM_TANGENTS = 8;
+ // trace a box at successive angles down
+ // forward, 45 deg, 30 deg, 20 deg, 15 deg, 10 deg, -10, -15
+ static readonly float[] tangents = [0, 1, 0.57735026919f, 0.3639702342f, 0.267949192431f, 0.1763269807f, -0.1763269807f, -0.267949192431f];
+
+ public virtual BaseEntity? FindUseEntity() {
+ EyeVectors(out Vector3 forward, out _, out Vector3 up);
+
+ Trace tr = default;
+ // Search for objects in a sphere (tests for entities that are not solid, yet still useable)
+ Vector3 searchCenter = EyePosition();
+
+ // NOTE: Some debris objects are useable too, so hit those as well
+ // A button, etc. can be made out of clip brushes, make sure it's +useable via a traceline, too.
+ Mask useableContents = Mask.Solid | (Mask)Contents.Debris | (Mask)Contents.PlayerClip;
+
+ BaseEntity? foundByTrace = null;
+
+ // UNDONE: Might be faster to just fold this range into the sphere query
+ BaseEntity? obj = null;
+
+ float nearestDist = float.MaxValue;
+ // try the hit entity if there is one, or the ground entity if there isn't.
+ BaseEntity? nearest = null;
+
+ for (int i = 0; i < NUM_TANGENTS; i++) {
+ if (i == 0) {
+ Util.TraceLine(searchCenter, searchCenter + forward * 1024, useableContents, this, Source.CollisionGroup.None, out tr);
+ }
+ else {
+ Vector3 down = forward - tangents[i] * up;
+ MathLib.VectorNormalize(ref down);
+ Util.TraceHull(searchCenter, searchCenter + down * 72, -new Vector3(16, 16, 16), new Vector3(16, 16, 16), useableContents, this, Source.CollisionGroup.None, out tr);
+ }
+ obj = tr.Ent;
+
+ foundByTrace = obj;
+
+ bool usable = IsUseableEntity(obj, 0);
+ while (obj != null && !usable && obj.GetMoveParent() != null) {
+ obj = obj.GetMoveParent();
+ usable = IsUseableEntity(obj, 0);
+ }
+
+ if (usable) {
+ Vector3 delta = tr.EndPos - tr.StartPos;
+ float centerZ = CollisionProp().WorldSpaceCenter().Z;
+ delta.Z = IntervalDistance(tr.EndPos.Z, centerZ + CollisionProp().OBBMins().Z, centerZ + CollisionProp().OBBMaxs().Z);
+ float dist = delta.Length();
+ if (dist < PLAYER_USE_RADIUS) {
+ if (sv_debug_player_use.GetBool()) {
+ DebugOverlay.Line(searchCenter, tr.EndPos, 0, 255, 0, true, 30);
+ DebugOverlay.Cross3D(tr.EndPos, 16, 0, 255, 0, true, 30);
+ }
+
+ if (obj!.MyNPCPointer() != null && obj.MyNPCPointer()!.IsPlayerAlly(this)) {
+ // If about to select an NPC, do a more thorough check to ensure
+ // that we're selecting the right one from a group.
+ obj = DoubleCheckUseNPC(obj, searchCenter, forward);
+ }
+
+ if (sv_debug_player_use.GetBool())
+ Msg($"Trace using: {(obj != null ? obj.GetDebugName() : "no usable entity found")}\n");
+
+ nearest = obj;
+
+ // if this is directly under the cursor just return it now
+ if (i == 0)
+ return obj;
+ }
+ }
+ }
+
+ // check ground entity first
+ // if you've got a useable ground entity, then shrink the cone of this search to 45 degrees
+ // otherwise, search out in a 90 degree cone (hemisphere)
+ if (GetGroundEntity() != null && IsUseableEntity(GetGroundEntity(), EntityCapabilities.UseOnGround))
+ nearest = GetGroundEntity();
+
+ if (nearest != null) {
+ // estimate nearest object by distance from the view vector
+ nearest.CollisionProp().CalcNearestPoint(searchCenter, out Vector3 point);
+ nearestDist = MathLib.CalcDistanceToLine(point, searchCenter, forward, out _);
+ if (sv_debug_player_use.GetBool())
+ Msg($"Trace found {nearest.GetClassname()}, dist {nearestDist:F2}\n");
+ }
+
+ for (EntitySphereQuery sphere = new(searchCenter, PLAYER_USE_RADIUS); (obj = sphere.GetCurrentEntity()) != null; sphere.NextEntity()) {
+ if (obj == null)
+ continue;
+
+ if (!IsUseableEntity(obj, EntityCapabilities.UseInRadius))
+ continue;
+
+ // see if it's more roughly in front of the player than previous guess
+ obj.CollisionProp().CalcNearestPoint(searchCenter, out Vector3 point);
+
+ Vector3 dir = point - searchCenter;
+ MathLib.VectorNormalize(ref dir);
+ float dot = Vector3.Dot(dir, forward);
+
+ // Need to be looking at the object more or less
+ if (dot < 0.8)
+ continue;
+
+ float dist = MathLib.CalcDistanceToLine(point, searchCenter, forward, out _);
+
+ if (sv_debug_player_use.GetBool())
+ Msg($"Radius found {obj.GetClassname()}, dist {dist:F2}\n");
+
+ if (dist < nearestDist) {
+ // Since this has purely been a radius search to this point, we now
+ // make sure the object isn't behind glass or a grate.
+ Util.TraceLine(searchCenter, point, useableContents, this, Source.CollisionGroup.None, out Trace trCheckOccluded);
+
+ if (trCheckOccluded.Fraction == 1.0 || trCheckOccluded.Ent == obj) {
+ nearest = obj;
+ nearestDist = dist;
+ }
+ }
+ }
+
+ if (nearest == null) {
+ // Haven't found anything near the player to use, nor any NPC's at distance.
+ // Check to see if the player is trying to select an NPC through a rail, fence, or other 'see-though' volume.
+ Util.TraceLine(searchCenter, searchCenter + forward * PLAYER_USE_RADIUS, Mask.OpaqueAndNPCs, this, Source.CollisionGroup.None, out Trace trAllies);
+
+ if (trAllies.Ent != null && IsUseableEntity(trAllies.Ent, 0) && trAllies.Ent.MyNPCPointer() != null && trAllies.Ent.MyNPCPointer()!.IsPlayerAlly(this)) {
+ // This is an NPC, take it!
+ nearest = trAllies.Ent;
+ }
+ }
+
+ if (nearest != null && nearest.MyNPCPointer() != null && nearest.MyNPCPointer()!.IsPlayerAlly(this))
+ nearest = DoubleCheckUseNPC(nearest, searchCenter, forward);
+
+ if (sv_debug_player_use.GetBool()) {
+ if (nearest == null) {
+ DebugOverlay.Line(searchCenter, tr.EndPos, 255, 0, 0, true, 30);
+ DebugOverlay.Cross3D(tr.EndPos, 16, 255, 0, 0, true, 30);
+ }
+ else if (nearest == foundByTrace) {
+ DebugOverlay.Line(searchCenter, tr.EndPos, 0, 255, 0, true, 30);
+ DebugOverlay.Cross3D(tr.EndPos, 16, 0, 255, 0, true, 30);
+ }
+ else {
+ DebugOverlay.Box(nearest.WorldSpaceCenter(), new Vector3(-8, -8, -8), new Vector3(8, 8, 8), 0, 255, 0, 1, 30);
+ }
+ }
+
+ if (sv_debug_player_use.GetBool())
+ Msg($"Radial using: {(nearest != null ? nearest.GetDebugName() : "no usable entity found")}\n");
+
+ return nearest;
+ }
+
+ ///
+ /// Handles USE keypress
+ ///
+ public virtual void PlayerUse() {
+ // Was use pressed or released?
+ if (((Buttons | AfButtonPressed | AfButtonReleased) & InButtons.Use) == 0)
+ return;
+
+ if (IsObserver()) {
+ // do special use operation in oberserver mode
+ if ((AfButtonPressed & InButtons.Use) != 0)
+ ObserverUse(true);
+ else if ((AfButtonReleased & InButtons.Use) != 0)
+ ObserverUse(false);
+
+ return;
+ }
+
+ if ((AfButtonPressed & InButtons.Use) != 0) {
+ // Controlling some latched entity?
+ if (ClearUseEntity()) {
+ return;
+ }
+ else {
+ if ((PhysicsFlags & PlayerPhysFlag.DirOverride) != 0) {
+ PhysicsFlags &= ~PlayerPhysFlag.DirOverride;
+ Train = FuncTrackTrain.TRAIN_NEW | FuncTrackTrain.TRAIN_OFF;
+ return;
+ }
+ else { // Start controlling the train!
+ BaseEntity? train = GetGroundEntity();
+ if (train != null && (Buttons & InButtons.Jump) == 0 && (GetFlags() & EntityFlags.OnGround) != 0 && (train.ObjectCaps() & EntityCapabilities.DirectionalUse) != 0 && train.OnControls(this)) {
+ PhysicsFlags |= PlayerPhysFlag.DirOverride;
+ Train = TrainSpeed((int)train.Speed, (int)((FuncTrackTrain)train).GetMaxSpeed());
+ Train |= FuncTrackTrain.TRAIN_NEW;
+ EmitSound("Player.UseTrain");
+ return;
+ }
+ }
+ }
+ }
+
+ BaseEntity? useEntity = FindUseEntity();
+
+ // Found an object
+ if (useEntity != null) {
+
+ //!!!UNDONE: traceline here to prevent +USEing buttons through walls
+
+ EntityCapabilities caps = useEntity.ObjectCaps();
+ Variant_t emptyVariant = default;
+ if (((Buttons & InButtons.Use) != 0 && (caps & EntityCapabilities.ContinuousUse) != 0) || ((AfButtonPressed & InButtons.Use) != 0 && (caps & (EntityCapabilities.ImpulseUse | EntityCapabilities.OnOffUse)) != 0)) {
+ if ((caps & EntityCapabilities.ContinuousUse) != 0)
+ PhysicsFlags |= PlayerPhysFlag.Using;
+
+ if ((useEntity.ObjectCaps() & EntityCapabilities.OnOffUse) != 0)
+ useEntity.AcceptInput("Use", this, this, emptyVariant, (int)UseType.On);
+ else
+ useEntity.AcceptInput("Use", this, this, emptyVariant, (int)UseType.Toggle);
+ }
+ // UNDONE: Send different USE codes for ON/OFF. Cache last ONOFF_USE object to send 'off' if you turn away
+ else if ((AfButtonReleased & InButtons.Use) != 0 && (useEntity.ObjectCaps() & EntityCapabilities.OnOffUse) != 0) { // BUGBUG This is an "off" use
+ useEntity.AcceptInput("Use", this, this, emptyVariant, (int)UseType.Off);
+ }
+ }
+ else if ((AfButtonPressed & InButtons.Use) != 0) {
+ PlayUseDenySound();
+ }
+ }
+#endif
+
public void ViewPunch(in QAngle angleOffset) {
//See if we're suppressing the view punching
if (sv_suppress_viewpunch.GetBool())
From 66fc3adced4f913334ee685f5929963b6cdab0e5 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:09:11 -0700
Subject: [PATCH 03/15] HL2_Player PlayerUse + use deny sound
---
Game.Server/HL2/HL2_Player.cs | 127 +++++++++++++++++++++++++++++-
Game.Server/HL2MP/HL2MP_Player.cs | 4 +-
2 files changed, 125 insertions(+), 6 deletions(-)
diff --git a/Game.Server/HL2/HL2_Player.cs b/Game.Server/HL2/HL2_Player.cs
index 31dc2f31c..dee350835 100644
--- a/Game.Server/HL2/HL2_Player.cs
+++ b/Game.Server/HL2/HL2_Player.cs
@@ -36,6 +36,9 @@ public class HL2_Player : BaseMultiplayerPlayer
TimeUnit_t MoveTime;
TimeUnit_t LastDamageTime;
TimeUnit_t TargetFindTime;
+ TimeUnit_t TimeUseSuspended;
+
+ public virtual void SuspendUse(TimeUnit_t duration) { TimeUseSuspended = gpGlobals.CurTime + duration; }
bool SprintEnabled;
@@ -391,7 +394,111 @@ bool ClientCommand(in TokenizedCommand args) {
throw new NotImplementedException();
}
- void PlayerUse() { }
+ public override void PlayerUse() {
+ // Was use pressed or released?
+ if (((Buttons | AfButtonPressed | AfButtonReleased) & InButtons.Use) == 0)
+ return;
+
+ if ((AfButtonPressed & InButtons.Use) != 0) {
+ // Currently using a latched entity?
+ if (ClearUseEntity()) {
+ return;
+ }
+ else {
+ if ((PhysicsFlags & PlayerPhysFlag.DirOverride) != 0) {
+ PhysicsFlags &= ~PlayerPhysFlag.DirOverride;
+ Train = FuncTrackTrain.TRAIN_NEW | FuncTrackTrain.TRAIN_OFF;
+ return;
+ }
+ else { // Start controlling the train!
+ BaseEntity? train = GetGroundEntity();
+ if (train != null && (Buttons & InButtons.Jump) == 0 && (GetFlags() & EntityFlags.OnGround) != 0 && (train.ObjectCaps() & EntityCapabilities.DirectionalUse) != 0 && train.OnControls(this)) {
+ PhysicsFlags |= PlayerPhysFlag.DirOverride;
+ Train = TrainSpeed((int)train.Speed, (int)((FuncTrackTrain)train).GetMaxSpeed());
+ Train |= FuncTrackTrain.TRAIN_NEW;
+ EmitSound("HL2Player.TrainUse");
+ return;
+ }
+ }
+ }
+
+ // Tracker 3926: We can't +USE something if we're climbing a ladder
+ if (GetMoveType() == Source.MoveType.Ladder)
+ return;
+ }
+
+ if (TimeUseSuspended > gpGlobals.CurTime) {
+ // Something has temporarily stopped us being able to USE things.
+ // Obviously, this should be used very carefully.(sjb)
+ return;
+ }
+
+ BaseEntity? useEntity = FindUseEntity();
+
+ bool usedSomething = false;
+
+ // Found an object
+ if (useEntity != null) {
+ //!!!UNDONE: traceline here to prevent +USEing buttons through walls
+ EntityCapabilities caps = useEntity.ObjectCaps();
+ Variant_t emptyVariant = default;
+
+ if ((AfButtonPressed & InButtons.Use) != 0) {
+ // Robin: Don't play sounds for NPCs, because NPCs will allow respond with speech.
+ if (useEntity.MyNPCPointer() == null)
+ EmitSound("HL2Player.Use");
+ }
+
+ if (((Buttons & InButtons.Use) != 0 && (caps & EntityCapabilities.ContinuousUse) != 0) ||
+ ((AfButtonPressed & InButtons.Use) != 0 && (caps & (EntityCapabilities.ImpulseUse | EntityCapabilities.OnOffUse)) != 0)) {
+ if ((caps & EntityCapabilities.ContinuousUse) != 0)
+ PhysicsFlags |= PlayerPhysFlag.Using;
+
+ useEntity.AcceptInput("Use", this, this, emptyVariant, (int)UseType.Toggle);
+
+ usedSomething = true;
+ }
+ // UNDONE: Send different USE codes for ON/OFF. Cache last ONOFF_USE object to send 'off' if you turn away
+ else if ((AfButtonReleased & InButtons.Use) != 0 && (useEntity.ObjectCaps() & EntityCapabilities.OnOffUse) != 0) { // BUGBUG This is an "off" use
+ useEntity.AcceptInput("Use", this, this, emptyVariant, (int)UseType.Toggle);
+
+ usedSomething = true;
+ }
+
+#if HL2_SINGLE_PRIMARY_WEAPON_MODE
+
+ //Check for weapon pick-up
+ if ((AfButtonPressed & InButtons.Use) != 0) {
+ BaseCombatWeapon? weapon = useEntity as BaseCombatWeapon;
+
+ if ((weapon != null) && (Weapon_CanSwitchTo(weapon))) {
+ //Try to take ammo or swap the weapon
+ if (Weapon_OwnsThisType(weapon.GetClassname(), weapon.GetSubType()) != null) {
+ Weapon_EquipAmmoOnly(weapon);
+ }
+ else {
+ Weapon_DropSlot(weapon.GetSlot());
+ Weapon_Equip(weapon);
+ }
+
+ usedSomething = true;
+ }
+ }
+#endif
+ }
+ else if ((AfButtonPressed & InButtons.Use) != 0) {
+ // Signal that we want to play the deny sound, unless the user is +USEing on a ladder!
+ // The sound is emitted in ItemPostFrame, since that occurs after GameMovement::ProcessMove which
+ // lets the ladder code unset this flag.
+ m_bPlayUseDenySound = true;
+ }
+
+ // Debounce the use key
+ if (usedSomething && useEntity != null) {
+ Local.OldButtons |= (int)InButtons.Use;
+ AfButtonPressed &= ~InButtons.Use;
+ }
+ }
void UpdateWeaponPosture() { }
@@ -407,7 +514,7 @@ bool Weapon_CanSwitchTo(BaseCombatWeapon weapon) {
throw new NotImplementedException();
}
- void PickupObject(BaseEntity Object, bool limitMassAndSize) { }
+ public override void PickupObject(BaseEntity Object, bool limitMassAndSize = true) { }
bool IsHoldingEntity(BaseEntity ent) {
throw new NotImplementedException();
@@ -461,9 +568,21 @@ SurfaceData GetLadderSurface(Vector3 origin) {
throw new NotImplementedException();
}
- void PlayUseDenySound() { }
+ ///
+ /// Queues up a use deny sound, played in ItemPostFrame.
+ ///
+ public override void PlayUseDenySound() {
+ m_bPlayUseDenySound = true;
+ }
- void ItemPostFrame() { }
+ public override void ItemPostFrame() {
+ base.ItemPostFrame();
+
+ if (m_bPlayUseDenySound) {
+ m_bPlayUseDenySound = false;
+ EmitSound("HL2Player.UseDeny");
+ }
+ }
void StartWaterDeathSounds() { }
diff --git a/Game.Server/HL2MP/HL2MP_Player.cs b/Game.Server/HL2MP/HL2MP_Player.cs
index 88a2b8a0f..ed98ea213 100644
--- a/Game.Server/HL2MP/HL2MP_Player.cs
+++ b/Game.Server/HL2MP/HL2MP_Player.cs
@@ -213,8 +213,8 @@ public override void Spawn() {
// Ready = true;
}
- void PickupObject(BaseEntity obj, bool limitMassAndSize) {
- throw new NotImplementedException();
+ public override void PickupObject(BaseEntity obj, bool limitMassAndSize = true) {
+
}
bool ValidatePlayerModel(ReadOnlySpan model) {
From 4fe551fefb92502af0acd4a32bdaccbe141053cb Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:09:11 -0700
Subject: [PATCH 04/15] Weapon/item ObjectCaps and Use
---
Game.Server/BaseCombatWeapon.cs | 26 ++++++++++++++++++++++++++
Game.Server/Items.cs | 11 +++++++++++
2 files changed, 37 insertions(+)
diff --git a/Game.Server/BaseCombatWeapon.cs b/Game.Server/BaseCombatWeapon.cs
index b6e692c3a..cb8da7d66 100644
--- a/Game.Server/BaseCombatWeapon.cs
+++ b/Game.Server/BaseCombatWeapon.cs
@@ -16,11 +16,13 @@ public partial class BaseCombatWeapon : BaseAnimating
{
public static readonly ConVar weapon_showproficiency = new("weapon_showproficiency", "0");
+ public OutputEvent OnPlayerUse = new();
public OutputEvent OnPlayerPickup = new();
public OutputEvent OnNPCPickup = new();
public OutputEvent OnCacheInteraction = new();
public static readonly new DataMap DataDesc = new(typeof(BaseCombatWeapon), BaseEntity.DataDesc, [
+ DEFINE.OUTPUT(nameof(OnPlayerUse), "OnPlayerUse", eventFuncs),
DEFINE.OUTPUT(nameof(OnPlayerPickup), "OnPlayerPickup", eventFuncs),
DEFINE.OUTPUT(nameof(OnNPCPickup), "OnNPCPickup", eventFuncs),
DEFINE.OUTPUT(nameof(OnCacheInteraction), "OnCacheInteraction", eventFuncs),
@@ -67,6 +69,30 @@ public static int GetAvailableWeaponsInBox(Span list, in Vect
return count;
}
+ public override EntityCapabilities ObjectCaps() {
+ EntityCapabilities caps = base.ObjectCaps();
+ if (!IsFollowingEntity() && !HasSpawnFlags(SF_WEAPON_NO_PLAYER_PICKUP))
+ caps |= EntityCapabilities.ImpulseUse;
+
+ return caps;
+ }
+
+ public override void Use(BaseEntity? activator, BaseEntity? caller, UseType useType, float value) {
+ BasePlayer? player = ToBasePlayer(activator);
+
+ if (player != null) {
+ OnPlayerUse.FireOutput(activator, caller);
+
+ // Bump the weapon to try equipping it before picking it up physically. This is
+ // important in a few spots in the game where the player could potentially +use pickup
+ // and then THROW AWAY a vital weapon, rendering them unable to continue the game.
+ if (player.BumpWeapon(this))
+ OnPickedUp(player);
+ else
+ player.PickupObject(this);
+ }
+ }
+
public bool IsConstrained() => false;
public override bool IsWeapon() => true;
diff --git a/Game.Server/Items.cs b/Game.Server/Items.cs
index c2849a3b8..e84593fa5 100644
--- a/Game.Server/Items.cs
+++ b/Game.Server/Items.cs
@@ -1,5 +1,7 @@
global using static Game.Server.ItemConstants;
+using Game.Shared;
+
using Source.Common.Mathematics;
using Source.Common.Physics;
@@ -44,6 +46,15 @@ public class Item : BaseAnimating, IPlayerPickupVPhysics
public QAngle PreferredCarryAngles() => ((IPlayerPickupVPhysics)pickup).PreferredCarryAngles();
public bool ShouldPuntUseLaunchForces(PhysGunForce reason) => ((IPlayerPickupVPhysics)pickup).ShouldPuntUseLaunchForces(reason);
+ public override EntityCapabilities ObjectCaps() => base.ObjectCaps() | EntityCapabilities.ImpulseUse | EntityCapabilities.WCEditPosition;
+
+ public override void Use(BaseEntity? activator, BaseEntity? caller, UseType useType, float value) {
+ BasePlayer? player = ToBasePlayer(activator);
+
+ if (player != null)
+ player.PickupObject(this);
+ }
+
// todoOutputEvent OnPlayerTouch;
// todoOutputEvent OnCacheInteraction;
From 32d8c121189b411e0e27f0ba224c82e11a73568e Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:09:11 -0700
Subject: [PATCH 05/15] NPC ObjectCaps
---
Game.Server/AI_BaseNPC.cs | 8 ++++++++
Game.Server/AI_PlayerAlly.cs | 2 ++
2 files changed, 10 insertions(+)
diff --git a/Game.Server/AI_BaseNPC.cs b/Game.Server/AI_BaseNPC.cs
index 90819be39..83b0f1115 100644
--- a/Game.Server/AI_BaseNPC.cs
+++ b/Game.Server/AI_BaseNPC.cs
@@ -5584,6 +5584,14 @@ public virtual Capability CapabilitiesGet() {
return capability;
}
+ public EntityCapabilities UsableNPCObjectCaps(EntityCapabilities baseCaps) {
+ if (IsAlive())
+ baseCaps |= EntityCapabilities.ImpulseUse;
+ return baseCaps;
+ }
+
+ public override EntityCapabilities ObjectCaps() => base.ObjectCaps() | EntityCapabilities.NotifyOnTransition;
+
public void NPCUse(BaseEntity? activator, BaseEntity? caller, UseType useType, float value) {
return;
}
diff --git a/Game.Server/AI_PlayerAlly.cs b/Game.Server/AI_PlayerAlly.cs
index bdedf2799..8476658d2 100644
--- a/Game.Server/AI_PlayerAlly.cs
+++ b/Game.Server/AI_PlayerAlly.cs
@@ -3,4 +3,6 @@ namespace Game.Server;
public class AI_PlayerAlly : AI_BaseActor
{
public override int SelectSchedule() => throw new NotImplementedException();
+
+ public override EntityCapabilities ObjectCaps() => UsableNPCObjectCaps(base.ObjectCaps());
}
From e2d8cc6ff3bacce99606b28c73f05005e8809a55 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:09:12 -0700
Subject: [PATCH 06/15] Regenerate entities checklist
---
ENTITIES_COMPLETED.md | 1246 ++++++++++++++++++++---------------------
1 file changed, 623 insertions(+), 623 deletions(-)
diff --git a/ENTITIES_COMPLETED.md b/ENTITIES_COMPLETED.md
index dee56b34d..57be838e5 100644
--- a/ENTITIES_COMPLETED.md
+++ b/ENTITIES_COMPLETED.md
@@ -12,31 +12,29 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
## Progress
-`█░░░░░░░░░░░░░░░░░░░` **32 / 788 classnames complete (4.1%)**
+`█░░░░░░░░░░░░░░░░░░░` **51 / 788 classnames complete (6.5%)**
-`███░░░░░░░░░░░░░░░░░` **2,215 / 15,450 boxes checked (14.3%)**
+`████░░░░░░░░░░░░░░░░` **2,744 / 15,450 boxes checked (17.8%)**
-- 240 / 691 GMod C++ classes have a C# class (34.7%)
+- 259 / 691 GMod C++ classes have a C# class (37.5%)
- 1 / 49 base classes complete
-- 488 classnames have no boxes checked
+- 469 classnames have no boxes checked
| Kind | Checked | Total | Done |
| ------------------------- | ------: | -----: | -----: |
-| Linked | 298 | 788 | 37.8% |
+| Linked | 318 | 788 | 40.4% |
| Networked | 244 | 244 | 100.0% |
-| KeyValues | 101 | 1,590 | 6.4% |
-| Inputs | 102 | 1,382 | 7.4% |
-| Outputs | 53 | 543 | 9.8% |
-| Think/Touch/Use functions | 20 | 409 | 4.9% |
-| Methods | 1,397 | 10,494 | 13.3% |
+| KeyValues | 227 | 1,590 | 14.3% |
+| Inputs | 176 | 1,382 | 12.7% |
+| Outputs | 107 | 543 | 19.7% |
+| Think/Touch/Use functions | 32 | 409 | 7.8% |
+| Methods | 1,640 | 10,494 | 15.6% |
### Closest to done
| Entry | Checked | Done | Left |
| -------------- | ------: | ----: | ---: |
-| script_intro | 19/20 | 95.0% | 1 |
-| path_track | 38/40 | 95.0% | 2 |
-| CBaseTrigger | 33/35 | 94.3% | 2 |
+| CBaseTrigger | 34/35 | 97.1% | 1 |
| trigger_hurt | 16/17 | 94.1% | 1 |
| scripted_scene | 124/133 | 93.2% | 9 |
| logic_auto | 11/12 | 91.7% | 1 |
@@ -44,20 +42,22 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
| CBaseFlex | 44/49 | 89.8% | 5 |
| soundent | 17/19 | 89.5% | 2 |
| npc_gman | 8/9 | 88.9% | 1 |
+| weapon_physgun | 22/25 | 88.0% | 3 |
+| generic_actor | 7/8 | 87.5% | 1 |
### Most work left
| Entry | Checked | Done | Left |
| -------------------- | ------: | ----: | ---: |
-| CAI_BaseNPC | 199/578 | 34.4% | 379 |
-| CBaseEntity | 298/535 | 55.7% | 237 |
-| CBasePlayer | 132/324 | 40.7% | 192 |
+| CAI_BaseNPC | 209/578 | 36.2% | 369 |
+| CBaseEntity | 314/535 | 58.7% | 221 |
+| CBasePlayer | 145/324 | 44.8% | 179 |
| npc_strider | 2/157 | 1.3% | 155 |
-| npc_metropolice | 0/150 | 0.0% | 150 |
| npc_hunter | 0/142 | 0.0% | 142 |
+| npc_metropolice | 13/150 | 8.7% | 137 |
| CNPC_PlayerCompanion | 0/135 | 0.0% | 135 |
| npc_helicopter | 0/135 | 0.0% | 135 |
-| CBaseAnimating | 51/185 | 27.6% | 134 |
+| CBaseAnimating | 54/185 | 29.2% | 131 |
| npc_citizen | 0/125 | 0.0% | 125 |
### By family (5+ classnames)
@@ -65,25 +65,25 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
| Family | Complete | Boxes checked | Done |
| --------- | -------: | ------------: | ----: |
| filter_* | 6/11 | 30/54 | 55.6% |
+| logic_* | 10/23 | 177/320 | 55.3% |
| trigger_* | 11/34 | 104/286 | 36.4% |
| cycler_* | 1/6 | 7/25 | 28.0% |
+| weapon_* | 0/37 | 162/737 | 22.0% |
+| func_* | 4/69 | 199/942 | 21.1% |
| light_* | 0/6 | 7/36 | 19.4% |
-| weapon_* | 0/37 | 139/737 | 18.9% |
-| env_* | 4/82 | 140/956 | 14.6% |
-| func_* | 4/69 | 131/942 | 13.9% |
+| env_* | 6/82 | 179/956 | 18.7% |
+| ai_* | 1/24 | 58/391 | 14.8% |
+| player_* | 0/6 | 12/91 | 13.2% |
+| prop_* | 0/50 | 86/793 | 10.8% |
| info_* | 0/40 | 26/245 | 10.6% |
-| prop_* | 0/50 | 82/793 | 10.3% |
-| player_* | 0/6 | 8/91 | 8.8% |
-| logic_* | 1/23 | 26/320 | 8.1% |
| point_* | 0/29 | 29/432 | 6.7% |
| physics_* | 0/5 | 4/62 | 6.5% |
| sent_* | 0/6 | 8/192 | 4.2% |
| phys_* | 0/17 | 4/186 | 2.2% |
| game_* | 0/11 | 2/103 | 1.9% |
| grenade_* | 0/10 | 2/106 | 1.9% |
-| npc_* | 0/97 | 34/3,210 | 1.1% |
+| npc_* | 1/97 | 54/3,210 | 1.7% |
| item_* | 0/37 | 2/197 | 1.0% |
-| ai_* | 0/24 | 2/391 | 0.5% |
| ammo_* | 0/13 | 0/43 | 0.0% |
| monster_* | 0/41 | 0/739 | 0.0% |
| xen_* | 0/8 | 0/32 | 0.0% |
@@ -509,68 +509,68 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `SetActive`
- [ ] `Spawn`
- [ ] `UpdateOnRemove`
-- [ ] **ai_script_conditions** · `CAI_ScriptConditions` · `game/server/ai_scriptconditions.cpp` · C#: *none*
- - [ ] Linked (`ai_script_conditions`)
+- [x] **ai_script_conditions** · `CAI_ScriptConditions` · `game/server/ai_scriptconditions.cpp` · C# `AI_ScriptConditions` ([Game.Server/AI_ScriptConditions.cs](Game.Server/AI_ScriptConditions.cs))
+ - [x] Linked (`ai_script_conditions`)
- KeyValues
- - [ ] `StartDisabled`
- - [ ] `Actor`
- - [ ] `RequiredTime`
- - [ ] `MinimumState`
- - [ ] `MaximumState`
- - [ ] `ScriptStatus`
- - [ ] `ActorSeePlayer`
- - [ ] `PlayerActorProximity`
- - [ ] `PlayerActorFOV`
- - [ ] `PlayerActorFOVTrueCone`
- - [ ] `PlayerActorLOS`
- - [ ] `ActorSeeTarget`
- - [ ] `ActorTargetProximity`
- - [ ] `PlayerTargetProximity`
- - [ ] `PlayerTargetFOV`
- - [ ] `PlayerTargetFOVTrueCone`
- - [ ] `PlayerTargetLOS`
- - [ ] `PlayerBlockingActor`
- - [ ] `MinTimeout`
- - [ ] `MaxTimeout`
- - [ ] `ActorInPVS`
- - [ ] `ActorInVehicle`
- - [ ] `PlayerInVehicle`
+ - [x] `StartDisabled`
+ - [x] `Actor`
+ - [x] `RequiredTime`
+ - [x] `MinimumState`
+ - [x] `MaximumState`
+ - [x] `ScriptStatus`
+ - [x] `ActorSeePlayer`
+ - [x] `PlayerActorProximity`
+ - [x] `PlayerActorFOV`
+ - [x] `PlayerActorFOVTrueCone`
+ - [x] `PlayerActorLOS`
+ - [x] `ActorSeeTarget`
+ - [x] `ActorTargetProximity`
+ - [x] `PlayerTargetProximity`
+ - [x] `PlayerTargetFOV`
+ - [x] `PlayerTargetFOVTrueCone`
+ - [x] `PlayerTargetLOS`
+ - [x] `PlayerBlockingActor`
+ - [x] `MinTimeout`
+ - [x] `MaxTimeout`
+ - [x] `ActorInPVS`
+ - [x] `ActorInVehicle`
+ - [x] `PlayerInVehicle`
- Inputs
- - [ ] `Enable`
- - [ ] `Disable`
+ - [x] `Enable`
+ - [x] `Disable`
- Outputs
- - [ ] `OnConditionsSatisfied`
- - [ ] `OnConditionsTimeout`
- - [ ] `NoValidActors`
+ - [x] `OnConditionsSatisfied`
+ - [x] `OnConditionsTimeout`
+ - [x] `NoValidActors`
- Think/Touch/Use functions
- - [ ] `EvaluationThink`
+ - [x] `EvaluationThink`
- Methods
- - [ ] `Activate`
- - [ ] `ActorInList`
- - [ ] `ActorInPlayersPVS`
- - [ ] `AddNewElement`
- - [ ] `Disable`
- - [ ] `Enable`
- - [ ] `EvalActorInPVS`
- - [ ] `EvalActorInVehicle`
- - [ ] `EvalActorSeePlayer`
- - [ ] `EvalActorSeeTarget`
- - [ ] `EvalActorTargetProximity`
- - [ ] `EvalPlayerActorLOS`
- - [ ] `EvalPlayerActorLook`
- - [ ] `EvalPlayerActorProximity`
- - [ ] `EvalPlayerBlockingActor`
- - [ ] `EvalPlayerInVehicle`
- - [ ] `EvalPlayerTargetLOS`
- - [ ] `EvalPlayerTargetLook`
- - [ ] `EvalPlayerTargetProximity`
- - [ ] `EvalState`
- - [ ] `IsInFOV`
- - [ ] `OnEntitySpawned`
- - [ ] `OnRestore`
- - [ ] `PlayerHasLineOfSight`
- - [ ] `Spawn`
- - [ ] `UpdateOnRemove`
+ - [x] `Activate`
+ - [x] `ActorInList`
+ - [x] `ActorInPlayersPVS`
+ - [x] `AddNewElement`
+ - [x] `Disable`
+ - [x] `Enable`
+ - [x] `EvalActorInPVS`
+ - [x] `EvalActorInVehicle`
+ - [x] `EvalActorSeePlayer`
+ - [x] `EvalActorSeeTarget`
+ - [x] `EvalActorTargetProximity`
+ - [x] `EvalPlayerActorLOS`
+ - [x] `EvalPlayerActorLook`
+ - [x] `EvalPlayerActorProximity`
+ - [x] `EvalPlayerBlockingActor`
+ - [x] `EvalPlayerInVehicle`
+ - [x] `EvalPlayerTargetLOS`
+ - [x] `EvalPlayerTargetLook`
+ - [x] `EvalPlayerTargetProximity`
+ - [x] `EvalState`
+ - [x] `IsInFOV`
+ - [x] `OnEntitySpawned`
+ - [x] `OnRestore`
+ - [x] `PlayerHasLineOfSight`
+ - [x] `Spawn`
+ - [x] `UpdateOnRemove`
- [ ] **ai_sound** · `CAISound` · `game/server/soundent.cpp` · C#: *none*
- [ ] Linked (`ai_sound`)
- KeyValues
@@ -1738,25 +1738,25 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `Precache`
- [ ] `Spawn`
- [ ] `Use`
-- [ ] **env_global** · `CEnvGlobal` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`env_global`)
+- [x] **env_global** · `CEnvGlobal` · `game/server/logicentities.cpp` · C# `EnvGlobal` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`env_global`)
- KeyValues
- - [ ] `globalstate`
- - [ ] `initialstate`
- - [ ] `counter`
+ - [x] `globalstate`
+ - [x] `initialstate`
+ - [x] `counter`
- Inputs
- - [ ] `TurnOn`
- - [ ] `TurnOff`
- - [ ] `Remove`
- - [ ] `Toggle`
- - [ ] `SetCounter`
- - [ ] `AddToCounter`
- - [ ] `GetCounter`
+ - [x] `TurnOn`
+ - [x] `TurnOff`
+ - [x] `Remove`
+ - [x] `Toggle`
+ - [x] `SetCounter`
+ - [x] `AddToCounter`
+ - [x] `GetCounter`
- Outputs
- - [ ] `Counter`
+ - [x] `Counter`
- Methods
- - [ ] `DrawDebugTextOverlays`
- - [ ] `Spawn`
+ - [x] `DrawDebugTextOverlays`
+ - [x] `Spawn`
- [ ] **env_glow** · `CSprite` · `game/shared/Sprite.cpp` · C# `Sprite` ([Game.Shared/Sprite.cs](Game.Shared/Sprite.cs))
- [x] Linked (`env_glow`)
- [x] Networked (SendTable for `CSprite`)
@@ -1893,36 +1893,36 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] `Precache`
- [x] `Spawn`
- [x] `Use`
-- [ ] **env_microphone** · `CEnvMicrophone` · `game/server/envmicrophone.cpp` · C#: *none*
- - [ ] Linked (`env_microphone`)
+- [x] **env_microphone** · `CEnvMicrophone` · `game/server/envmicrophone.cpp` · C# `EnvMicrophone` ([Game.Server/EnvMicrophone.cs](Game.Server/EnvMicrophone.cs))
+ - [x] Linked (`env_microphone`)
- KeyValues
- - [ ] `StartDisabled`
- - [ ] `SoundMask`
- - [ ] `Sensitivity`
- - [ ] `SmoothFactor`
- - [ ] `SpeakerName`
- - [ ] `ListenFilter`
- - [ ] `speaker_dsp_preset`
- - [ ] `MaxRange`
+ - [x] `StartDisabled`
+ - [x] `SoundMask`
+ - [x] `Sensitivity`
+ - [x] `SmoothFactor`
+ - [x] `SpeakerName`
+ - [x] `ListenFilter`
+ - [x] `speaker_dsp_preset`
+ - [x] `MaxRange`
- Inputs
- - [ ] `Enable`
- - [ ] `Disable`
- - [ ] `SetSpeakerName`
+ - [x] `Enable`
+ - [x] `Disable`
+ - [x] `SetSpeakerName`
- Outputs
- - [ ] `SoundLevel`
- - [ ] `OnRoutedSound`
- - [ ] `OnHeardSound`
+ - [x] `SoundLevel`
+ - [x] `OnRoutedSound`
+ - [x] `OnHeardSound`
- Methods
- - [ ] `Activate`
- - [ ] `ActivateSpeaker`
- - [ ] `CanHearSound`
- - [ ] `OnRestore`
- - [ ] `OnSoundPlayed`
- - [ ] `SetSensitivity`
- - [ ] `SetSpeakerName`
- - [ ] `SoundPlayed`
- - [ ] `Spawn`
- - [ ] `Think`
+ - [x] `Activate`
+ - [x] `ActivateSpeaker`
+ - [x] `CanHearSound`
+ - [x] `OnRestore`
+ - [x] `OnSoundPlayed`
+ - [x] `SetSensitivity`
+ - [x] `SetSpeakerName`
+ - [x] `SoundPlayed`
+ - [x] `Spawn`
+ - [x] `Think`
- [ ] **env_movieexplosion** · `MovieExplosion` · `game/server/movie_explosion.cpp` · C# `MovieExplosion` ([Game.Server/MovieExplosion.cs](Game.Server/MovieExplosion.cs))
- [x] Linked (`env_movieexplosion`)
- [x] Networked (SendTable for `MovieExplosion`)
@@ -3715,88 +3715,88 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] Linked (`func_tracktrain`)
- [x] Networked (SendTable for `CFuncTrackTrain`)
- KeyValues
- - [ ] `wheels`
- - [ ] `height`
- - [ ] `startspeed`
- - [ ] `bank`
- - [ ] `dmg`
- - [ ] `MoveSound`
- - [ ] `MovePingSound`
- - [ ] `StartSound`
- - [ ] `StopSound`
- - [ ] `MoveSoundMinPitch`
- - [ ] `MoveSoundMaxPitch`
- - [ ] `MoveSoundMinTime`
- - [ ] `MoveSoundMaxTime`
- - [ ] `velocitytype`
- - [ ] `orientationtype`
- - [ ] `ManualSpeedChanges`
- - [ ] `ManualAccelSpeed`
- - [ ] `ManualDecelSpeed`
+ - [x] `wheels`
+ - [x] `height`
+ - [x] `startspeed`
+ - [x] `bank`
+ - [x] `dmg`
+ - [x] `MoveSound`
+ - [x] `MovePingSound`
+ - [x] `StartSound`
+ - [x] `StopSound`
+ - [x] `MoveSoundMinPitch`
+ - [x] `MoveSoundMaxPitch`
+ - [x] `MoveSoundMinTime`
+ - [x] `MoveSoundMaxTime`
+ - [x] `velocitytype`
+ - [x] `orientationtype`
+ - [x] `ManualSpeedChanges`
+ - [x] `ManualAccelSpeed`
+ - [x] `ManualDecelSpeed`
- Inputs
- - [ ] `Stop`
- - [ ] `StartForward`
- - [ ] `StartBackward`
- - [ ] `Toggle`
- - [ ] `Resume`
- - [ ] `Reverse`
- - [ ] `SetSpeed`
- - [ ] `SetSpeedDir`
- - [ ] `SetSpeedReal`
+ - [x] `Stop`
+ - [x] `StartForward`
+ - [x] `StartBackward`
+ - [x] `Toggle`
+ - [x] `Resume`
+ - [x] `Reverse`
+ - [x] `SetSpeed`
+ - [x] `SetSpeedDir`
+ - [x] `SetSpeedReal`
- [ ] `SetMaxSpeed`
- - [ ] `SetSpeedDirAccel`
+ - [x] `SetSpeedDirAccel`
- [ ] `MoveToPathNode`
- [ ] `TeleportToPathNode`
- [ ] `LockOrientation`
- [ ] `UnlockOrientation`
- - [ ] `TeleportToPathTrack`
- - [ ] `SetSpeedForwardModifier`
+ - [x] `TeleportToPathTrack`
+ - [x] `SetSpeedForwardModifier`
- Outputs
- - [ ] `OnStart`
- - [ ] `OnNextPoint`
+ - [x] `OnStart`
+ - [x] `OnNextPoint`
- [ ] `OnArrivedAtDestinationNode`
- Think/Touch/Use functions
- - [ ] `Next`
- - [ ] `Find`
- - [ ] `NearestPath`
- - [ ] `DeadEnd`
+ - [x] `Next`
+ - [x] `Find`
+ - [x] `NearestPath`
+ - [x] `DeadEnd`
- Methods
- - [ ] `ArriveAtNode`
- - [ ] `Blocked`
- - [ ] `CreateVPhysics`
- - [ ] `DoUpdateOrientation`
+ - [x] `ArriveAtNode`
+ - [x] `Blocked`
+ - [x] `CreateVPhysics`
+ - [x] `DoUpdateOrientation`
- [ ] `DrawDebugGeometryOverlays`
- - [ ] `DrawDebugTextOverlays`
- - [ ] `FirePassInputs`
- - [ ] `GetTrainOrientationType`
- - [ ] `GetTrainVelocityType`
+ - [x] `DrawDebugTextOverlays`
+ - [x] `FirePassInputs`
+ - [x] `GetTrainOrientationType`
+ - [x] `GetTrainVelocityType`
- [ ] `Instance`
- [ ] `IsBaseTrain`
- - [ ] `IsDirForward`
- - [ ] `KeyValue`
- - [ ] `MoveDone`
- - [ ] `ObjectCaps`
- - [ ] `OnControls`
- - [ ] `OnRestore`
- - [ ] `OnTakeDamage`
- - [ ] `Precache`
- - [ ] `SetControls`
- - [ ] `SetDirForward`
- - [ ] `SetSpeed`
- - [ ] `SetSpeedDirAccel`
- - [ ] `SetSpeedForwardModifier`
+ - [x] `IsDirForward`
+ - [x] `KeyValue`
+ - [x] `MoveDone`
+ - [x] `ObjectCaps`
+ - [x] `OnControls`
+ - [x] `OnRestore`
+ - [x] `OnTakeDamage`
+ - [x] `Precache`
+ - [x] `SetControls`
+ - [x] `SetDirForward`
+ - [x] `SetSpeed`
+ - [x] `SetSpeedDirAccel`
+ - [x] `SetSpeedForwardModifier`
- [ ] `SoundStop`
- - [ ] `SoundUpdate`
- - [ ] `Spawn`
- - [ ] `Start`
- - [ ] `Stop`
- - [ ] `TeleportToPathTrack`
- - [ ] `UpdateOnRemove`
- - [ ] `UpdateOrientationAtPathTracks`
- - [ ] `UpdateOrientationBlend`
- - [ ] `UpdateTrainOrientation`
- - [ ] `UpdateTrainVelocity`
- - [ ] `Use`
+ - [x] `SoundUpdate`
+ - [x] `Spawn`
+ - [x] `Start`
+ - [x] `Stop`
+ - [x] `TeleportToPathTrack`
+ - [x] `UpdateOnRemove`
+ - [x] `UpdateOrientationAtPathTracks`
+ - [x] `UpdateOrientationBlend`
+ - [x] `UpdateTrainOrientation`
+ - [x] `UpdateTrainVelocity`
+ - [x] `Use`
- [ ] **func_train** · `CFuncTrain` · `game/server/trains.cpp` · C#: *none*
- [ ] Linked (`func_train`)
- KeyValues
@@ -5229,17 +5229,17 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
## logic_*
-- [ ] **logic_active_autosave** · `CLogicActiveAutosave` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_active_autosave`)
+- [x] **logic_active_autosave** · `CLogicActiveAutosave` · `game/server/logicentities.cpp` · C# `LogicActiveAutosave` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_active_autosave`)
- KeyValues
- - [ ] `TriggerHitPoints`
- - [ ] `TimeToTrigger`
- - [ ] `DangerousTime`
+ - [x] `TriggerHitPoints`
+ - [x] `TimeToTrigger`
+ - [x] `DangerousTime`
- Inputs
- - [ ] `Enable`
- - [ ] `Disable`
+ - [x] `Enable`
+ - [x] `Disable`
- Think/Touch/Use functions
- - [ ] `SaveThink`
+ - [x] `SaveThink`
- [ ] **logic_auto** · `CLogicAuto` · `game/server/logicauto.cpp` · C# `LogicAuto` ([Game.Server/LogicAuto.cs](Game.Server/LogicAuto.cs))
- [x] Linked (`logic_auto`)
- KeyValues
@@ -5256,147 +5256,147 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] `Activate`
- [ ] `ObjectCaps`
- [x] `Think`
-- [ ] **logic_autosave** · `CLogicAutosave` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_autosave`)
+- [x] **logic_autosave** · `CLogicAutosave` · `game/server/logicentities.cpp` · C# `LogicAutosave` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_autosave`)
- KeyValues
- - [ ] `NewLevelUnit`
- - [ ] `MinimumHitPoints`
- - [ ] `MinHitPointsToCommit`
+ - [x] `NewLevelUnit`
+ - [x] `MinimumHitPoints`
+ - [x] `MinHitPointsToCommit`
- Inputs
- - [ ] `Save`
- - [ ] `SaveDangerous`
- - [ ] `SetMinHitpointsThreshold`
-- [ ] **logic_branch** · `CLogicBranch` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_branch`)
+ - [x] `Save`
+ - [x] `SaveDangerous`
+ - [x] `SetMinHitpointsThreshold`
+- [x] **logic_branch** · `CLogicBranch` · `game/server/logicentities.cpp` · C# `LogicBranch` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_branch`)
- KeyValues
- - [ ] `InitialValue`
+ - [x] `InitialValue`
- Inputs
- - [ ] `SetValue`
- - [ ] `SetValueTest`
- - [ ] `Toggle`
- - [ ] `ToggleTest`
- - [ ] `Test`
+ - [x] `SetValue`
+ - [x] `SetValueTest`
+ - [x] `Toggle`
+ - [x] `ToggleTest`
+ - [x] `Test`
- Outputs
- - [ ] `OnTrue`
- - [ ] `OnFalse`
+ - [x] `OnTrue`
+ - [x] `OnFalse`
- Methods
- - [ ] `AddLogicBranchListener`
- - [ ] `DrawDebugTextOverlays`
- - [ ] `UpdateOnRemove`
- - [ ] `UpdateValue`
-- [ ] **logic_branch_listener** · `CLogicBranchList` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_branch_listener`)
- - KeyValues
- - [ ] `Branch01`
- - [ ] `Branch02`
- - [ ] `Branch03`
- - [ ] `Branch04`
- - [ ] `Branch05`
- - [ ] `Branch06`
- - [ ] `Branch07`
- - [ ] `Branch08`
- - [ ] `Branch09`
- - [ ] `Branch10`
- - [ ] `Branch11`
- - [ ] `Branch12`
- - [ ] `Branch13`
- - [ ] `Branch14`
- - [ ] `Branch15`
- - [ ] `Branch16`
- - Inputs
- - [ ] `Test`
- - [ ] `_OnLogicBranchChanged`
- - [ ] `_OnLogicBranchRemoved`
+ - [x] `AddLogicBranchListener`
+ - [x] `DrawDebugTextOverlays`
+ - [x] `UpdateOnRemove`
+ - [x] `UpdateValue`
+- [x] **logic_branch_listener** · `CLogicBranchList` · `game/server/logicentities.cpp` · C# `LogicBranchList` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_branch_listener`)
+ - KeyValues
+ - [x] `Branch01`
+ - [x] `Branch02`
+ - [x] `Branch03`
+ - [x] `Branch04`
+ - [x] `Branch05`
+ - [x] `Branch06`
+ - [x] `Branch07`
+ - [x] `Branch08`
+ - [x] `Branch09`
+ - [x] `Branch10`
+ - [x] `Branch11`
+ - [x] `Branch12`
+ - [x] `Branch13`
+ - [x] `Branch14`
+ - [x] `Branch15`
+ - [x] `Branch16`
+ - Inputs
+ - [x] `Test`
+ - [x] `_OnLogicBranchChanged`
+ - [x] `_OnLogicBranchRemoved`
- Outputs
- - [ ] `OnAllTrue`
- - [ ] `OnAllFalse`
- - [ ] `OnMixed`
+ - [x] `OnAllTrue`
+ - [x] `OnAllFalse`
+ - [x] `OnMixed`
- Methods
- - [ ] `Activate`
- - [ ] `DoTest`
- - [ ] `DrawDebugTextOverlays`
- - [ ] `Spawn`
-- [ ] **logic_case** · `CLogicCase` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_case`)
- - KeyValues
- - [ ] `Case01`
- - [ ] `Case02`
- - [ ] `Case03`
- - [ ] `Case04`
- - [ ] `Case05`
- - [ ] `Case06`
- - [ ] `Case07`
- - [ ] `Case08`
- - [ ] `Case09`
- - [ ] `Case10`
- - [ ] `Case11`
- - [ ] `Case12`
- - [ ] `Case13`
- - [ ] `Case14`
- - [ ] `Case15`
- - [ ] `Case16`
- - Inputs
- - [ ] `InValue`
- - [ ] `PickRandom`
- - [ ] `PickRandomShuffle`
+ - [x] `Activate`
+ - [x] `DoTest`
+ - [x] `DrawDebugTextOverlays`
+ - [x] `Spawn`
+- [x] **logic_case** · `CLogicCase` · `game/server/logicentities.cpp` · C# `LogicCase` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_case`)
+ - KeyValues
+ - [x] `Case01`
+ - [x] `Case02`
+ - [x] `Case03`
+ - [x] `Case04`
+ - [x] `Case05`
+ - [x] `Case06`
+ - [x] `Case07`
+ - [x] `Case08`
+ - [x] `Case09`
+ - [x] `Case10`
+ - [x] `Case11`
+ - [x] `Case12`
+ - [x] `Case13`
+ - [x] `Case14`
+ - [x] `Case15`
+ - [x] `Case16`
+ - Inputs
+ - [x] `InValue`
+ - [x] `PickRandom`
+ - [x] `PickRandomShuffle`
- Outputs
- - [ ] `OnCase01`
- - [ ] `OnCase02`
- - [ ] `OnCase03`
- - [ ] `OnCase04`
- - [ ] `OnCase05`
- - [ ] `OnCase06`
- - [ ] `OnCase07`
- - [ ] `OnCase08`
- - [ ] `OnCase09`
- - [ ] `OnCase10`
- - [ ] `OnCase11`
- - [ ] `OnCase12`
- - [ ] `OnCase13`
- - [ ] `OnCase14`
- - [ ] `OnCase15`
- - [ ] `OnCase16`
- - [ ] `OnDefault`
- - Methods
- - [ ] `BuildCaseMap`
- - [ ] `Spawn`
+ - [x] `OnCase01`
+ - [x] `OnCase02`
+ - [x] `OnCase03`
+ - [x] `OnCase04`
+ - [x] `OnCase05`
+ - [x] `OnCase06`
+ - [x] `OnCase07`
+ - [x] `OnCase08`
+ - [x] `OnCase09`
+ - [x] `OnCase10`
+ - [x] `OnCase11`
+ - [x] `OnCase12`
+ - [x] `OnCase13`
+ - [x] `OnCase14`
+ - [x] `OnCase15`
+ - [x] `OnCase16`
+ - [x] `OnDefault`
+ - Methods
+ - [x] `BuildCaseMap`
+ - [x] `Spawn`
- [ ] **logic_choreographed_scene** · `CSceneEntity` · `game/server/sceneentity.cpp` · C# `SceneEntity` ([Game.Server/SceneEntity.cs](Game.Server/SceneEntity.cs))
- [x] Linked (`logic_choreographed_scene`)
- [x] Networked (SendTable for `CSceneEntity`)
- [ ] Shares `CSceneEntity` with `scripted_scene`, which tracks its functionality
-- [ ] **logic_collision_pair** · `CLogicCollisionPair` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_collision_pair`)
+- [ ] **logic_collision_pair** · `CLogicCollisionPair` · `game/server/logicentities.cpp` · C# `LogicCollisionPair` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_collision_pair`)
- KeyValues
- - [ ] `attach1`
- - [ ] `attach2`
- - [ ] `startdisabled`
+ - [x] `attach1`
+ - [x] `attach2`
+ - [x] `startdisabled`
- [ ] `disable_on_remove`
- Inputs
- - [ ] `DisableCollisions`
- - [ ] `EnableCollisions`
+ - [x] `DisableCollisions`
+ - [x] `EnableCollisions`
- Methods
- - [ ] `Activate`
+ - [x] `Activate`
- [ ] `OnRestore`
- [ ] `SetPhysObject`
- [ ] `UpdateOnRemove`
-- [ ] **logic_compare** · `CLogicCompare` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_compare`)
+- [x] **logic_compare** · `CLogicCompare` · `game/server/logicentities.cpp` · C# `LogicCompare` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_compare`)
- KeyValues
- - [ ] `CompareValue`
- - [ ] `InitialValue`
+ - [x] `CompareValue`
+ - [x] `InitialValue`
- Inputs
- - [ ] `SetValue`
- - [ ] `SetValueCompare`
- - [ ] `SetCompareValue`
- - [ ] `Compare`
+ - [x] `SetValue`
+ - [x] `SetValueCompare`
+ - [x] `SetCompareValue`
+ - [x] `Compare`
- Outputs
- - [ ] `OnEqualTo`
- - [ ] `OnNotEqualTo`
- - [ ] `OnGreaterThan`
- - [ ] `OnLessThan`
+ - [x] `OnEqualTo`
+ - [x] `OnNotEqualTo`
+ - [x] `OnGreaterThan`
+ - [x] `OnLessThan`
- Methods
- - [ ] `DoCompare`
- - [ ] `DrawDebugTextOverlays`
+ - [x] `DoCompare`
+ - [x] `DrawDebugTextOverlays`
- [ ] **logic_coop_manager** · `CLogicCoopManager` · *GMod-only* · C#: *none*
- [ ] Linked (`logic_coop_manager`)
- KeyValues
@@ -5445,16 +5445,16 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- Methods
- [ ] `FireGameEvent`
- [ ] `Spawn`
-- [ ] **logic_lineto** · `CLogicLineToEntity` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_lineto`)
+- [x] **logic_lineto** · `CLogicLineToEntity` · `game/server/logicentities.cpp` · C# `LogicLineToEntity` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_lineto`)
- KeyValues
- - [ ] `source`
+ - [x] `source`
- Outputs
- - [ ] `Line`
+ - [x] `Line`
- Methods
- - [ ] `Activate`
- - [ ] `Spawn`
- - [ ] `Think`
+ - [x] `Activate`
+ - [x] `Spawn`
+ - [x] `Think`
- [ ] **logic_measure_movement** · `CLogicMeasureMovement` · `game/server/logic_measure_movement.cpp` · C#: *none*
- [ ] Linked (`logic_measure_movement`)
- KeyValues
@@ -5479,17 +5479,17 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `SetMeasureTarget`
- [ ] `SetTarget`
- [ ] `SetTargetReference`
-- [ ] **logic_multicompare** · `CLogicCompareInteger` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_multicompare`)
+- [x] **logic_multicompare** · `CLogicCompareInteger` · `game/server/logicentities.cpp` · C# `LogicCompareInteger` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_multicompare`)
- KeyValues
- - [ ] `IntegerValue`
- - [ ] `ShouldComparetoValue`
+ - [x] `IntegerValue`
+ - [x] `ShouldComparetoValue`
- Inputs
- - [ ] `InputValue`
- - [ ] `CompareValues`
+ - [x] `InputValue`
+ - [x] `CompareValues`
- Outputs
- - [ ] `OnEqual`
- - [ ] `OnNotEqual`
+ - [x] `OnEqual`
+ - [x] `OnNotEqual`
- [ ] **logic_navigation** · `CLogicNavigation` · `game/server/logic_navigation.cpp` · C#: *none*
- [ ] Linked (`logic_navigation`)
- Inputs
@@ -5616,36 +5616,36 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `RemoveScene`
- [ ] `SceneStarted`
- [ ] `ShutdownList`
-- [ ] **logic_timer** · `CTimerEntity` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`logic_timer`)
+- [x] **logic_timer** · `CTimerEntity` · `game/server/logicentities.cpp` · C# `TimerEntity` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`logic_timer`)
- KeyValues
- - [ ] `StartDisabled`
- - [ ] `RefireTime`
+ - [x] `StartDisabled`
+ - [x] `RefireTime`
- Inputs
- - [ ] `RefireTime`
- - [ ] `FireTimer`
- - [ ] `Enable`
- - [ ] `Disable`
- - [ ] `Toggle`
- - [ ] `AddToTimer`
- - [ ] `ResetTimer`
- - [ ] `SubtractFromTimer`
- - [ ] `UseRandomTime` (also keyvalue)
- - [ ] `LowerRandomBound` (also keyvalue)
- - [ ] `UpperRandomBound` (also keyvalue)
+ - [x] `RefireTime`
+ - [x] `FireTimer`
+ - [x] `Enable`
+ - [x] `Disable`
+ - [x] `Toggle`
+ - [x] `AddToTimer`
+ - [x] `ResetTimer`
+ - [x] `SubtractFromTimer`
+ - [x] `UseRandomTime` (also keyvalue)
+ - [x] `LowerRandomBound` (also keyvalue)
+ - [x] `UpperRandomBound` (also keyvalue)
- Outputs
- - [ ] `OnTimer`
- - [ ] `OnTimerHigh`
- - [ ] `OnTimerLow`
+ - [x] `OnTimer`
+ - [x] `OnTimerHigh`
+ - [x] `OnTimerLow`
- Methods
- - [ ] `Disable`
- - [ ] `DrawDebugTextOverlays`
- - [ ] `Enable`
- - [ ] `FireTimer`
- - [ ] `ResetTimer`
- - [ ] `Spawn`
- - [ ] `Think`
- - [ ] `Toggle`
+ - [x] `Disable`
+ - [x] `DrawDebugTextOverlays`
+ - [x] `Enable`
+ - [x] `FireTimer`
+ - [x] `ResetTimer`
+ - [x] `Spawn`
+ - [x] `Think`
+ - [x] `Toggle`
## lookdoorthinker
@@ -5707,62 +5707,62 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
## math_*
-- [ ] **math_colorblend** · `CMathColorBlend` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`math_colorblend`)
+- [x] **math_colorblend** · `CMathColorBlend` · `game/server/logicentities.cpp` · C# `MathColorBlend` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`math_colorblend`)
- KeyValues
- - [ ] `inmin`
- - [ ] `inmax`
- - [ ] `colormin`
- - [ ] `colormax`
+ - [x] `inmin`
+ - [x] `inmax`
+ - [x] `colormin`
+ - [x] `colormax`
- Inputs
- - [ ] `InValue`
+ - [x] `InValue`
- Outputs
- - [ ] `OutColor`
+ - [x] `OutColor`
- Methods
- - [ ] `Spawn`
-- [ ] **math_counter** · `CMathCounter` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`math_counter`)
+ - [x] `Spawn`
+- [x] **math_counter** · `CMathCounter` · `game/server/logicentities.cpp` · C# `MathCounter` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`math_counter`)
- KeyValues
- - [ ] `min`
- - [ ] `max`
- - [ ] `StartDisabled`
+ - [x] `min`
+ - [x] `max`
+ - [x] `StartDisabled`
- Inputs
- - [ ] `Add`
- - [ ] `Divide`
- - [ ] `Multiply`
- - [ ] `SetValue`
- - [ ] `SetValueNoFire`
- - [ ] `Subtract`
- - [ ] `SetHitMax`
- - [ ] `SetHitMin`
- - [ ] `GetValue`
- - [ ] `Enable`
- - [ ] `Disable`
+ - [x] `Add`
+ - [x] `Divide`
+ - [x] `Multiply`
+ - [x] `SetValue`
+ - [x] `SetValueNoFire`
+ - [x] `Subtract`
+ - [x] `SetHitMax`
+ - [x] `SetHitMin`
+ - [x] `GetValue`
+ - [x] `Enable`
+ - [x] `Disable`
- Outputs
- - [ ] `OutValue`
- - [ ] `OnHitMin`
- - [ ] `OnHitMax`
- - [ ] `OnGetValue`
+ - [x] `OutValue`
+ - [x] `OnHitMin`
+ - [x] `OnHitMax`
+ - [x] `OnGetValue`
- Methods
- - [ ] `DrawDebugTextOverlays`
- - [ ] `KeyValue`
- - [ ] `Spawn`
- - [ ] `UpdateOutValue`
-- [ ] **math_remap** · `CMathRemap` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`math_remap`)
+ - [x] `DrawDebugTextOverlays`
+ - [x] `KeyValue`
+ - [x] `Spawn`
+ - [x] `UpdateOutValue`
+- [x] **math_remap** · `CMathRemap` · `game/server/logicentities.cpp` · C# `MathRemap` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`math_remap`)
- KeyValues
- - [ ] `in1`
- - [ ] `in2`
- - [ ] `out1`
- - [ ] `out2`
+ - [x] `in1`
+ - [x] `in2`
+ - [x] `out1`
+ - [x] `out2`
- Inputs
- - [ ] `InValue`
- - [ ] `Enable`
- - [ ] `Disable`
+ - [x] `InValue`
+ - [x] `Enable`
+ - [x] `Disable`
- Outputs
- - [ ] `OutValue`
+ - [x] `OutValue`
- Methods
- - [ ] `Spawn`
+ - [x] `Spawn`
## model_*
@@ -6833,20 +6833,20 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
## multisource
-- [ ] **multisource** · `CMultiSource` · `game/server/logicentities.cpp` · C#: *none*
- - [ ] Linked (`multisource`)
+- [x] **multisource** · `CMultiSource` · `game/server/logicentities.cpp` · C# `MultiSource` ([Game.Server/LogicEntities.cs](Game.Server/LogicEntities.cs))
+ - [x] Linked (`multisource`)
- KeyValues
- - [ ] `globalstate`
+ - [x] `globalstate`
- Outputs
- - [ ] `OnTrigger`
+ - [x] `OnTrigger`
- Think/Touch/Use functions
- - [ ] `Register`
+ - [x] `Register`
- Methods
- - [ ] `IsTriggered`
- - [ ] `KeyValue`
- - [ ] `ObjectCaps`
- - [ ] `Spawn`
- - [ ] `Use`
+ - [x] `IsTriggered`
+ - [x] `KeyValue`
+ - [x] `ObjectCaps`
+ - [x] `Spawn`
+ - [x] `Use`
## nihilanth_*
@@ -7465,15 +7465,15 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `Spawn`
- [ ] `SquadSlotName`
- [ ] `Weapon_Equip`
-- [ ] **npc_breen** · `CNPC_Breen` · `game/server/hl2/npc_breen.cpp` · C#: *none*
- - [ ] Linked (`npc_breen`)
+- [x] **npc_breen** · `CNPC_Breen` · `game/server/hl2/npc_breen.cpp` · C# `NPC_Breen` ([Game.Server/NPC_Breen.cs](Game.Server/NPC_Breen.cs))
+ - [x] Linked (`npc_breen`)
- Methods
- - [ ] `Classify`
- - [ ] `GetSoundInterests`
- - [ ] `HandleAnimEvent`
- - [ ] `Precache`
- - [ ] `Spawn`
- - [ ] `UseSemaphore`
+ - [x] `Classify`
+ - [x] `GetSoundInterests`
+ - [x] `HandleAnimEvent`
+ - [x] `Precache`
+ - [x] `Spawn`
+ - [x] `UseSemaphore`
- [ ] **npc_bullseye** · `CNPC_Bullseye` · `game/server/hl2/npc_bullseye.cpp` · C#: *none*
- [ ] Linked (`npc_bullseye`)
- KeyValues
@@ -9060,18 +9060,18 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `UpdatePanels`
- [ ] `VPhysicsCollision`
- [ ] `VPhysicsShadowCollision`
-- [ ] **npc_metropolice** · `CNPC_MetroPolice` · `game/server/hl2/npc_metropolice.cpp` · C#: *none*
- - [ ] Linked (`npc_metropolice`)
+- [ ] **npc_metropolice** · `CNPC_MetroPolice` · `game/server/hl2/npc_metropolice.cpp` · C# `NPC_MetroPolice` ([Game.Server/NPC_MetroPolice.cs](Game.Server/NPC_MetroPolice.cs))
+ - [x] Linked (`npc_metropolice`)
- KeyValues
- - [ ] `weapondrawn`
- - [ ] `manhacks`
+ - [x] `weapondrawn`
+ - [x] `manhacks`
- Inputs
- [ ] `EnableManhackToss`
- [ ] `SetPoliceGoal`
- [ ] `ActivateBaton`
- Outputs
- - [ ] `OnStunnedPlayer`
- - [ ] `OnCupCopped`
+ - [x] `OnStunnedPlayer`
+ - [x] `OnCupCopped`
- Methods
- [ ] `AdministerJustice`
- [ ] `AimBurstAlongSideOfEnemy`
@@ -9097,7 +9097,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `CanDeployManhack`
- [ ] `CanEnemySeeMe`
- [ ] `CheckTraceHullAttack`
- - [ ] `Classify`
+ - [x] `Classify`
- [ ] `ComputeBurstDeliberatelyMissTrajectory`
- [ ] `ComputeBurstLockOnTrajectory`
- [ ] `ComputeBurstTrajectory`
@@ -9120,12 +9120,12 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `GetIdealAccel`
- [ ] `GetSchedulingErrorName`
- [ ] `GetShootTarget`
- - [ ] `GetSoundInterests`
+ - [x] `GetSoundInterests`
- [ ] `GetTimeForShots`
- [ ] `HandleAnimEvent`
- [ ] `HandleInteraction`
- [ ] `HasBaton`
- - [ ] `IRelationType`
+ - [x] `IRelationType`
- [ ] `IdleSound`
- [ ] `IncrementPlayerCriminalStatus`
- [ ] `InitCustomSchedules`
@@ -9137,7 +9137,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `LoadSchedules`
- [ ] `LoadedSchedules`
- [ ] `LostEnemySound`
- - [ ] `MaxYawSpeed`
+ - [x] `MaxYawSpeed`
- [ ] `NPC_TranslateActivity`
- [ ] `NotifyDeadFriend`
- [ ] `ObjectCaps`
@@ -9155,8 +9155,8 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `OverrideMoveFacing`
- [ ] `PainSound`
- [ ] `PlayFlinchGesture`
- - [ ] `PlayerIsCriminal`
- - [ ] `Precache`
+ - [x] `PlayerIsCriminal`
+ - [x] `Precache`
- [ ] `PrecriminalUse`
- [ ] `PredictShootTargetPosition`
- [ ] `PredictShootTargetVelocity`
@@ -9186,7 +9186,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `ShouldKnockOutTarget`
- [ ] `ShouldMoveAndShoot`
- [ ] `ShouldPlayIdleSound`
- - [ ] `Spawn`
+ - [x] `Spawn`
- [ ] `SpeakAssaultSentence`
- [ ] `SpeakFuncTankSentence`
- [ ] `SpeakSentence`
@@ -9214,7 +9214,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `VPhysicsCollision`
- [ ] `VisualizeLineOfDeath`
- [ ] `VisualizeStitch`
- - [ ] `Weapon_Equip`
+ - [x] `Weapon_Equip`
- [ ] **npc_missiledefense** · `CNPC_MissileDefense` · `game/server/hl2/npc_missiledefense.cpp` · C#: *none*
- [ ] Linked (`npc_missiledefense`)
- Methods
@@ -10443,7 +10443,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `Spawn`
- [ ] **path_corner_crash** · `CPathCornerCrash` · `game/server/pathcorner.cpp` · C#: *none*
- [ ] Linked (`path_corner_crash`)
-- [ ] **path_track** · `CPathTrack` · `game/server/pathtrack.cpp` · C# `PathTrack` ([Game.Server/PathTrack.cs](Game.Server/PathTrack.cs))
+- [x] **path_track** · `CPathTrack` · `game/server/pathtrack.cpp` · C# `PathTrack` ([Game.Server/PathTrack.cs](Game.Server/PathTrack.cs))
- [x] Linked (`path_track`)
- KeyValues
- [x] `radius`
@@ -10466,7 +10466,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] `BeginIteration`
- [x] `DisableAlternatePath`
- [x] `DisablePath`
- - [ ] `DrawDebugGeometryOverlays`
+ - [x] `DrawDebugGeometryOverlays`
- [x] `EnableAlternatePath`
- [x] `EnablePath`
- [x] `EndIteration`
@@ -10477,7 +10477,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] `GetPrevious`
- [x] `HasAlternathPath`
- [x] `HasBeenVisited`
- - [ ] `Instance`
+ - [x] `Instance`
- [x] `Link`
- [x] `LookAhead`
- [x] `Nearest`
@@ -10906,12 +10906,12 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] Linked (`player_manager`)
- [x] Networked (SendTable for `CPlayerResource`)
- Think/Touch/Use functions
- - [ ] `ResourceThink`
+ - [x] `ResourceThink`
- Methods
- [ ] `ObjectCaps`
- - [ ] `Spawn`
- - [ ] `UpdatePlayerData`
- - [ ] `UpdateTransmitState`
+ - [x] `Spawn`
+ - [x] `UpdatePlayerData`
+ - [x] `UpdateTransmitState`
- [ ] **player_pickup** · `CPlayerPickupController` · `game/server/hl1/hl1_player.cpp` · C#: *none*
- [ ] Linked (`player_pickup`)
- Methods
@@ -11795,7 +11795,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `GetObstructingEntity`
- [ ] `GetPropDataAngles`
- [ ] `HandleAnyCollisionInteractions`
- - [ ] `IsGib`
+ - [x] `IsGib`
- [ ] `IsPotentiallyAbleToObstructNavAreas`
- [ ] `ObjectCaps`
- [ ] `OnNavMeshLoaded`
@@ -12238,7 +12238,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `GetVectors`
- [ ] `GetVehicleScriptName`
- [ ] `InitCraneSpeeds`
- - [ ] `IsVehicle`
+ - [x] `IsVehicle`
- [ ] `ItemPostFrame`
- [ ] `ObjectCaps`
- [ ] `OnTakeDamage`
@@ -12296,7 +12296,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `GetVehicleScriptName`
- [ ] `IsEngineOn`
- [ ] `IsOverturned`
- - [ ] `IsVehicle`
+ - [x] `IsVehicle`
- [ ] `IsVehicleBodyInWater`
- [ ] `ItemPostFrame`
- [ ] `NPC_AddPassenger`
@@ -12435,7 +12435,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `GetVectors`
- [ ] `GetVehicleScriptName`
- [ ] `HandleAnimEvent`
- - [ ] `IsVehicle`
+ - [x] `IsVehicle`
- [ ] `ItemPostFrame`
- [ ] `ObjectCaps`
- [ ] `OnTakeDamage`
@@ -12578,7 +12578,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
## script_*
-- [ ] **script_intro** · `CScriptIntro` · `game/server/hl2/script_intro.cpp` · C# `ScriptIntro` ([Game.Server/ScriptIntro.cs](Game.Server/ScriptIntro.cs))
+- [x] **script_intro** · `CScriptIntro` · `game/server/hl2/script_intro.cpp` · C# `ScriptIntro` ([Game.Server/ScriptIntro.cs](Game.Server/ScriptIntro.cs))
- [x] Linked (`script_intro`)
- [x] Networked (SendTable for `CScriptIntro`)
- KeyValues
@@ -12600,7 +12600,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- Methods
- [x] `Activate`
- [x] `GetIncludedPVSOrigin`
- - [ ] `Precache`
+ - [x] `Precache`
- [x] `Spawn`
- [x] `UpdateTransmitState`
@@ -12771,7 +12771,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `Spawn`
- [ ] `StartSentence`
- [ ] **scripted_sequence** · `CAI_ScriptedSequence` · `game/server/scripted.cpp` · C# `AI_ScriptedSequence` ([Game.Server/Scripted.cs](Game.Server/Scripted.cs))
- - [ ] Linked (`scripted_sequence`)
+ - [x] Linked (`scripted_sequence`)
- KeyValues
- [ ] `m_iszEntry`
- [ ] `m_iszIdle`
@@ -13130,23 +13130,23 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] **sky_camera** · `CSkyCamera` · `game/server/SkyCamera.cpp` · C# `SkyCamera` ([Game.Server/SkyCamera.cs](Game.Server/SkyCamera.cs))
- [x] Linked (`sky_camera`)
- KeyValues
- - [ ] `scale`
- - [ ] `use_angles`
- - [ ] `fogenable`
- - [ ] `fogblend`
- - [ ] `fogdir`
- - [ ] `fogcolor`
- - [ ] `fogcolor2`
+ - [x] `scale`
+ - [x] `use_angles`
+ - [x] `fogenable`
+ - [x] `fogblend`
+ - [x] `fogdir`
+ - [x] `fogcolor`
+ - [x] `fogcolor2`
- [ ] `fogcolor_hdr`
- [ ] `fogcolor2_hdr`
- - [ ] `fogstart`
- - [ ] `fogend`
- - [ ] `fogmaxdensity`
+ - [x] `fogstart`
+ - [x] `fogend`
+ - [x] `fogmaxdensity`
- [ ] `fogradial`
- [ ] `HDRColorScale`
- Methods
- - [ ] `Activate`
- - [ ] `Spawn`
+ - [x] `Activate`
+ - [x] `Spawn`
## skybox_*
@@ -13864,14 +13864,14 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `Precache`
- [x] `RemoveEffects`
- [x] `SendViewModelMatchingSequence`
- - [ ] `SetIndex`
- - [ ] `SetOwner`
+ - [x] `SetIndex`
+ - [x] `SetOwner`
- [ ] `SetTransmit`
- [x] `SetWeaponModel`
- - [ ] `ShouldTransmit`
- - [ ] `Spawn`
+ - [x] `ShouldTransmit`
+ - [x] `Spawn`
- [ ] `UpdateOnRemove`
- - [ ] `UpdateTransmitState`
+ - [x] `UpdateTransmitState`
- [ ] `UpdateViewmodelHands`
- [x] `ViewModelIndex`
@@ -14138,19 +14138,19 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] Linked (`weapon_crowbar`)
- [x] Networked (SendTable for `CWeaponCrowbar`)
- Methods
- - [ ] `ActivityList`
+ - [x] `ActivityList`
- [ ] `ActivityListCount`
- - [ ] `AddViewKick`
+ - [x] `AddViewKick`
- [ ] `CapabilitiesGet`
- - [ ] `Drop`
- - [ ] `GetDamageForActivity`
- - [ ] `GetFireRate`
+ - [x] `Drop`
+ - [x] `GetDamageForActivity`
+ - [x] `GetFireRate`
- [ ] `GetHoldType`
- - [ ] `GetRange`
- - [ ] `HandleAnimEventMeleeHit`
- - [ ] `Operator_HandleAnimEvent`
- - [ ] `SecondaryAttack`
- - [ ] `WeaponMeleeAttack1Condition`
+ - [x] `GetRange`
+ - [x] `HandleAnimEventMeleeHit`
+ - [x] `Operator_HandleAnimEvent`
+ - [x] `SecondaryAttack`
+ - [x] `WeaponMeleeAttack1Condition`
- [ ] **weapon_crowbar_hl1** · `CWeaponCrowbar_HL1` · *GMod-only* · C# `WeaponCrowbar_HL1` ([Game.Shared/HL1/WeaponCrowbar_HL1.cs](Game.Shared/HL1/WeaponCrowbar_HL1.cs))
- [x] Linked (`weapon_crowbar_hl1`)
- [x] Networked (SendTable for `CWeaponCrowbar_HL1`)
@@ -14647,24 +14647,24 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] Linked (`weapon_stunstick`)
- [x] Networked (SendTable for `CWeaponStunStick`)
- Methods
- - [ ] `ActivityList`
+ - [x] `ActivityList`
- [ ] `ActivityListCount`
- [ ] `CapabilitiesGet`
- - [ ] `Deploy`
- - [ ] `Drop`
- - [ ] `GetDamageForActivity`
+ - [x] `Deploy`
+ - [x] `Drop`
+ - [x] `GetDamageForActivity`
- [x] `GetFireRate`
- [ ] `GetHoldType`
- - [ ] `GetRange`
- - [ ] `GetStunState`
- - [ ] `Holster`
+ - [x] `GetRange`
+ - [x] `GetStunState`
+ - [x] `Holster`
- [ ] `ImpactEffect`
- - [ ] `Operator_HandleAnimEvent`
- - [ ] `Precache`
- - [ ] `SecondaryAttack`
- - [ ] `SetStunState`
- - [ ] `Spawn`
- - [ ] `WeaponMeleeAttack1Condition`
+ - [x] `Operator_HandleAnimEvent`
+ - [x] `Precache`
+ - [x] `SecondaryAttack`
+ - [x] `SetStunState`
+ - [x] `Spawn`
+ - [x] `WeaponMeleeAttack1Condition`
- [ ] **weapon_swep** · `CWeaponSWEP` · *GMod-only* · C# `WeaponSWEP` ([Game.Shared/GarrysMod/WeaponSWEP.cs](Game.Shared/GarrysMod/WeaponSWEP.cs))
- [x] Linked (`weapon_swep`)
- [x] Networked (SendTable for `CWeaponSWEP`)
@@ -14795,7 +14795,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `DecalTrace`
- [ ] `GetDisplayTitle`
- [ ] `GetStartDark`
- - [ ] `KeyValue`
+ - [x] `KeyValue`
- [x] `Precache`
- [ ] `RegisterSharedActivities`
- [ ] `RegisterSharedEvents`
@@ -14940,7 +14940,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `squadname`
- [ ] `hintgroup`
- [ ] `hintlimiting`
- - [ ] `additionalequipment`
+ - [x] `additionalequipment`
- [ ] `enemyfilter`
- Inputs
- [ ] `SetRelationship`
@@ -15004,7 +15004,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `AddScriptedNPCInteraction`
- [ ] `AddToSquad`
- [x] `AdvanceToIdealActivity`
- - [ ] `AimGun`
+ - [x] `AimGun`
- [ ] `AlertSound`
- [ ] `AllowedToIgnite`
- [ ] `AutoMovement`
@@ -15184,7 +15184,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `GetScriptCustomMoveActivity`
- [ ] `GetScriptCustomMoveSequence`
- [ ] `GetScriptedNPCInteractionSequence`
- - [ ] `GetShootEnemyDir`
+ - [x] `GetShootEnemyDir`
- [ ] `GetSmoothedVelocity`
- [x] `GetSoundInterests`
- [x] `GetSoundPriority`
@@ -15234,7 +15234,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `IsCommandMoving`
- [ ] `IsCommandable`
- [ ] `IsCoverPosition`
- - [ ] `IsCrouchedActivity`
+ - [x] `IsCrouchedActivity`
- [x] `IsCrouching`
- [x] `IsCurSchedule`
- [x] `IsCurTaskContinuousMove`
@@ -15302,7 +15302,7 @@ Datadesc and methods that the entities above inherit.
- [x] `NotifyPushMove`
- [ ] `NumBehaviors`
- [ ] `NumWeaponsInSquad`
- - [ ] `ObjectCaps`
+ - [x] `ObjectCaps`
- [ ] `OccupyStrategySlot`
- [ ] `OccupyStrategySlotRange`
- [ ] `OnBeginMoveAndShoot`
@@ -15359,7 +15359,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `PlayerInSpread`
- [ ] `PlayerPenetratingVPhysics`
- [ ] `PointInSpread`
- - [ ] `PopulatePoseParameters`
+ - [x] `PopulatePoseParameters`
- [x] `PostMovement`
- [x] `PostNPCInit`
- [x] `PostNPCThink`
@@ -15371,11 +15371,11 @@ Datadesc and methods that the entities above inherit.
- [x] `Precache`
- [x] `PrescheduleThink`
- [ ] `QueryHearSound`
- - [ ] `QuerySeeEntity`
+ - [x] `QuerySeeEntity`
- [ ] `RangeAttack1Conditions`
- [ ] `RangeAttack2Conditions`
- [x] `RebalanceThinks`
- - [ ] `RelaxAim`
+ - [x] `RelaxAim`
- [ ] `RememberUnreachable`
- [ ] `RemoveFromSquad`
- [x] `RemoveIgnoredConditions`
@@ -15414,7 +15414,7 @@ Datadesc and methods that the entities above inherit.
- [x] `SelectScriptSchedule`
- [x] `SetActivity`
- [x] `SetActivityAndSequence`
- - [ ] `SetAim`
+ - [x] `SetAim`
- [ ] `SetCommandGoal`
- [x] `SetCondition`
- [x] `SetCustomInterruptCondition`
@@ -15511,7 +15511,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `Wake`
- [ ] `WalkMove`
- [ ] `WeaponLOSCondition`
- - [ ] `Weapon_IsBetterAvailable`
+ - [x] `Weapon_IsBetterAvailable`
- [ ] `Weapon_ShootPosition`
- [ ] `WokeThisTick`
- [ ] **CAI_BasePhysicsFlyingBot** : `CAI_BaseNPC` · `game/server/ai_basenpc_physicsflyer.cpp` · C#: *none*
@@ -15595,7 +15595,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `LoadSchedules`
- [ ] `LoadedSchedules`
- [ ] `ModifyOrAppendCriteria`
- - [ ] `ObjectCaps`
+ - [x] `ObjectCaps`
- [ ] `OnKilledNPC`
- [ ] `OnSpokeConcept`
- [ ] `OnStartSchedule`
@@ -15779,7 +15779,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `GetFlexManipulator`
- [ ] `GetGroundSpeedVelocity`
- [ ] `GetHitboxBone`
- - [ ] `GetHitboxSet`
+ - [x] `GetHitboxSet`
- [ ] `GetHitboxSetCount`
- [ ] `GetHitboxSetName`
- [ ] `GetHitboxesFrontside`
@@ -15841,7 +15841,7 @@ Datadesc and methods that the entities above inherit.
- [x] `OnNewModel`
- [ ] `OnRestore`
- [ ] `OnSpawnGib`
- - [ ] `PopulatePoseParameters`
+ - [x] `PopulatePoseParameters`
- [ ] `Precache`
- [ ] `PrefetchSequence`
- [ ] `RefreshCollisionBounds`
@@ -15868,7 +15868,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `SetHitboxSetByName`
- [ ] `SetIKGroundContactInfo`
- [ ] `SetLightingOrigin`
- - [ ] `SetLightingOriginRelative`
+ - [x] `SetLightingOriginRelative`
- [x] `SetModel`
- [ ] `SetModelScale`
- [ ] `SetOverrideViewTarget`
@@ -15949,11 +15949,11 @@ Datadesc and methods that the entities above inherit.
- [x] `BodyDirection2D`
- [x] `BodyDirection3D`
- [ ] `CalcDamageForceVector`
- - [ ] `CalcWeaponProficiency`
+ - [x] `CalcWeaponProficiency`
- [ ] `CalculatePhysicsStressDamage`
- [ ] `CanBecomeServerRagdoll`
- [ ] `ChangeTeam`
- - [ ] `CheckTraceHullAttack`
+ - [x] `CheckTraceHullAttack`
- [x] `ClearLastKnownArea`
- [ ] `ComputeLOS`
- [ ] `CorpseFade`
@@ -15987,7 +15987,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `GetTimeSinceLastInjury`
- [ ] `GetVehicle`
- [x] `GetVehicleEntity`
- - [ ] `GiveAmmo`
+ - [x] `GiveAmmo`
- [ ] `HandleInteraction`
- [ ] `HasAlienGibs`
- [ ] `HasEverBeenInjured`
@@ -16007,7 +16007,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `MyCombatCharacterPointer`
- [x] `NPC_TranslateActivity`
- [ ] `NotifyFriendsOfDamage`
- - [ ] `OnChangeActiveWeapon`
+ - [x] `OnChangeActiveWeapon`
- [ ] `OnFriendDamaged`
- [ ] `OnKilledNPC`
- [ ] `OnNavAreaChanged`
@@ -16027,12 +16027,12 @@ Datadesc and methods that the entities above inherit.
- [ ] `RemovePlayerItem`
- [ ] `ResetVisibilityCache`
- [ ] `Restore`
- - [ ] `SetActiveWeapon`
+ - [x] `SetActiveWeapon`
- [ ] `SetAmmo`
- [ ] `SetAmmoCount`
- - [ ] `SetBloodColor`
+ - [x] `SetBloodColor`
- [x] `SetDefaultRelationship`
- - [ ] `SetLightingOriginRelative`
+ - [x] `SetLightingOriginRelative`
- [ ] `SetTransmit`
- [ ] `ShouldGib`
- [ ] `ShouldShootMissTarget`
@@ -16045,19 +16045,19 @@ Datadesc and methods that the entities above inherit.
- [ ] `VPhysicsShadowCollision`
- [ ] `VPhysicsUpdate`
- [x] `Weapon_CanSwitchTo`
- - [ ] `Weapon_CanUse`
- - [ ] `Weapon_Create`
+ - [x] `Weapon_CanUse`
+ - [x] `Weapon_Create`
- [ ] `Weapon_Detach`
- [ ] `Weapon_Drop`
- [ ] `Weapon_DropAll`
- - [ ] `Weapon_Equip`
- - [ ] `Weapon_EquipAmmoOnly`
- - [ ] `Weapon_FindUsable`
+ - [x] `Weapon_Equip`
+ - [x] `Weapon_EquipAmmoOnly`
+ - [x] `Weapon_FindUsable`
- [x] `Weapon_FrameUpdate`
- [ ] `Weapon_GetSlot`
- [ ] `Weapon_GetWpnForAmmo`
- - [ ] `Weapon_HandleAnimEvent`
- - [ ] `Weapon_IsOnGround`
+ - [x] `Weapon_HandleAnimEvent`
+ - [x] `Weapon_IsOnGround`
- [x] `Weapon_OwnsThisType`
- [x] `Weapon_SetActivity`
- [x] `Weapon_ShootPosition`
@@ -16069,14 +16069,14 @@ Datadesc and methods that the entities above inherit.
- Inputs
- [ ] `HideWeapon`
- Outputs
- - [ ] `OnPlayerUse`
- - [ ] `OnPlayerPickup`
- - [ ] `OnNPCPickup`
- - [ ] `OnCacheInteraction`
+ - [x] `OnPlayerUse`
+ - [x] `OnPlayerPickup`
+ - [x] `OnNPCPickup`
+ - [x] `OnCacheInteraction`
- Think/Touch/Use functions
- - [ ] `DefaultTouch`
- - [ ] `FallThink`
- - [ ] `Materialize`
+ - [x] `DefaultTouch`
+ - [x] `FallThink`
+ - [x] `Materialize`
- [ ] `DestroyItem`
- [x] `HideThink`
- Methods
@@ -16089,7 +16089,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `AddViewmodelBob`
- [x] `AllowsAutoSwitchFrom`
- [x] `AllowsAutoSwitchTo`
- - [ ] `AttemptToMaterialize`
+ - [x] `AttemptToMaterialize`
- [x] `AutoFiresFullClip`
- [ ] `CalcViewmodelBob`
- [x] `CanBePickedUpByNPCs`
@@ -16101,7 +16101,7 @@ Datadesc and methods that the entities above inherit.
- [x] `CanReload`
- [x] `CapabilitiesGet`
- [x] `CheckReload`
- - [ ] `CheckRespawn`
+ - [x] `CheckRespawn`
- [x] `Clip1`
- [x] `Clip2`
- [x] `DefaultDeploy`
@@ -16112,14 +16112,14 @@ Datadesc and methods that the entities above inherit.
- [x] `Drop`
- [x] `Equip`
- [ ] `EquipAmmo`
- - [ ] `FallInit`
+ - [x] `FallInit`
- [x] `FinishReload`
- [ ] `FireBullets`
- [ ] `ForcePlayerPickup`
- [x] `ForceWeaponSwitch`
- [ ] `GMOD_WeaponSound`
- [ ] `GModNPCAttackHack`
- - [ ] `GetAvailableWeaponsInBox`
+ - [x] `GetAvailableWeaponsInBox`
- [x] `GetBulletSpread`
- [ ] `GetDamage`
- [ ] `GetDeathNoticeName`
@@ -16168,8 +16168,8 @@ Datadesc and methods that the entities above inherit.
- [x] `GetWorldModel`
- [x] `GetWpnData`
- [x] `GiveDefaultAmmo`
- - [ ] `GiveTo`
- - [ ] `HandleAnimEvent`
+ - [x] `GiveTo`
+ - [x] `HandleAnimEvent`
- [x] `HandleFireOnEmpty`
- [x] `HasAmmo`
- [x] `HasAnyAmmo`
@@ -16181,7 +16181,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `IsAllowedToSwitch`
- [ ] `IsBaseCombatWeapon`
- [x] `IsHolstered`
- - [ ] `IsLocked`
+ - [x] `IsLocked`
- [x] `IsMeleeWeapon`
- [ ] `IsPredicted`
- [x] `IsViewModelSequenceFinished`
@@ -16193,20 +16193,20 @@ Datadesc and methods that the entities above inherit.
- [x] `ItemPostFrame`
- [x] `ItemPreFrame`
- [ ] `Kill`
- - [ ] `Lock`
+ - [x] `Lock`
- [ ] `Lower`
- [x] `Lua_GetLuaClass`
- [x] `MaintainIdealActivity`
- [ ] `MakeTracer`
- [ ] `MarkAsDropped`
- [ ] `MyCombatWeaponPointer`
- - [ ] `ObjectCaps`
+ - [x] `ObjectCaps`
- [x] `OnActiveStateChanged`
- - [ ] `OnPickedUp`
+ - [x] `OnPickedUp`
- [ ] `OnRangeAttack1`
- - [ ] `Operator_ForceNPCFire`
- - [ ] `Operator_FrameUpdate`
- - [ ] `Operator_HandleAnimEvent`
+ - [x] `Operator_ForceNPCFire`
+ - [x] `Operator_FrameUpdate`
+ - [x] `Operator_HandleAnimEvent`
- [x] `PoseParamList`
- [x] `PoseParameterOverride`
- [x] `Precache`
@@ -16216,16 +16216,16 @@ Datadesc and methods that the entities above inherit.
- [x] `ReloadOrSwitchWeapons`
- [ ] `ReloadsSingly`
- [ ] `RenderScreen`
- - [ ] `Respawn`
+ - [x] `Respawn`
- [x] `SecondaryAttack`
- [x] `SendViewModelAnim`
- [x] `SendWeaponAnim`
- - [ ] `SetActivity`
+ - [x] `SetActivity`
- [ ] `SetDeploySpeed`
- [ ] `SetHoldType`
- [x] `SetIdealActivity`
- [x] `SetOwner`
- - [ ] `SetPickupTouch`
+ - [x] `SetPickupTouch`
- [x] `SetSubType`
- [x] `SetViewModel`
- [ ] `SetViewModelIndex`
@@ -16243,7 +16243,7 @@ Datadesc and methods that the entities above inherit.
- [x] `UpdateClientData`
- [ ] `UpdateLastShootTime`
- [ ] `UpdateTransmitState`
- - [ ] `Use`
+ - [x] `Use`
- [x] `UsesClipsForAmmo1`
- [x] `UsesClipsForAmmo2`
- [x] `UsesPrimaryAmmo`
@@ -16252,10 +16252,10 @@ Datadesc and methods that the entities above inherit.
- [ ] `WasDropped`
- [x] `WeaponIdle`
- [ ] `WeaponLOSCondition`
- - [ ] `WeaponMeleeAttack1Condition`
- - [ ] `WeaponMeleeAttack2Condition`
- - [ ] `WeaponRangeAttack1Condition`
- - [ ] `WeaponRangeAttack2Condition`
+ - [x] `WeaponMeleeAttack1Condition`
+ - [x] `WeaponMeleeAttack2Condition`
+ - [x] `WeaponRangeAttack1Condition`
+ - [x] `WeaponRangeAttack2Condition`
- [x] `WeaponSound`
- [ ] **CBaseEntity** · `game/server/props.cpp` · C# `BaseEntity` ([Game.Server/BaseEntity.cs](Game.Server/BaseEntity.cs))
- [x] Networked (SendTable for `CBaseEntity`)
@@ -16330,7 +16330,7 @@ Datadesc and methods that the entities above inherit.
- [x] `OnUser4`
- Think/Touch/Use functions
- [x] `SUB_Remove`
- - [ ] `SUB_DoNothing`
+ - [x] `SUB_DoNothing`
- [ ] `SUB_FadeOut`
- [ ] `SUB_Vanish`
- Methods
@@ -16357,8 +16357,8 @@ Datadesc and methods that the entities above inherit.
- [ ] `BloodColor`
- [x] `BodyTarget`
- [x] `CalcAbsolutePosition`
- - [ ] `CalcAbsoluteVelocity`
- - [ ] `CanBeHitByMeleeAttack`
+ - [x] `CalcAbsoluteVelocity`
+ - [x] `CanBeHitByMeleeAttack`
- [x] `CanBeSeenBy`
- [x] `CanStandOn`
- [x] `ChangeTeam`
@@ -16402,8 +16402,8 @@ Datadesc and methods that the entities above inherit.
- [ ] `DontDeleteOnRemove`
- [ ] `DrawAbsBoxOverlay`
- [ ] `DrawBBoxOverlay`
- - [ ] `DrawDebugGeometryOverlays`
- - [ ] `DrawDebugTextOverlays`
+ - [x] `DrawDebugGeometryOverlays`
+ - [x] `DrawDebugTextOverlays`
- [ ] `DrawInputOverlay`
- [ ] `DrawOutputOverlay`
- [ ] `DrawRBoxOverlay`
@@ -16417,19 +16417,19 @@ Datadesc and methods that the entities above inherit.
- [x] `EndBlocked`
- [x] `EndGroundContact`
- [x] `EndTouch`
- - [ ] `EntityText`
+ - [x] `EntityText`
- [x] `Event_Killed`
- [x] `Event_KilledOther`
- [ ] `EyeAngles`
- [x] `EyePosition`
- - [ ] `FVisible`
+ - [x] `FVisible`
- [ ] `FindContextByName`
- [ ] `FinishDriving`
- [x] `FireBullets`
- [ ] `FireNamedOutput`
- [x] `FollowEntity`
- [ ] `ForcePhysicsDropObject`
- - [ ] `ForceVPhysicsCollide`
+ - [x] `ForceVPhysicsCollide`
- [ ] `GMOD_CreateBoneFollowers`
- [ ] `GMOD_DestroyBoneFollowers`
- [ ] `GMOD_GetBoneFollowerMgr`
@@ -16516,7 +16516,7 @@ Datadesc and methods that the entities above inherit.
- [x] `HasLuaTable`
- [ ] `HasNPCsOnIt`
- [ ] `HasPhysicsAttacker`
- - [ ] `HasTarget`
+ - [x] `HasTarget`
- [x] `HeadTarget`
- [x] `HealthFraction`
- [ ] `ImpactTrace`
@@ -16538,11 +16538,11 @@ Datadesc and methods that the entities above inherit.
- [ ] `IsDeflectable`
- [x] `IsDormant`
- [x] `IsFloating`
- - [ ] `IsFollowingEntity`
+ - [x] `IsFollowingEntity`
- [ ] `IsInAnyTeam`
- [ ] `IsInTeam`
- [ ] `IsInWorld`
- - [ ] `IsJeep`
+ - [x] `IsJeep`
- [ ] `IsLockedByMaster`
- [x] `IsMoving`
- [x] `IsNPC`
@@ -16577,7 +16577,7 @@ Datadesc and methods that the entities above inherit.
- [x] `NameMatchesComplex`
- [ ] `NotifySystemEvent`
- [x] `ObjectCaps`
- - [ ] `OnControls`
+ - [x] `OnControls`
- [x] `OnEntityEvent`
- [x] `OnModelLoadComplete`
- [x] `OnNewModel`
@@ -16623,7 +16623,7 @@ Datadesc and methods that the entities above inherit.
- [x] `PhysicsRunThink`
- [x] `PhysicsSimulate`
- [x] `PhysicsSolidMaskForEntity`
- - [ ] `PhysicsSplash`
+ - [x] `PhysicsSplash`
- [x] `PhysicsStartGroundContact`
- [x] `PhysicsStartTouch`
- [x] `PhysicsStep`
@@ -16775,9 +16775,9 @@ Datadesc and methods that the entities above inherit.
- [ ] `UseStepSimulationNetworkAngles`
- [ ] `UseStepSimulationNetworkOrigin`
- [ ] `UsesLua`
- - [ ] `VPhysicsCollision`
+ - [x] `VPhysicsCollision`
- [x] `VPhysicsDestroyObject`
- - [ ] `VPhysicsFriction`
+ - [x] `VPhysicsFriction`
- [ ] `VPhysicsGetElement`
- [x] `VPhysicsGetObjectList`
- [x] `VPhysicsInitNormal`
@@ -16786,7 +16786,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `VPhysicsInitStatic`
- [ ] `VPhysicsIsFlesh`
- [x] `VPhysicsSetObject`
- - [ ] `VPhysicsShadowCollision`
+ - [x] `VPhysicsShadowCollision`
- [ ] `VPhysicsShadowUpdate`
- [ ] `VPhysicsSwapObject`
- [x] `VPhysicsTakeDamage`
@@ -17154,7 +17154,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `AvoidPhysicsProps`
- [ ] `BodyAngles`
- [ ] `BodyTarget`
- - [ ] `BumpWeapon`
+ - [x] `BumpWeapon`
- [x] `CacheVehicleView`
- [ ] `CalcObserverView`
- [x] `CalcPlayerView`
@@ -17185,7 +17185,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `CreateCorpse`
- [ ] `CreatePlayer`
- [ ] `CreateRagdollEntity`
- - [ ] `CreateViewModel`
+ - [x] `CreateViewModel`
- [ ] `DamageEffect`
- [ ] `DeactivateMovementConstraint`
- [ ] `DeathSound`
@@ -17194,7 +17194,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `DisableButtons`
- [ ] `DoImpactEffect`
- [ ] `DoMuzzleFlash`
- - [ ] `DoubleCheckUseNPC`
+ - [x] `DoubleCheckUseNPC`
- [ ] `DrawDebugGeometryOverlays`
- [x] `Duck`
- [ ] `DumpPerfToRecipient`
@@ -17210,7 +17210,7 @@ Datadesc and methods that the entities above inherit.
- [x] `EyePositionAndVectors`
- [x] `EyeVectors`
- [ ] `FindNextObserverTarget`
- - [ ] `FindUseEntity`
+ - [x] `FindUseEntity`
- [x] `FlashlightIsOn`
- [x] `FlashlightTurnOff`
- [x] `FlashlightTurnOn`
@@ -17275,7 +17275,7 @@ Datadesc and methods that the entities above inherit.
- [x] `GiveNamedItem`
- [ ] `HandleAnimEvent`
- [ ] `HandleFuncTrain`
- - [ ] `HasAnyAmmoOfType`
+ - [x] `HasAnyAmmoOfType`
- [ ] `HasNamedPlayerItem`
- [ ] `HasWeapons`
- [ ] `HideViewModels`
@@ -17302,11 +17302,11 @@ Datadesc and methods that the entities above inherit.
- [ ] `IsReadyToPlay`
- [ ] `IsReadyToSpawn`
- [ ] `IsRideablePhysics`
- - [ ] `IsUseableEntity`
+ - [x] `IsUseableEntity`
- [x] `IsUserCmdDataValid`
- [ ] `IsValidObserverTarget`
- [x] `ItemPostFrame`
- - [ ] `ItemPreFrame`
+ - [x] `ItemPreFrame`
- [x] `Jump`
- [ ] `JumptoPosition`
- [ ] `Kick`
@@ -17319,7 +17319,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `MouseWheel`
- [x] `NotifyNearbyRadiationSource`
- [ ] `ObjectCaps`
- - [ ] `ObserverUse`
+ - [x] `ObserverUse`
- [ ] `OnDamagedByExplosion`
- [x] `OnEmitFootstepSound`
- [ ] `OnMyWeaponFired`
@@ -17335,13 +17335,13 @@ Datadesc and methods that the entities above inherit.
- [ ] `PackDeadPlayerItems`
- [x] `PhysicsSimulate`
- [ ] `PhysicsSolidMaskForEntity`
- - [ ] `PickupObject`
+ - [x] `PickupObject`
- [x] `PlayStepSound`
- - [ ] `PlayUseDenySound`
+ - [x] `PlayUseDenySound`
- [ ] `PlayerDeathThink`
- [x] `PlayerRunCommand`
- [ ] `PlayerSolidMask`
- - [ ] `PlayerUse`
+ - [x] `PlayerUse`
- [x] `PostThink`
- [x] `PostThinkVPhysics`
- [x] `PreThink`
@@ -17450,10 +17450,10 @@ Datadesc and methods that the entities above inherit.
- [x] `ViewPunchReset`
- [x] `WantsLagCompensationOnEntity`
- [x] `WaterMove`
- - [ ] `Weapon_CanUse`
+ - [x] `Weapon_CanUse`
- [ ] `Weapon_Drop`
- [ ] `Weapon_DropSlot`
- - [ ] `Weapon_Equip`
+ - [x] `Weapon_Equip`
- [x] `Weapon_SetLast`
- [ ] `Weapon_ShootPosition`
- [x] `Weapon_ShouldSelectItem`
@@ -17562,7 +17562,7 @@ Datadesc and methods that the entities above inherit.
- Methods
- [x] `Activate`
- [x] `Disable`
- - [ ] `DrawDebugTextOverlays`
+ - [x] `DrawDebugTextOverlays`
- [x] `Enable`
- [x] `EndTouch`
- [x] `EndTouchAll`
@@ -17872,7 +17872,7 @@ Datadesc and methods that the entities above inherit.
- [x] Networked (SendTable for `CHL2MP_Player`)
- Methods
- [ ] `BecomeRagdollOnClient`
- - [ ] `BumpWeapon`
+ - [x] `BumpWeapon`
- [x] `CanHearAndReadChatFrom`
- [x] `CheatImpulseCommands`
- [x] `CheckChatText`
@@ -17970,7 +17970,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `GetPhysicsImpactDamageTable`
- [ ] `GetPlayerProxy`
- [ ] `GetSquadCommandRepresentative`
- - [ ] `GiveAmmo`
+ - [x] `GiveAmmo`
- [x] `HandleAdmireGlovesAnimation`
- [x] `HandleArmorReduction`
- [ ] `HandleInteraction`
@@ -18025,7 +18025,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `SuitPower_RemoveDevice`
- [ ] `SuitPower_ShouldRecharge`
- [x] `SuitPower_Update`
- - [ ] `SuspendUse`
+ - [x] `SuspendUse`
- [ ] `TestHitboxes`
- [x] `ToggleZoom`
- [x] `UpdateClientData`
@@ -18074,7 +18074,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `CreateItemVPhysicsObject`
- [ ] `ItemCanBeTouchedByPlayer`
- [ ] `MyTouch`
- - [ ] `ObjectCaps`
+ - [x] `ObjectCaps`
- [ ] `OnEntityEvent`
- [x] `OnPhysGunDrop`
- [x] `OnPhysGunPickup`
@@ -18083,7 +18083,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `Respawn`
- [ ] `Spawn`
- [ ] `UpdateOnRemove`
- - [ ] `Use`
+ - [x] `Use`
- [ ] **CNPCSimpleTalker** : `CAI_PlayerAlly` · `game/server/npc_talker.cpp` · C#: *none*
- Think/Touch/Use functions
- [ ] `FollowerUse`
@@ -18591,7 +18591,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `GetTracerType`
- [ ] `HandleWater`
- [ ] `InitWaterData`
- - [ ] `IsJeep`
+ - [x] `IsJeep`
- [ ] `IsVehicle`
- [ ] `IsVehicleBodyInWater`
- [ ] `JeepSeagullThink`
@@ -18672,17 +18672,36 @@ Datadesc and methods that the entities above inherit.
`L N K I O T M` stands for Linked, Networked, KeyValues, Inputs, Outputs, Think/Touch/Use functions and Methods. `[x]` means the class is fully complete. A letter means every box of that kind is checked, `_` means some are not, and `-` means the class has none of that kind. Classes are sorted from most to least complete by share of boxes checked.
```
+[x] [L - K I O T M] AI_ScriptConditions (aka ai_script_conditions)
+[x] [L - K I O - M] PathTrack (aka path_track)
+[x] [L - K I O - M] LogicCase (aka logic_case)
+[x] [L - K I O - M] LogicBranchList (aka logic_branch_listener)
+[x] [L - K I O - M] EnvMicrophone (aka env_microphone)
+[x] [L - K I O - M] TimerEntity (aka logic_timer)
+[x] [L - K I O - M] MathCounter (aka math_counter)
[x] [L - K I - T M] AmbientGeneric (aka ambient_generic)
+[x] [L N K I - T M] ScriptIntro (aka script_intro)
[x] [L - - - - - M] SceneManager (aka scene_manager)
[x] [L - K I - - M] AreaPortal (aka func_areaportal)
+[x] [L - K I O - M] EnvGlobal (aka env_global)
[x] [L N K I - - M] FuncAreaPortalWindow (aka func_areaportalwindow)
+[x] [L - K I O - M] LogicBranch (aka logic_branch)
+[x] [L - K I O - M] LogicCompare (aka logic_compare)
[x] [L - K I O - M] LogicRelay (aka logic_relay)
[x] [L N - I - - M] EnvTonemapController (aka env_tonemap_controller)
+[x] [L - K I O - M] MathRemap (aka math_remap)
[x] [L - K I O - M] BaseFilter (aka filter_base)
[x] [L - - I O - M] Credits (aka env_credits)
+[x] [L - K - O T M] MultiSource (aka multisource)
[x] [L - K - O T M] TriggerProximity (aka trigger_proximity)
+[x] [L - K I O - M] MathColorBlend (aka math_colorblend)
+[x] [L - K I - T -] LogicActiveAutosave (aka logic_active_autosave)
+[x] [L - K I - - -] LogicAutosave (aka logic_autosave)
+[x] [L - K I O - -] LogicCompareInteger (aka logic_multicompare)
+[x] [L - - - - - M] NPC_Breen (aka npc_breen)
[x] [L - K - - - M] TriggerSoundscape (aka trigger_soundscape)
[x] [L - - - - - M] FrictionModifier (aka func_friction)
+[x] [L - K - O - M] LogicLineToEntity (aka logic_lineto)
[x] [L - - - O T M] TriggerMultiple (aka trigger_multiple)
[x] [L - K - - - M] TriggerSave (aka trigger_autosave)
[x] [L - K I - - M] TriggerToggleSave (aka trigger_togglesave)
@@ -18705,8 +18724,6 @@ Datadesc and methods that the entities above inherit.
[x] [L N - - - - -] GMODGameRulesProxy (aka gmod_gamerules)
[x] [L N - - - - -] HL2MPGameRulesProxy (aka hl2mp_gamerules)
[x] [L - - - - - M] TriggerOnce (aka trigger_once)
-[ ] [L - K I O - _] PathTrack (aka path_track)
-[ ] [L N K I - T _] ScriptIntro (aka script_intro)
[ ] [L N K I O - _] BaseTrigger (aka trigger)
[ ] [L - K I O T _] TriggerHurt (aka trigger_hurt)
[ ] [L N K _ O - _] SceneEntity (aka logic_choreographed_scene, scripted_scene)
@@ -18717,15 +18734,21 @@ Datadesc and methods that the entities above inherit.
[ ] [L - - - - - _] SoundEnt (aka soundent)
[ ] [L - - - - - _] NPC_GMan (aka npc_gman)
[ ] [L N - - - - _] WeaponPhysGun (aka weapon_physgun)
+[ ] [L N K _ _ T _] FuncTrackTrain (aka func_tracktrain)
[ ] [L - K - - - _] GenericActor (aka generic_actor)
[ ] [L N K _ _ T _] FuncRotating (aka func_rotating)
[ ] [L - K I O - _] EnvFade (aka env_fade)
+[ ] [L N - - - T _] PlayerResource (aka player_manager)
[ ] [L - K I - - _] EnvZoom (aka env_zoom)
[ ] [L N - - - - _] TriggerPlayerMovement (aka trigger_playermovement)
[ ] [L - K I O _ _] TriggerImpact (aka trigger_impact)
+[ ] [L N - - - - _] WeaponStunStick (aka weapon_stunstick)
+[ ] [L N - - - - _] WeaponCrowbar (aka weapon_crowbar)
[ ] [- N - - - - _] BaseAnimatingOverlay
[ ] [- - _ _ - - _] AI_BaseActor
+[ ] [L - _ - - - M] SkyCamera (aka sky_camera)
[ ] [L - - - - - _] NodeEnt (aka info_hint, info_node, info_node_air, info_node_air_hint, info_node_climb, info_node_hint)
+[ ] [- N - _ O _ _] BaseCombatWeapon
[ ] [L - _ - - - _] FuncNavObstruction (aka func_nav_avoidance_obstacle)
[ ] [L - _ I O - _] EnvSoundscape (aka env_sound, env_soundscape)
[ ] [L N - - - - _] AR2Explosion (aka ar2explosion)
@@ -18737,10 +18760,11 @@ Datadesc and methods that the entities above inherit.
[ ] [L N - - - - _] SporeTrail (aka env_sporetrail)
[ ] [L N - - - - _] SpriteOriented (aka env_sprite_oriented)
[ ] [- N - - - - _] HL2MP_Player
+[ ] [L - _ I - - _] LogicCollisionPair (aka logic_collision_pair)
+[ ] [L N - - - - _] BaseViewModel (aka viewmodel)
[ ] [L - _ _ - - _] TriggerPush (aka trigger_push)
-[ ] [L N _ _ _ _ _] DynamicProp (aka asw_door, dod_control_point, dynamic_prop, env_portal_laser, npc_personality_core, npc_wheatley_boss, prop_button, prop_car_alarm, prop_car_glass, prop_dropper, prop_dynamic, prop_dynamic_glow, prop_dynamic_override, prop_floor_ball_button, prop_floor_button, prop_floor_cube_button, prop_health_cabinet, prop_indicator_panel, prop_laser_catcher, prop_laser_relay, prop_portal_stats_display, prop_testchamber_door, prop_tractor_beam, prop_under_button, prop_under_floor_button, prop_wall_projector, team_control_point)
[ ] [L N _ _ O _ _] BaseEntity (aka func_proprrespawnzone)
-[ ] [- N - _ _ _ _] BaseCombatWeapon
+[ ] [L N _ _ _ _ _] DynamicProp (aka asw_door, dod_control_point, dynamic_prop, env_portal_laser, npc_personality_core, npc_wheatley_boss, prop_button, prop_car_alarm, prop_car_glass, prop_dropper, prop_dynamic, prop_dynamic_glow, prop_dynamic_override, prop_floor_ball_button, prop_floor_button, prop_floor_cube_button, prop_health_cabinet, prop_indicator_panel, prop_laser_catcher, prop_laser_relay, prop_portal_stats_display, prop_testchamber_door, prop_tractor_beam, prop_under_button, prop_under_floor_button, prop_wall_projector, team_control_point)
[ ] [- N - _ - - _] HL2_Player
[ ] [L - _ _ O _ _] PointViewControl (aka point_viewcontrol)
[ ] [L - _ - - - M] FilterMultiple (aka filter_multi)
@@ -18756,20 +18780,20 @@ Datadesc and methods that the entities above inherit.
[ ] [L - - - - - _] FuncNavPrefer (aka func_nav_prefer)
[ ] [L - _ _ - - _] FuncBrush (aka func_brush, func_simpleladder)
[ ] [L N _ _ _ - _] FuncLadder (aka func_useableladder)
+[ ] [- N - _ - - _] BasePlayer
[ ] [L N - _ - - _] PropScalable (aka prop_coreball, prop_scalable)
[ ] [L N - - - - _] WeaponShotgun (aka weapon_shotgun)
-[ ] [L N - - - - _] BaseViewModel (aka viewmodel)
[ ] [L N - - - - _] WeaponPhysCannon (aka weapon_physcannon)
-[ ] [- N - _ - - _] BasePlayer
[ ] [L N - - - - _] FireTrail (aka env_fire_trail)
[ ] [L N _ _ - - _] FleshEffectTarget (aka point_flesh_effect_target)
[ ] [L N - - - - _] RocketTrail (aka env_rockettrail)
[ ] [L N - - - - _] VortigauntEffectDispel (aka vort_effect_dispel)
[ ] [L N - - - - _] WeaponCubemap (aka weapon_cubemap)
[ ] [L N - - - - _] WeaponOldManHarpoon (aka weapon_oldmanharpoon)
+[ ] [- N _ _ - - _] BaseCombatCharacter
+[ ] [- N _ _ _ _ _] AI_BaseNPC
[ ] [L N - - - - _] WeaponHL2MPBase (aka weapon_hl2mp_base)
[ ] [L N - - - - _] WeaponSMG1 (aka weapon_smg1)
-[ ] [- N _ _ _ _ _] AI_BaseNPC
[ ] [L N - - - - _] BaseHL1MPCombatWeapon (aka basehl1mpcombatweapon)
[ ] [L N _ _ - - _] EnvAmbientLight (aka env_ambient_light)
[ ] [L N _ - - - _] InfoLightingRelative (aka info_lighting_relative)
@@ -18781,16 +18805,15 @@ Datadesc and methods that the entities above inherit.
[ ] [L N - - - - _] WeaponCitizenPackage (aka weapon_citizenpackage)
[ ] [L - - - - - _] EnvLight (aka light_environment)
[ ] [_ - _ _ _ - M] Message (aka env_message)
+[ ] [L N _ _ _ _ _] PhysicsProp (aka item_crate, physics_prop, prop_exploding_barrel, prop_flare, prop_physics, prop_physics_multiplayer, prop_physics_override, prop_weighted_cube)
+[ ] [- N _ _ _ - _] BaseAnimating
[ ] [L N - - - - _] FireSmoke (aka _firesmoke)
[ ] [L N - _ - - _] FuncMonitor (aka func_monitor)
[ ] [L N - _ - - _] InfoTeleporterCountdown (aka info_teleporter_countdown)
[ ] [L N _ _ - - _] NPC_Puppet (aka npc_puppet)
-[ ] [L N - - - _ _] PlayerResource (aka player_manager)
[ ] [L N _ - - - _] RotorWashEmitter (aka env_rotorwash_emitter)
[ ] [L N - - - - _] WeaponCycler (aka cycler_weapon)
-[ ] [L N _ _ _ _ _] PhysicsProp (aka item_crate, physics_prop, prop_exploding_barrel, prop_flare, prop_physics, prop_physics_multiplayer, prop_physics_override, prop_weighted_cube)
-[ ] [- N _ _ _ - _] BaseAnimating
-[ ] [- N _ _ - - _] BaseCombatCharacter
+[ ] [L N _ - - - _] World (aka worldspawn)
[ ] [L N - - - - _] WeaponPistol (aka weapon_pistol)
[ ] [L N - - - - _] BaseHL1CombatWeapon (aka basehl1combatweapon)
[ ] [L N _ - - _ _] Embers (aka env_embers)
@@ -18809,10 +18832,10 @@ Datadesc and methods that the entities above inherit.
[ ] [L N - - - - _] EntityParticleTrail (aka env_particle_trail)
[ ] [L N _ _ - - _] FuncOccluder (aka func_occluder)
[ ] [L N - - - _ _] RpgRocket (aka rpg_rocket)
-[ ] [L N _ - - - _] World (aka worldspawn)
[ ] [L N - - - - _] Weapon357 (aka weapon_357)
[ ] [L - _ _ - _ _] Light (aka light, light_directional, light_glspot, light_spot)
[ ] [L N _ _ - - _] SteamJet (aka env_steam, env_steamjet)
+[ ] [- - - - _ _ _] Item
[ ] [L N - - - - _] BaseHL2MPCombatWeapon (aka basehl2mpcombatweapon)
[ ] [L N - - - - _] FlexManipulate (aka manipulate_flex)
[ ] [L N _ _ - - _] FuncConveyor (aka func_conveyor)
@@ -18832,7 +18855,6 @@ Datadesc and methods that the entities above inherit.
[ ] [L N - - - - _] WeaponCrossbow_HL1 (aka weapon_crossbow_hl1)
[ ] [L N - - - - _] WeaponCrowbar_HL1 (aka weapon_crowbar_hl1)
[ ] [L - - _ - - _] PropDoorRotatingBreakable (aka dz_door, prop_door_rotating, prop_door_rotating_checkpoint)
-[ ] [L N - - - - _] WeaponStunStick (aka weapon_stunstick)
[ ] [L N _ _ - _ _] CrossbowBolt (aka crossbow_bolt)
[ ] [L N - _ - - _] DynamicLight (aka light_dynamic)
[ ] [L N - _ - _ _] PropEnergyBall (aka prop_energy_ball)
@@ -18843,7 +18865,6 @@ Datadesc and methods that the entities above inherit.
[ ] [L N - - - - _] BoneFollower (aka phys_bone_follower)
[ ] [L N _ - - - _] DustTrail (aka env_dusttrail)
[ ] [L N _ _ - - _] ShadowControl (aka shadow_control)
-[ ] [L N - - - - _] WeaponCrowbar (aka weapon_crowbar)
[ ] [L N - - - - _] BaseHLCombatWeapon (aka basehlcombatweapon)
[ ] [L N _ _ - _ _] ColorCorrectionVolume (aka color_correction_volume)
[ ] [L N - - - _ _] SENT_Point (aka sent_point)
@@ -18866,7 +18887,6 @@ Datadesc and methods that the entities above inherit.
[ ] [L N - - - - _] WeaponGlock (aka weapon_glock_hl1)
[ ] [L N - - - - _] WeaponMP5 (aka weapon_mp5_hl1)
[ ] [L N - - - - _] GMOD_Player (aka player)
-[ ] [- - - - _ _ _] Item
[ ] [L N - - - - _] WeaponAlyxGun (aka weapon_alyxgun)
[ ] [L - _ _ - - _] FuncNavPrerequisite (aka func_nav_prerequisite)
[ ] [L N - - _ _ _] NPC_Barney (aka npc_barney)
@@ -18881,6 +18901,7 @@ Datadesc and methods that the entities above inherit.
[ ] [L N _ _ _ - _] PhysMagnet (aka phys_magnet)
[ ] [L N _ _ - - _] PointWorldText (aka point_worldtext)
[ ] [L N - - - - _] WeaponBugBait (aka weapon_bugbait)
+[ ] [L - K _ O - _] NPC_MetroPolice (aka npc_metropolice)
[ ] [L N _ _ - _ _] Flare (aka env_flare)
[ ] [L - _ _ - - _] FuncNavBlocker (aka func_nav_blocker)
[ ] [L N _ _ - - _] RopeKeyframe (aka keyframe_rope, move_rope)
@@ -18888,12 +18909,13 @@ Datadesc and methods that the entities above inherit.
[ ] [L N _ _ - - _] EnvScreenOverlay (aka env_screenoverlay)
[ ] [L N - - - _ _] WeaponSLAM (aka weapon_slam)
[ ] [L N _ _ - _ _] BreakableSurface (aka func_breakable_surf)
+[ ] [L N _ _ _ - _] PropVehiclePrisonerPod (aka prop_vehicle_prisoner_pod)
[ ] [L N _ _ - - _] SlideshowDisplay (aka vgui_slideshow_display)
[ ] [L N _ _ _ _ _] BaseDoor (aka func_door, func_water)
+[ ] [L N _ _ _ - _] PropCrane (aka prop_vehicle_crane)
[ ] [L N _ _ _ - _] PropJeepEpisodic (aka prop_vehicle_jeep, prop_vehicle_jeep_old)
[ ] [L N _ _ - _ _] EnvProjectedTexture (aka env_projectedtexture)
[ ] [L N _ _ - _ _] RagdollProp (aka physics_prop_ragdoll, prop_ragdoll)
-[ ] [L - _ - - - _] SkyCamera (aka sky_camera)
[ ] [L N - - - _ _] LuaNextBot (aka sent_nextbot)
[ ] [L N - - - - _] WeaponCrossbow (aka weapon_crossbow)
[ ] [L N _ _ - _ _] NPC_Portal_FloorTurret (aka npc_portal_turret_floor)
@@ -18901,38 +18923,35 @@ Datadesc and methods that the entities above inherit.
[ ] [L N _ _ _ - _] EnvHeadcrabCanister (aka env_headcrabcanister)
[ ] [L N _ _ - _ _] FogController (aka env_fog_controller)
[ ] [- N _ _ - _ _] SpatialEntity
+[ ] [L N _ _ _ - _] PropVehicleDriveable (aka prop_vehicle_driveable)
[ ] [L N _ _ - _ _] PoseController (aka point_posecontroller)
[ ] [L N - _ _ _ _] NPC_RocketTurret (aka npc_rocket_turret)
[ ] [- N - - - _ _] NextBotCombatCharacter
[ ] [L N - - - _ _] SENT_Anim (aka sent_anim)
[ ] [L N _ _ - - _] Beam (aka beam)
-[ ] [L N _ _ _ - _] PropVehiclePrisonerPod (aka prop_vehicle_prisoner_pod)
-[ ] [L N _ _ _ - _] PropCrane (aka prop_vehicle_crane)
+[ ] [- N - _ - - _] PropJeep
[ ] [L N _ _ _ _ _] NPC_Barnacle (aka npc_barnacle)
[ ] [L N - _ - _ _] PropCombineBall (aka prop_combine_ball)
[ ] [L N _ _ _ - _] PropVehicleChoreoGeneric (aka prop_vehicle_choreo_generic)
-[ ] [L N _ _ _ - _] PropVehicleDriveable (aka prop_vehicle_driveable)
[ ] [L N - _ - - _] PropAirboat (aka prop_vehicle_airboat)
[ ] [L N - - - - _] WeaponSWEP (aka weapon_swep)
[ ] [L N - - - _ _] SENT_AI (aka sent_ai)
[ ] [L - _ _ _ - _] PointTemplate (aka point_template)
[ ] [- N _ _ _ - _] PropDoorRotating
-[ ] [L N _ _ _ _ _] FuncTrackTrain (aka func_tracktrain)
+[ ] [L - _ _ _ _ _] AI_ScriptedSequence (aka scripted_sequence)
[ ] [L N _ _ - - _] ParticleSystem (aka info_particle_system)
[ ] [L N - _ _ _ _] NPC_CombineGunship (aka npc_combinegunship)
[ ] [L N _ _ _ _ _] NPC_RollerMine (aka npc_rollermine)
[ ] [- N _ _ _ _ _] BaseHelicopter_HL1
[ ] [L N _ _ _ - _] NPC_AntlionGuard (aka npc_antlionguard)
[ ] [L N _ _ _ _ _] NPC_Manhack (aka npc_manhack)
-[ ] [- N - _ - - _] PropJeep
[ ] [L N _ _ _ - _] NPC_Vortigaunt (aka npc_vortigaunt)
[ ] [- N _ _ _ - _] BasePropDoor
[ ] [L - _ _ _ _ _] Breakable (aka func_breakable)
[ ] [- N _ _ - _ _] BaseHelicopter
-[ ] [_ - _ _ _ _ _] AI_ScriptedSequence (aka scripted_sequence)
+[ ] [- - _ _ - - _] AI_PlayerAlly
[ ] [L N _ _ - _ _] NPC_Strider (aka npc_strider)
[ ] [- N _ _ _ _ _] BreakableProp
-[ ] [_ - _ _ _ - _] NPC_MetroPolice (aka npc_metropolice)
[ ] [_ - _ _ - _ _] NPC_Hunter (aka npc_hunter)
[ ] [_ - _ _ _ _ _] NPC_AttackHelicopter (aka npc_helicopter)
[ ] [- - _ _ _ - _] NPC_PlayerCompanion
@@ -18946,14 +18965,12 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - _ _ _ - _] NPC_CScanner (aka npc_cscanner)
[ ] [_ - _ _ _ - _] ProtoSniper (aka npc_sniper, proto_sniper)
[ ] [_ - - _ - _ _] FastZombie (aka npc_fastzombie, npc_fastzombie_torso)
-[ ] [- - _ _ - - _] AI_PlayerAlly
[ ] [- - _ _ - _ _] BaseHeadcrab
[ ] [- - - - - - _] NPC_BaseZombie
[ ] [- - - _ - - _] NPC_BaseScanner
[ ] [_ - _ _ _ - _] AntlionTemplateMaker (aka npc_antlion_template_maker)
[ ] [- - - _ - - _] AI_TrackPather
[ ] [_ - - _ _ - -] FuncInstanceIoProxy (aka func_instance_io_proxy)
-[ ] [_ - _ _ _ _ _] AI_ScriptConditions (aka ai_script_conditions)
[ ] [- - - - - _ _] NPCSimpleTalker
[ ] [_ - - _ _ - _] NPC_Dog (aka npc_dog)
[ ] [_ - - - - - _] NextBotPlayer (aka gm_bot)
@@ -18971,7 +18988,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - _ _ _ _ _] BounceBomb (aka bounce_bomb, combine_bouncemine, combine_mine)
[ ] [_ - - - - - _] NPC_Controller (aka monster_alien_controller)
[ ] [_ - _ _ _ _ _] NPC_Launcher (aka npc_launcher)
-[ ] [_ - _ _ _ - _] LogicCase (aka logic_case)
[ ] [_ - _ _ - _ _] NPC_CombineCamera (aka npc_combine_camera)
[ ] [_ - - - - _ _] NPC_Scientist (aka monster_scientist)
[ ] [_ - _ _ _ _ _] Fire (aka env_fire)
@@ -19006,22 +19022,18 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - _ _ _ - _] APCController (aka point_apc_controller)
[ ] [_ - _ _ _ _ _] FuncMoveLinear (aka func_movelinear, func_water_analog, momentary_door)
[ ] [_ - _ _ _ _ _] FuncCombineBallSpawner (aka func_combine_ball_spawner)
-[ ] [_ - _ _ _ - _] LogicBranchList (aka logic_branch_listener)
[ ] [_ - _ _ _ _ _] NPC_Bullseye (aka bullseye_strider_focus, npc_bullseye)
[ ] [- - _ _ _ - _] PhysConstraint
[ ] [_ - _ _ - - _] AI_Relationship (aka ai_relationship)
[ ] [_ - - _ _ _ _] AntlionGrub (aka npc_antlion_grub)
[ ] [_ - _ _ - _ _] Item_DynamicResupply (aka item_dynamic_resupply)
[ ] [_ - _ _ - _ _] PhysHinge (aka phys_hinge)
-[ ] [_ - _ _ _ - _] EnvMicrophone (aka env_microphone)
[ ] [_ - _ _ - - _] GameText (aka game_text, game_text_tf)
[ ] [_ - _ _ _ - _] PointSpotlight (aka point_spotlight)
-[ ] [_ - _ _ _ - _] TimerEntity (aka logic_timer)
[ ] [_ - _ _ _ - _] GameUI (aka game_ui)
[ ] [_ - - - - _ _] Missile (aka rpg_missile)
[ ] [_ - _ _ - - _] PropVehicle (aka prop_vehicle)
[ ] [_ - - - - _ _] HunterFlechette (aka hunter_flechette)
-[ ] [_ - _ _ _ - _] MathCounter (aka math_counter)
[ ] [_ - _ _ _ - _] NPC_CraneDriver (aka npc_cranedriver)
[ ] [_ - - _ - _ _] NPC_Nihilanth (aka monster_nihilanth)
[ ] [_ - _ _ - - _] SceneListManager (aka logic_scene_list_manager)
@@ -19095,7 +19107,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - _ _ - _ _] AI_ScriptedSchedule (aka aiscripted_schedule)
[ ] [_ - _ _ - - _] AreaPortalOneWay (aka func_areaportal_oneway)
[ ] [_ - _ _ - _ _] EnvEffectsScript (aka env_effectscript)
-[ ] [_ - _ _ _ - _] EnvGlobal (aka env_global)
[ ] [_ - _ _ _ _ _] EnvSpark (aka env_spark)
[ ] [_ - _ _ _ _ _] Item_AmmoCrate (aka item_ammo_crate)
[ ] [_ - _ _ _ - _] LogicCoopManager (aka logic_coop_manager)
@@ -19109,8 +19120,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - - _ - _ _] GrenadeFrag (aka npc_grenade_frag)
[ ] [_ - - - - - _] HL1NPC_Zombie (aka monster_zombie)
[ ] [_ - - - - - _] HL1_CNPC_GMan (aka monster_gman)
-[ ] [_ - _ _ _ - _] LogicBranch (aka logic_branch)
-[ ] [_ - _ _ _ - _] LogicCompare (aka logic_compare)
[ ] [_ - _ _ - _ _] PointHurt (aka point_hurt)
[ ] [_ - _ _ _ _ _] PropThumper (aka prop_thumper)
[ ] [_ - _ _ _ - _] TriggerBrush (aka trigger_brush)
@@ -19127,7 +19136,6 @@ Datadesc and methods that the entities above inherit.
[ ] [- - _ - - - _] BasePlatTrain
[ ] [_ - _ _ _ - _] EnvPlayerSurfaceTrigger (aka env_player_surface_trigger)
[ ] [_ - _ _ - - _] FuncTankAPCRocket (aka func_tankapcrocket)
-[ ] [_ - _ _ - - _] LogicCollisionPair (aka logic_collision_pair)
[ ] [_ - - _ - - _] LogicNavigation (aka logic_navigation)
[ ] [_ - _ _ - - _] MessageEntity (aka point_message)
[ ] [_ - _ - - - _] PathKeyFrame (aka keyframe_track)
@@ -19143,7 +19151,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - - - - - _] GrenadeSpit (aka grenade_spit)
[ ] [_ - _ _ - - _] KeepUpright (aka phys_keepupright)
[ ] [_ - _ _ _ - _] LogicEventListenerItemEquip (aka logic_eventlistener_itemequip)
-[ ] [_ - _ _ _ - _] MathRemap (aka math_remap)
[ ] [_ - _ _ _ _ _] MultiManager (aka multi_manager)
[ ] [_ - - - - - _] NewNPC (aka npc_newnpc)
[ ] [_ - - - - - _] PlayerPickupController (aka player_pickup)
@@ -19166,7 +19173,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - _ _ - - _] GameGibManager (aka game_gib_manager)
[ ] [_ - - _ - - _] GamePlayerEquip (aka game_player_equip)
[ ] [_ - _ _ _ - _] LogicEventListener (aka logic_eventlistener)
-[ ] [_ - _ - _ _ _] MultiSource (aka multisource)
[ ] [_ - _ - - - _] NPCMaker (aka npc_maker)
[ ] [_ - - - - - _] NPC_BabyCrab (aka monster_babycrab)
[ ] [_ - _ _ - - _] NPC_EnemyFinderCombineCannon (aka npc_enemyfinder_combinecannon)
@@ -19190,7 +19196,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - - - - _ _] HelicopterChunk (aka helicopter_chunk)
[ ] [_ - _ _ - _ _] InfoDarknessLightSource (aka info_darknessmode_lightsource)
[ ] [_ - _ _ - _ _] LookDoor (aka func_lookdoor)
-[ ] [_ - _ _ _ - _] MathColorBlend (aka math_colorblend)
[ ] [_ - - - - - _] NPC_Eli (aka npc_eli)
[ ] [_ - - - - - _] NPC_Mossman (aka npc_mossman)
[ ] [_ - _ _ - - _] OrnamentProp (aka prop_dynamic_ornament)
@@ -19215,10 +19220,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - - - - _ _] GrenadeBugBait (aka npc_grenade_bugbait)
[ ] [_ - - - - - _] GrubNugget (aka item_grubnugget)
[ ] [_ - _ - _ - _] InfoBM (aka info_bigmomma)
-[ ] [_ - _ _ - _ -] LogicActiveAutosave (aka logic_active_autosave)
-[ ] [_ - _ _ - - -] LogicAutosave (aka logic_autosave)
-[ ] [_ - _ _ _ - -] LogicCompareInteger (aka logic_multicompare)
-[ ] [_ - - - - - _] NPC_Breen (aka npc_breen)
[ ] [_ - - - - _ _] NPC_ControllerHeadBall (aka controller_head_ball)
[ ] [_ - _ - - - _] PhysLength (aka phys_lengthconstraint)
[ ] [_ - _ _ - - _] PointCombineBallLauncher (aka point_combine_ball_launcher)
@@ -19243,7 +19244,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - - - - _ _] GrenadeMP5 (aka grenade_mp5)
[ ] [_ - - - - _ _] HL1Gib (aka hl1gib)
[ ] [_ - - - - _ _] HandGrenade (aka grenade_hand)
-[ ] [_ - _ - _ - _] LogicLineToEntity (aka logic_lineto)
[ ] [_ - _ - _ - _] NPCSpawnDestination (aka info_npc_spawn_destination)
[ ] [_ - - - - _ _] NPC_ControllerZapBall (aka controller_energy_ball)
[ ] [_ - - - - - _] NPC_FlockingFlyerFlock (aka monster_flyer_flock)
From 745517fae6a977c8ed79725477c61f848096f2c8 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:47:39 -0700
Subject: [PATCH 07/15] WCEditPosition -> WorldcraftEditPosition
---
Game.Server/Items.cs | 2 +-
Game.Shared/BaseEntityShared.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Game.Server/Items.cs b/Game.Server/Items.cs
index e84593fa5..ce41f38c6 100644
--- a/Game.Server/Items.cs
+++ b/Game.Server/Items.cs
@@ -46,7 +46,7 @@ public class Item : BaseAnimating, IPlayerPickupVPhysics
public QAngle PreferredCarryAngles() => ((IPlayerPickupVPhysics)pickup).PreferredCarryAngles();
public bool ShouldPuntUseLaunchForces(PhysGunForce reason) => ((IPlayerPickupVPhysics)pickup).ShouldPuntUseLaunchForces(reason);
- public override EntityCapabilities ObjectCaps() => base.ObjectCaps() | EntityCapabilities.ImpulseUse | EntityCapabilities.WCEditPosition;
+ public override EntityCapabilities ObjectCaps() => base.ObjectCaps() | EntityCapabilities.ImpulseUse | EntityCapabilities.WorldcraftEditPosition;
public override void Use(BaseEntity? activator, BaseEntity? caller, UseType useType, float value) {
BasePlayer? player = ToBasePlayer(activator);
diff --git a/Game.Shared/BaseEntityShared.cs b/Game.Shared/BaseEntityShared.cs
index db5f6030f..a34a8d89c 100644
--- a/Game.Shared/BaseEntityShared.cs
+++ b/Game.Shared/BaseEntityShared.cs
@@ -85,7 +85,7 @@ public enum EntityCapabilities : uint
UseInRadius = 0x00000200,
SaveNonNetworkable = 0x00000400,
Master = 0x10000000,
- WCEditPosition = 0x40000000,
+ WorldcraftEditPosition = 0x40000000, // guessing this is referring to worldcraft/hammer with WC
DontSave = 0x80000000
}
From ef937efc19fe6f0a1abcb2ec6819179536e28290 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:47:39 -0700
Subject: [PATCH 08/15] TransformAnglesToLocalSpace/WorldSpace
---
Source.Common/Mathematics/MathLib.cs | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/Source.Common/Mathematics/MathLib.cs b/Source.Common/Mathematics/MathLib.cs
index 36b33a22d..c6dfb2a2f 100644
--- a/Source.Common/Mathematics/MathLib.cs
+++ b/Source.Common/Mathematics/MathLib.cs
@@ -1798,6 +1798,23 @@ public static void BasisToQuaternion(in Vector3 forward, in Vector3 right, in Ve
AngleQuaternion(in angles, out q);
}
+ public static QAngle TransformAnglesToLocalSpace(in QAngle angles, in Matrix3x4 parentMatrix) {
+ MatrixInvert(parentMatrix, out Matrix3x4 worldToParent);
+ AngleMatrix(angles, out Matrix3x4 angToWorld);
+ ConcatTransforms(worldToParent, angToWorld, out Matrix3x4 localMatrix);
+
+ MatrixAngles(localMatrix, out QAngle outAngles);
+ return outAngles;
+ }
+
+ // transform a set of angles in the input space of parentMatrix to the output space
+ public static QAngle TransformAnglesToWorldSpace(in QAngle angles, in Matrix3x4 parentMatrix) {
+ AngleMatrix(angles, out Matrix3x4 angToParent);
+ ConcatTransforms(parentMatrix, angToParent, out Matrix3x4 angToWorld);
+ MatrixAngles(angToWorld, out QAngle outAngles);
+ return outAngles;
+ }
+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void MatrixAngles(in Matrix3x4 matrix, out QAngle angles, out Vector3 position) {
MatrixAngles(matrix, out angles);
From abc08b5ef51e4c6a902117c91dacde7488883628 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:47:39 -0700
Subject: [PATCH 09/15] PropData + IBreakableWithPropData impl
---
Game.Client/C_BaseEntity.cs | 2 +
Game.Client/C_BasePlayer.cs | 2 +-
Game.Server/BaseEntity.cs | 9 +
Game.Server/FuncBreak.cs | 47 +++-
Game.Server/PhysObj.cs | 2 +
Game.Shared/PropsShared.cs | 433 +++++++++++++++++++++++++++++++++++-
6 files changed, 490 insertions(+), 5 deletions(-)
diff --git a/Game.Client/C_BaseEntity.cs b/Game.Client/C_BaseEntity.cs
index 02f774afe..9a3e85461 100644
--- a/Game.Client/C_BaseEntity.cs
+++ b/Game.Client/C_BaseEntity.cs
@@ -737,6 +737,8 @@ public C_BaseEntity() {
public InlineArray32 OverrideSubMaterials;
[NetworkName("m_iHealth")]
public int Health;
+ public int GetHealth() => Health;
+ public int SetHealth(int amt) => Health = amt;
[NetworkName("m_iMaxHealth")]
public int MaxHealth;
[NetworkName("m_spawnflags")]
diff --git a/Game.Client/C_BasePlayer.cs b/Game.Client/C_BasePlayer.cs
index 287d84043..81b42aefd 100644
--- a/Game.Client/C_BasePlayer.cs
+++ b/Game.Client/C_BasePlayer.cs
@@ -715,7 +715,7 @@ public virtual float GetFOV() {
public float VehicleViewFOV;
public int VehicleViewSavedFrame;
- public int GetHealth() => Health;
+
public bool IsSuitEquipped() => Local.WearingSuit;
public TimeUnit_t GetLaggedMovementValue() => LaggedMovementValue;
diff --git a/Game.Server/BaseEntity.cs b/Game.Server/BaseEntity.cs
index 0171714bf..0c851bc3c 100644
--- a/Game.Server/BaseEntity.cs
+++ b/Game.Server/BaseEntity.cs
@@ -2262,6 +2262,15 @@ public void SetBlocksLOS(bool blocksLOS) {
public bool BlocksLOS() => !IsEFlagSet(EFL.DontBlockLOS);
+ public void SetAIWalkable(bool blocksLOS) {
+ if (blocksLOS)
+ RemoveEFlags(EFL.DontWalkOn);
+ else
+ AddEFlags(EFL.DontWalkOn);
+ }
+
+ public bool IsAIWalkable() => !IsEFlagSet(EFL.DontWalkOn);
+
public Vector3 AbsVelocity;
public QAngle AngVelocity;
diff --git a/Game.Server/FuncBreak.cs b/Game.Server/FuncBreak.cs
index 44fe1702f..93ffc890b 100644
--- a/Game.Server/FuncBreak.cs
+++ b/Game.Server/FuncBreak.cs
@@ -5,4 +5,49 @@
namespace Game.Server;
[LinkEntityToClass("func_breakable")]
-public class Breakable : BaseEntity, IBreakableWithPropData;
+public class Breakable : BaseEntity, IBreakableWithPropData
+{
+ public void SetDmgModBullet(float dmgMod) => DmgModBullet = dmgMod;
+ public void SetDmgModClub(float dmgMod) => DmgModClub = dmgMod;
+ public void SetDmgModExplosive(float dmgMod) => DmgModExplosive = dmgMod;
+ public float GetDmgModBullet() => DmgModBullet;
+ public float GetDmgModClub() => DmgModClub;
+ public float GetDmgModExplosive() => DmgModExplosive;
+ public void SetExplosiveRadius(float radius) => ExplodeRadius = radius;
+ public void SetExplosiveDamage(float damage) => ExplosionMagnitude = (int)damage;
+ public float GetExplosiveRadius() => ExplodeRadius;
+ public float GetExplosiveDamage() => ExplosionMagnitude;
+ public void SetPhysicsDamageTable(ReadOnlySpan tableName) => PhysicsDamageTableName = tableName.IsEmpty ? null : new(tableName);
+ public ReadOnlySpan GetPhysicsDamageTable() => PhysicsDamageTableName;
+ public void SetBreakableModel(ReadOnlySpan model) => BreakableModel = model.IsEmpty ? null : new(model);
+ public ReadOnlySpan GetBreakableModel() => BreakableModel;
+ public void SetBreakableSkin(int skin) => BreakableSkin = skin;
+ public int GetBreakableSkin() => BreakableSkin;
+ public void SetBreakableCount(int count) => BreakableCount = count;
+ public int GetBreakableCount() => BreakableCount;
+ public void SetMaxBreakableSize(int size) => MaxBreakableSize = size;
+ public int GetMaxBreakableSize() => MaxBreakableSize;
+ public void SetPropDataBlocksLOS(bool blocksLOS) => SetBlocksLOS(blocksLOS);
+ public void SetPropDataIsAIWalkable(bool blocksLOS) => SetAIWalkable(blocksLOS);
+ public void SetBasePropData(ReadOnlySpan propdata) => BasePropData = propdata.IsEmpty ? null : new(propdata);
+ public ReadOnlySpan GetBasePropData() => BasePropData;
+ public void SetInteraction(PropDataInteractions interaction) => Interactions |= (1 << (int)interaction);
+ public bool HasInteraction(PropDataInteractions interaction) => (Interactions & (1 << (int)interaction)) != 0;
+ public void SetPhysicsMode(PhysicsMultiplayerMode mode) { }
+ public PhysicsMultiplayerMode GetPhysicsMode() => PhysicsMultiplayerMode.Solid;
+ public void SetMultiplayerBreakMode(MultiplayerBreak mode) { }
+ public MultiplayerBreak GetMultiplayerBreakMode() => MultiplayerBreak.Default;
+
+ protected float DmgModBullet;
+ protected float DmgModClub;
+ protected float DmgModExplosive;
+ protected string? PhysicsDamageTableName;
+ protected string? BreakableModel;
+ protected int BreakableSkin;
+ protected int BreakableCount;
+ protected int MaxBreakableSize;
+ protected string? BasePropData;
+ protected int Interactions;
+ protected int ExplosionMagnitude;
+ protected float ExplodeRadius;
+}
diff --git a/Game.Server/PhysObj.cs b/Game.Server/PhysObj.cs
index cdb525228..6137d79d6 100644
--- a/Game.Server/PhysObj.cs
+++ b/Game.Server/PhysObj.cs
@@ -8,6 +8,8 @@ namespace Game.Server;
[NetworkName("CPhysBox")]
public class PhysBox : Breakable
{
+ public const int SF_PHYSBOX_ENABLE_ON_PHYSCANNON = 0x20000;
+
public static readonly SendTable DT_PhysBox = new(DT_BaseEntity, []);
public static readonly new ServerClass ServerClass = new ServerClass(DT_PhysBox);
}
diff --git a/Game.Shared/PropsShared.cs b/Game.Shared/PropsShared.cs
index 1ded17730..5a0fb5ff0 100644
--- a/Game.Shared/PropsShared.cs
+++ b/Game.Shared/PropsShared.cs
@@ -1,11 +1,438 @@
global using static Game.Shared.PropsSharedGlobals;
+using CommunityToolkit.HighPerformance;
+
+using Source.Common.Formats.Keyvalues;
+using Source.Common.Mathematics;
+
+using System.Numerics;
+
namespace Game.Shared;
public static class PropsSharedGlobals
{
- public const int SF_PHYSPROP_IS_GIB = 0x400000;
+
+ public const int SF_PHYSPROP_START_ASLEEP = 0x000001;
+ public const int SF_PHYSPROP_DONT_TAKE_PHYSICS_DAMAGE = 0x000002;// this prop can't be damaged by physics collisions
+ public const int SF_PHYSPROP_DEBRIS = 0x000004;
+ public const int SF_PHYSPROP_MOTIONDISABLED = 0x000008;// motion disabled at startup (flag only valid in spawn - motion can be enabled via input)
+ public const int SF_PHYSPROP_TOUCH = 0x000010;// can be 'crashed through' by running player (plate glass)
+ public const int SF_PHYSPROP_PRESSURE = 0x000020;// can be broken by a player standing on it
+ public const int SF_PHYSPROP_ENABLE_ON_PHYSCANNON = 0x000040;// enable motion only if the player grabs it with the physcannon
+ public const int SF_PHYSPROP_NO_ROTORWASH_PUSH = 0x000080;// The rotorwash doesn't push these
+ public const int SF_PHYSPROP_ENABLE_PICKUP_OUTPUT = 0x000100;// If set, allow the player to +USE this for the purposes of generating an output
+ public const int SF_PHYSPROP_PREVENT_PICKUP = 0x000200;// If set, prevent +USE/Physcannon pickup of this prop
+ public const int SF_PHYSPROP_PREVENT_PLAYER_TOUCH_ENABLE = 0x000400;// If set, the player will not cause the object to enable its motion when bumped into
+ public const int SF_PHYSPROP_HAS_ATTACHED_RAGDOLLS = 0x000800;// Need to remove attached ragdolls on enable motion/etc
+ public const int SF_PHYSPROP_FORCE_TOUCH_TRIGGERS = 0x001000;// Override normal debris behavior and respond to triggers anyway
+ public const int SF_PHYSPROP_FORCE_SERVER_SIDE = 0x002000;// Force multiplayer physics object to be serverside
+ public const int SF_PHYSPROP_RADIUS_PICKUP = 0x004000;// For Xbox, makes small objects easier to pick up by allowing them to be found
+ public const int SF_PHYSPROP_ALWAYS_PICK_UP = 0x100000;// Physcannon can always pick this up, no matter what mass or constraints may apply.
+ public const int SF_PHYSPROP_NO_COLLISIONS = 0x200000;// Don't enable collisions on spawn
+ public const int SF_PHYSPROP_IS_GIB = 0x400000;// Limit # of active gibs
+}
+
+public enum ParsePropDataReturn
+{
+ Succeeded,
+ SuccededAllowedStatic,
+ FailedNoData,
+ FailedBadData
+}
+
+public enum PropDataInteractions
+{
+ PhysgunWorldStick, // "onworldimpact" "stick"
+ PhysgunFirstBreak, // "onfirstimpact" "break"
+ PhysgunFirstPaint, // "onfirstimpact" "paintsplat"
+ PhysgunFirstImpale, // "onfirstimpact" "impale"
+ PhysgunLaunchSpinNone, // "onlaunch" "spin_none"
+ PhysgunLaunchSpinZ, // "onlaunch" "spin_zaxis"
+ PhysgunBreakExplode, // "onbreak" "explode_fire"
+ PhysgunDamageNone, // "damage" "none"
+ FireFlammable, // "flammable" "yes"
+ FireExplosiveResist, // "explosive_resist" "yes"
+ FireIgniteHalfHealth, // "ignite" "halfhealth"
+ PhysgunCreateFlare, // "onpickup" "create_flare"
+ PhysgunAllowOverhead, // "allow_overhead" "yes"
+ WorldBloodsplat, // "onworldimpact", "bloodsplat"
+ PhysgunNotifyChildren, // "onfirstimpact" cause attached flechettes to explode
+ NumInteractions,
+}
+
+public interface IMultiplayerPhysics
+{
+ PhysicsMultiplayerMode GetMultiplayerPhysicsMode();
+ float GetMass();
+ bool IsAsleep();
+}
+
+public enum PhysicsMultiplayerMode
+{
+ AutoDetect,
+ Solid,
+ NonSolid,
+ Clientside
+}
+
+public enum MultiplayerBreak
+{
+ Default,
+ Serverside,
+ Clientside,
+ Both
+}
+
+
+public enum PerformanceMode_t
+{
+ Normal,
+ NoGibs,
+ FullGibs,
+ ReducedGibs,
+}
+
+public interface IBreakableWithPropData
+{
+ void SetDmgModBullet(float dmgMod);
+ void SetDmgModClub(float dmgMod);
+ void SetDmgModExplosive(float dmgMod);
+ float GetDmgModBullet();
+ float GetDmgModClub();
+ float GetDmgModExplosive();
+
+ // Explosive
+ void SetExplosiveRadius(float radius);
+ void SetExplosiveDamage(float damage);
+ float GetExplosiveRadius();
+ float GetExplosiveDamage();
+
+ // Physics damage tables
+ void SetPhysicsDamageTable(ReadOnlySpan tableName);
+ ReadOnlySpan GetPhysicsDamageTable();
+
+ // Breakable chunks
+ void SetBreakableModel(ReadOnlySpan model);
+ ReadOnlySpan GetBreakableModel();
+ void SetBreakableSkin(int skin);
+ int GetBreakableSkin();
+ void SetBreakableCount(int count);
+ int GetBreakableCount();
+ void SetMaxBreakableSize(int size);
+ int GetMaxBreakableSize();
+
+ // LOS blocking
+ void SetPropDataBlocksLOS(bool blocksLOS);
+ void SetPropDataIsAIWalkable(bool blocksLOS);
+
+ // Interactions
+ void SetInteraction(PropDataInteractions interaction);
+ bool HasInteraction(PropDataInteractions interaction);
+
+ // Multiplayer physics mode
+ void SetPhysicsMode(PhysicsMultiplayerMode mode);
+ PhysicsMultiplayerMode GetPhysicsMode();
+
+ // Multiplayer breakable spawn behavior
+ void SetMultiplayerBreakMode(MultiplayerBreak mode);
+ MultiplayerBreak GetMultiplayerBreakMode();
+
+ // Used for debugging
+ void SetBasePropData(ReadOnlySpan propdata);
+ ReadOnlySpan GetBasePropData();
}
+#if CLIENT_DLL || GAME_DLL
+public class PropData : AutoGameSystem
+{
+ // Parsing details for each of the propdata interactions
+ readonly struct PropDataInteraction(string sectionName, string keyName, string value)
+ {
+ public readonly string SectionName = sectionName;
+ public readonly string KeyName = keyName;
+ public readonly string Value = value;
+ }
+
+ static readonly PropDataInteraction[] PropdataInteractionSections = [
+ new("physgun_interactions", "onworldimpact", "stick"), // PropDataInteractions.PhysgunWorldStick,
+ new("physgun_interactions", "onfirstimpact", "break"), // PropDataInteractions.PhysgunFirstBreak,
+ new("physgun_interactions", "onfirstimpact", "paintsplat"), // PropDataInteractions.PhysgunFirstPaint,
+ new("physgun_interactions", "onfirstimpact", "impale"), // PropDataInteractions.PhysgunFirstImpale,
+ new("physgun_interactions", "onlaunch", "spin_none"), // PropDataInteractions.PhysgunLaunchSpinNone,
+ new("physgun_interactions", "onlaunch", "spin_zaxis"), // PropDataInteractions.PhysgunLaunchSpinZ,
+ new("physgun_interactions", "onbreak", "explode_fire"), // PropDataInteractions.PhysgunBreakExplode,
+ new("physgun_interactions", "damage", "none"), // PropDataInteractions.PhysgunDamageNone,
+
+ new("fire_interactions", "flammable", "yes"), // PropDataInteractions.FireFlammable,
+ new("fire_interactions", "explosive_resist", "yes"), // PropDataInteractions.FireExplosiveResist,
+ new("fire_interactions", "ignite", "halfhealth"), // PropDataInteractions.FireIgniteHalfHealth,
+
+ new("physgun_interactions", "onpickup", "create_flare"), // PropDataInteractions.PhysgunCreateFlare,
+
+ new("physgun_interactions", "allow_overhead", "yes"), // PropDataInteractions.PhysgunAllowOverhead,
+
+ new("world_interactions", "onworldimpact", "bloodsplat"), // PropDataInteractions.WorldBloodsplat,
+ ];
+
+ ///
+ /// returns the axis index with the smallest size
+ ///
+ static int SmallestAxis(in Vector3 vec) {
+ if (vec.X < vec.Y) {
+ if (vec.X < vec.Z)
+ return 0;
+ return 2;
+ }
+ if (vec.Y < vec.Z)
+ return 1;
+ return 2;
+ }
+
+ public PropData() : base("CPropData") {
+ PropDataLoaded = false;
+ KVPropData = null;
+ }
+
+ // Inherited from IAutoServerSystem
+ public override void LevelInitPreEntity() {
+ BreakableChunks.Clear();
+ ParsePropDataFile();
+ }
+
+ public override void LevelShutdownPostEntity() {
+ if (KVPropData != null)
+ KVPropData = null;
+ }
-public interface IMultiplayerPhysics;
-public interface IBreakableWithPropData;
+ ///
+ /// Clear out the stats + their history
+ ///
+ public void ParsePropDataFile() {
+ KVPropData = new KeyValues("PropDatafile");
+ if (!KVPropData.LoadFromFile(filesystem, "scripts/propdata.txt")) {
+ KVPropData = null;
+ return;
+ }
+
+ PropDataLoaded = true;
+
+ // Now try and parse out the breakable section
+ KeyValues? breakableSection = KVPropData.FindKey("BreakableModels");
+ if (breakableSection != null) {
+ KeyValues? chunkSection = breakableSection.GetFirstSubKey();
+ while (chunkSection != null) {
+ // Create a new chunk section and add it to our list
+ BreakableChunk breakableChunk = new();
+ BreakableChunks.Add(breakableChunk);
+ breakableChunk.ChunkType = chunkSection.Name;
+
+ // Read in all the model names
+ KeyValues? modelName = chunkSection.GetFirstSubKey();
+ while (modelName != null) {
+ string model = modelName.Name;
+ breakableChunk.ChunkModels.Add(model);
+ BaseEntity.PrecacheModel(model);
+
+ modelName = modelName.GetNextKey();
+ }
+
+ chunkSection = chunkSection.GetNextKey();
+ }
+ }
+ }
+
+ ///
+ /// Parse a keyvalues section into the prop
+ ///
+ /// interactionSection is a bit of jiggery-pokery to get around the unfortunate
+ /// fact that the interaction KV sections ("physgun_interactions", "fire_interactions", etc)
+ /// are OUTSIDE the "prop_data" KV section in the model, but may be contained WITHIN the
+ /// specified Base's "prop_data" section (i.e. in propdata.txt)
+ ///
+ public ParsePropDataReturn ParsePropFromKV(BaseEntity prop, KeyValues section, KeyValues interactionSection) {
+ if (prop is not IBreakableWithPropData breakableInterface)
+ return ParsePropDataReturn.FailedBadData;
+
+ ParsePropDataReturn baseResult = ParsePropDataReturn.Succeeded;
+
+ // Do we have a base?
+ ReadOnlySpan baseName = section.GetString("base");
+ if (!baseName.IsEmpty) {
+ baseResult = ParsePropFromBase(prop, baseName);
+ if ((baseResult != ParsePropDataReturn.Succeeded) && (baseResult != ParsePropDataReturn.SuccededAllowedStatic))
+ return baseResult;
+ }
+
+ // Allow overriding of Block LOS
+ int blockLOS = (int)section.GetFloat("blockLOS", -1);
+ if (blockLOS != -1)
+ breakableInterface.SetPropDataBlocksLOS(blockLOS != 0);
+
+ // Set whether AI can walk on this prop
+ int isWalkable = (int)section.GetFloat("AIWalkable", -1);
+ if (isWalkable != -1)
+ breakableInterface.SetPropDataIsAIWalkable(isWalkable != 0);
+
+ // Set custom damage table
+ ReadOnlySpan tableName;
+ if (breakableInterface.GetPhysicsDamageTable().IsEmpty)
+ tableName = section.GetString("damage_table", null);
+ else
+ tableName = section.GetString("damage_table", breakableInterface.GetPhysicsDamageTable());
+
+ if (!tableName.IsEmpty)
+ breakableInterface.SetPhysicsDamageTable(tableName);
+ else
+ breakableInterface.SetPhysicsDamageTable(null);
+
+ // Get multiplayer physics mode if not set by map
+ breakableInterface.SetPhysicsMode((PhysicsMultiplayerMode)section.GetInt("physicsmode",
+ (int)breakableInterface.GetPhysicsMode()));
+
+ ReadOnlySpan multiplayer_break = section.GetString("multiplayer_break", null);
+ if (!multiplayer_break.IsEmpty) {
+ MultiplayerBreak mode = MultiplayerBreak.Default;
+ if (stricmp(multiplayer_break, "server") == 0)
+ mode = MultiplayerBreak.Serverside;
+ else if (stricmp(multiplayer_break, "client") == 0)
+ mode = MultiplayerBreak.Clientside;
+ else if (stricmp(multiplayer_break, "both") == 0)
+ mode = MultiplayerBreak.Both;
+ breakableInterface.SetMultiplayerBreakMode(mode);
+ }
+
+ // Get damage modifiers, but only if they're specified, because our base may have already overridden them.
+ breakableInterface.SetDmgModBullet(section.GetFloat("dmg.bullets", breakableInterface.GetDmgModBullet()));
+ breakableInterface.SetDmgModClub(section.GetFloat("dmg.club", breakableInterface.GetDmgModClub()));
+ breakableInterface.SetDmgModExplosive(section.GetFloat("dmg.explosive", breakableInterface.GetDmgModExplosive()));
+
+ // Get the health (unless this is an override prop)
+ if (!BaseEntity.FClassnameIs(prop, "prop_physics_override") && !BaseEntity.FClassnameIs(prop, "prop_dynamic_override")) {
+ prop.SetHealth(section.GetInt("health", prop.GetHealth()));
+
+ // Explosive?
+ breakableInterface.SetExplosiveDamage(section.GetFloat("explosive_damage", breakableInterface.GetExplosiveDamage()));
+ breakableInterface.SetExplosiveRadius(section.GetFloat("explosive_radius", breakableInterface.GetExplosiveRadius()));
+
+#if GAME_DLL
+ // If we now have health, we're not allowed to ignore physics damage
+ if (prop.GetHealth() != 0)
+ prop.RemoveSpawnFlags(SF_PHYSPROP_DONT_TAKE_PHYSICS_DAMAGE);
+#endif
+ }
+
+ ReadOnlySpan breakableModel;
+ if (breakableInterface.GetBreakableModel().IsEmpty)
+ breakableModel = section.GetString("breakable_model", null);
+ else
+ breakableModel = section.GetString("breakable_model", breakableInterface.GetBreakableModel());
+
+ if (!breakableModel.IsEmpty)
+ breakableInterface.SetBreakableModel(breakableModel);
+ else
+ breakableInterface.SetBreakableModel(null);
+
+ breakableInterface.SetBreakableSkin(section.GetInt("breakable_skin", breakableInterface.GetBreakableSkin()));
+ breakableInterface.SetBreakableCount(section.GetInt("breakable_count", breakableInterface.GetBreakableCount()));
+
+ // Calculate the maximum size of the breakables this breakable will produce
+ Vector3 size = prop.CollisionProp().OBBSize();
+ // Throw away the smallest coord
+ int smallest = SmallestAxis(size);
+ MathLib.SubFloat(ref size, smallest) = 1;
+ float volume = size.X * size.Y * size.Z;
+ int maxSize = (int)MathF.Floor(volume / (32.0f * 32.0f));
+ breakableInterface.SetMaxBreakableSize(maxSize);
+
+ // Now parse our interactions
+ for (int i = 0; i < PropdataInteractionSections.Length; i++) {
+ // If we hit this assert, we have too many interactions for our current storage solution to handle
+ Assert(i < 32);
+
+ ref readonly PropDataInteraction interaction = ref PropdataInteractionSections[i];
+
+ KeyValues? currentInter = interactionSection.FindKey(interaction.SectionName);
+ if (currentInter != null) {
+ ReadOnlySpan interBase = currentInter.GetString(interaction.KeyName);
+ if (!interBase.IsEmpty && stricmp(interBase, interaction.Value) == 0)
+ breakableInterface.SetInteraction((PropDataInteractions)i);
+ }
+ }
+
+ // If the base said we're allowed to be static, return that
+ if (baseResult == ParsePropDataReturn.SuccededAllowedStatic)
+ return ParsePropDataReturn.SuccededAllowedStatic;
+
+ // Otherwise, see if our propdata says we are allowed to be static
+ if (section.GetInt("allowstatic", 0) != 0)
+ return ParsePropDataReturn.SuccededAllowedStatic;
+
+ return ParsePropDataReturn.Succeeded;
+ }
+
+ ///
+ /// Fill out a prop's with base data parsed from the propdata file
+ ///
+ public ParsePropDataReturn ParsePropFromBase(BaseEntity prop, ReadOnlySpan propData) {
+ if (!PropDataLoaded)
+ return ParsePropDataReturn.FailedNoData;
+
+ if (prop is not IBreakableWithPropData breakableInterface)
+ return ParsePropDataReturn.FailedBadData;
+
+ if (KVPropData == null)
+ return ParsePropDataReturn.FailedBadData;
+
+ // Find the specified propdata
+ KeyValues? section = KVPropData.FindKey(propData);
+ if (section == null) {
+ Warning($"{prop.GetClassname()} '{prop.GetModelName()}' has a base specified as '{propData}', but there is no matching entry in propdata.txt.\n");
+ return ParsePropDataReturn.FailedBadData;
+ }
+
+ // Store off the first base data for debugging
+ if (breakableInterface.GetBasePropData().IsEmpty)
+ breakableInterface.SetBasePropData(propData);
+
+ return ParsePropFromKV(prop, section, section);
+ }
+
+ public ReadOnlySpan GetRandomChunkModel(ReadOnlySpan breakableSection, int maxSize = -1) {
+ if (!PropDataLoaded)
+ return null;
+
+ // Find the right section
+ int count = BreakableChunks.Count;
+ int i;
+ for (i = 0; i < count; i++) {
+ if (BreakableChunks[i].ChunkType.AsSpan().StartsWith(breakableSection, StringComparison.Ordinal))
+ break;
+ }
+ if (i == count)
+ return null;
+
+ // Now pick a random one and return it
+ int random;
+ if (maxSize == -1)
+ random = RandomInt(0, BreakableChunks[i].ChunkModels.Count - 1);
+ else {
+ // Don't pick anything over the specified size
+ random = RandomInt(0, Math.Min(maxSize, BreakableChunks[i].ChunkModels.Count - 1));
+ }
+
+ return BreakableChunks[i].ChunkModels[random];
+ }
+
+ protected KeyValues? KVPropData;
+ protected bool PropDataLoaded;
+
+ class BreakableChunk
+ {
+ public string ChunkType = "";
+ public readonly List ChunkModels = [];
+ }
+
+ readonly List BreakableChunks = [];
+
+ public static readonly PropData g_PropDataSystem = new();
+}
+#endif
From 48fd018f4b65f9df3a02ec3cbed1adb45cae0546 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:47:40 -0700
Subject: [PATCH 10/15] Player pickup controller (+use carry)
---
Game.Server/GarrysMod/GMOD_Player.cs | 4 +
Game.Server/HL2/HL2_Player.cs | 61 +-
Game.Server/HL2/PlayerPickupController.cs | 662 ++++++++++++++++++++++
Game.Server/Player.cs | 70 +++
Game.Server/PlayerPickup.cs | 96 +++-
5 files changed, 874 insertions(+), 19 deletions(-)
create mode 100644 Game.Server/HL2/PlayerPickupController.cs
diff --git a/Game.Server/GarrysMod/GMOD_Player.cs b/Game.Server/GarrysMod/GMOD_Player.cs
index dece38a48..ca0f2742a 100644
--- a/Game.Server/GarrysMod/GMOD_Player.cs
+++ b/Game.Server/GarrysMod/GMOD_Player.cs
@@ -113,6 +113,10 @@ public override void PlayerRunCommand(UserCmd ucmd, IMoveHelper moveHelper) {
base.PlayerRunCommand(ucmd, moveHelper);
}
+ public override void PickupObject(BaseEntity obj, bool limitMassAndSize = true) {
+ HL2_PickupObject(obj, limitMassAndSize);
+ }
+
public override void CheckChatText(ReadOnlySpan text) {
if (!stristr(text, "bloxwich").IsEmpty)
AwardAchievement((int)GMODAchievementID.GMA_SAY_1, 1);
diff --git a/Game.Server/HL2/HL2_Player.cs b/Game.Server/HL2/HL2_Player.cs
index dee350835..ce8b6a8e8 100644
--- a/Game.Server/HL2/HL2_Player.cs
+++ b/Game.Server/HL2/HL2_Player.cs
@@ -10,6 +10,7 @@
namespace Game.Server.HL2;
+using DEFINE = Source.DEFINE;
using FIELD = Source.FIELD;
[PrecacheRegister("player")]
@@ -22,12 +23,17 @@ public class HL2_Player : BaseMultiplayerPlayer
]);
public static new readonly ServerClass ServerClass = new ServerClass(DT_HL2_Player);
+ public static readonly new DataMap DataDesc = new(typeof(HL2_Player), BasePlayer.DataDesc, [
+ DEFINE.INPUTFUNC(FieldType.Void, "ForceDropPhysObjects", nameof(InputForceDropPhysObjects), (INPUTFUNCPTR)((self, data) => ((HL2_Player)self).InputForceDropPhysObjects(data))),
+ ]);
+ public override DataMap? GetDataDescMap() => DataDesc;
+
[NetworkName("m_HL2Local")]
public readonly HL2PlayerLocalData HL2Local = new();
#if HL2MP
const int HL2_WALK_SPEED = 150;
- const int HL2_NORM_SPEED = 190;
+ public const int HL2_NORM_SPEED = 190;
const int HL2_SPRINT_SPEED = 320;
#else
#endif
@@ -191,7 +197,7 @@ void StartSprinting() { }
void StopSprinting() { }
- void EnableSprint(bool enable) {
+ public void EnableSprint(bool enable) {
if (!enable && IsSprinting())
StopSprinting();
@@ -514,19 +520,56 @@ bool Weapon_CanSwitchTo(BaseCombatWeapon weapon) {
throw new NotImplementedException();
}
- public override void PickupObject(BaseEntity Object, bool limitMassAndSize = true) { }
+ public override void PickupObject(BaseEntity obj, bool limitMassAndSize = true) => HL2_PickupObject(obj, limitMassAndSize);
- bool IsHoldingEntity(BaseEntity ent) {
- throw new NotImplementedException();
+ protected void HL2_PickupObject(BaseEntity obj, bool limitMassAndSize) {
+ // can't pick up what you're standing on
+ if (GetGroundEntity() == obj)
+ return;
+
+ if (limitMassAndSize == true) {
+ if (CanPickupObject(obj, 35, 128) == false)
+ return;
+ }
+
+ // Can't be picked up if NPCs are on me
+ // if ( pObject->HasNPCsOnIt() )
+ // return;
+
+ PlayerPickupController.PlayerPickupObject(this, obj);
}
- float GetHeldObjectMass(IPhysicsObject heldObject) {
- throw new NotImplementedException();
+ public bool IsHoldingEntity(BaseEntity? ent) {
+ return PlayerPickupController.PlayerPickupControllerIsHoldingEntity(UseEntity.Get(), ent);
}
- void ForceDropOfCarriedPhysObjects(BaseEntity onlyIfHoldingThis) { }
+ public override float GetHeldObjectMass(IPhysicsObject? heldObject) {
+ float mass = PlayerPickupController.PlayerPickupGetHeldObjectMass(UseEntity.Get(), heldObject!);
+ // if ( mass == 0.0f )
+ // mass = PhysCannonGetHeldObjectMass( GetActiveWeapon(), pHeldObject );
+ return mass;
+ }
+
+ ///
+ /// Force the player to drop any physics objects he's carrying
+ ///
+ public override void ForceDropOfCarriedPhysObjects(BaseEntity? onlyIfHoldingThis) {
+ if (PhysIsInCallback()) {
+ Variant_t value = default;
+ g_EventQueue.AddEvent(this, "ForceDropPhysObjects", value, 0.01f, onlyIfHoldingThis, this);
+ return;
+ }
+
+ // Drop any objects being handheld.
+ ClearUseEntity();
- // void InputForceDropPhysObjects(inputdata_t data ) { }
+ // Then force the physcannon to drop anything it's holding, if it's our active weapon
+ // PhysCannonForceDrop( GetActiveWeapon(), NULL );
+ }
+
+ public void InputForceDropPhysObjects(InputData data) {
+ ForceDropOfCarriedPhysObjects(data.Activator);
+ }
void UpdateClientData() { }
diff --git a/Game.Server/HL2/PlayerPickupController.cs b/Game.Server/HL2/PlayerPickupController.cs
new file mode 100644
index 000000000..050659536
--- /dev/null
+++ b/Game.Server/HL2/PlayerPickupController.cs
@@ -0,0 +1,662 @@
+using Game.Shared;
+
+using Source;
+using Source.Common;
+using Source.Common.Audio;
+using Source.Common.Commands;
+using Source.Common.Formats.BSP;
+using Source.Common.Mathematics;
+using Source.Common.Physics;
+
+using System.Buffers;
+using System.Numerics;
+
+namespace Game.Server.HL2;
+
+public class GrabController : IMotionEvent
+{
+ public static readonly ConVar player_throwforce = new("player_throwforce", "1000");
+
+ // when looking level, hold bottom of object 8 inches below eye level
+ const float PLAYER_HOLD_LEVEL_EYES = -8;
+
+ // when looking down, hold bottom of object 0 inches from feet
+ const float PLAYER_HOLD_DOWN_FEET = 2;
+
+ // when looking up, hold bottom of object 24 inches above eye level
+ const float PLAYER_HOLD_UP_EYES = 24;
+
+ // use a +/-30 degree range for the entire range of motion of pitch
+ const float PLAYER_LOOK_PITCH_RANGE = 30;
+
+ // player can reach down 2ft below his feet (otherwise he'll hold the object above the bottom)
+ const float PLAYER_REACH_DOWN_DISTANCE = 24;
+
+ const float DEFAULT_MAX_ANGULAR = 360.0f * 10.0f;
+ const float REDUCED_CARRY_MASS = 1.0f;
+
+ static void MatrixOrthogonalize(ref Matrix3x4 matrix, int column) {
+ Span columns = stackalloc Vector3[3];
+ int i;
+
+ for (i = 0; i < 3; i++)
+ MathLib.MatrixGetColumn(matrix, i, out columns[i]);
+
+ int index0 = column;
+ int index1 = (column + 1) % 3;
+ int index2 = (column + 2) % 3;
+
+ columns[index2] = Vector3.Cross(columns[index0], columns[index1]);
+ columns[index1] = Vector3.Cross(columns[index2], columns[index0]);
+ MathLib.VectorNormalize(ref columns[index2]);
+ MathLib.VectorNormalize(ref columns[index1]);
+ MathLib.MatrixSetColumn(columns[index1], index1, ref matrix);
+ MathLib.MatrixSetColumn(columns[index2], index2, ref matrix);
+ }
+
+ static int SIGN(float x) => x < 0 ? -1 : 1;
+
+ static QAngle AlignAngles(in QAngle angles, float cosineAlignAngle) {
+ MathLib.AngleMatrix(angles, out Matrix3x4 alignMatrix);
+
+ // NOTE: Must align z first
+ for (int j = 3; --j >= 0;) {
+ MathLib.MatrixGetColumn(alignMatrix, j, out Vector3 vec);
+ for (int i = 0; i < 3; i++) {
+ if (MathF.Abs(vec[i]) > cosineAlignAngle) {
+ MathLib.SubFloat(ref vec, i) = SIGN(vec[i]);
+ MathLib.SubFloat(ref vec, (i + 1) % 3) = 0;
+ MathLib.SubFloat(ref vec, (i + 2) % 3) = 0;
+ MathLib.MatrixSetColumn(vec, j, ref alignMatrix);
+ MatrixOrthogonalize(ref alignMatrix, j);
+ break;
+ }
+ }
+ }
+
+ MathLib.MatrixAngles(alignMatrix, out QAngle outAngles);
+ return outAngles;
+ }
+
+ ///
+ /// Computes a local matrix for the player clamped to valid carry ranges
+ ///
+ static void ComputePlayerMatrix(BasePlayer? player, out Matrix3x4 outMatrix) {
+ outMatrix = default;
+ if (player == null)
+ return;
+
+ QAngle angles = player.EyeAngles();
+ Vector3 origin = player.EyePosition();
+
+ // 0-360 / -180-180
+ //angles.x = init ? 0 : AngleDistance( angles.x, 0 );
+ //angles.x = clamp( angles.x, -PLAYER_LOOK_PITCH_RANGE, PLAYER_LOOK_PITCH_RANGE );
+ angles.X = 0;
+
+ float feet = player.GetAbsOrigin().Z + player.WorldAlignMins().Z;
+ float eyes = origin.Z;
+ float zoffset = 0;
+ // moving up (negative pitch is up)
+ if (angles.X < 0)
+ zoffset = MathLib.RemapVal(angles.X, 0, -PLAYER_LOOK_PITCH_RANGE, PLAYER_HOLD_LEVEL_EYES, PLAYER_HOLD_UP_EYES);
+ else
+ zoffset = MathLib.RemapVal(angles.X, 0, PLAYER_LOOK_PITCH_RANGE, PLAYER_HOLD_LEVEL_EYES, PLAYER_HOLD_DOWN_FEET + (feet - eyes));
+
+ origin.Z += zoffset;
+ angles.X = 0;
+ MathLib.AngleMatrix(angles, origin, out outMatrix);
+ }
+
+ public GrabController() {
+ Shadow.DampFactor = 1.0f;
+ Shadow.TeleportDistance = 0;
+ ErrorTime = 0;
+ Error = 0;
+ // make this controller really stiff!
+ Shadow.MaxSpeed = 1000;
+ Shadow.MaxAngular = DEFAULT_MAX_ANGULAR;
+ Shadow.MaxDampSpeed = Shadow.MaxSpeed * 2;
+ Shadow.MaxDampAngular = Shadow.MaxAngular;
+ AttachedEntity.Set(null);
+ PreferredCarryAngles = vec3_angle;
+ HasPreferredCarryAngles = false;
+ DistanceOffset = 0;
+ }
+
+ public void OnRestore() {
+ Controller?.SetEventHandler(this);
+ }
+
+ public void SetTargetPosition(in Vector3 target, in QAngle targetOrientation) {
+ Shadow.TargetPosition = target;
+ Shadow.TargetRotation = targetOrientation;
+
+ TimeToArrive = gpGlobals.FrameTime;
+
+ BaseEntity? attached = GetAttached();
+ if (attached != null) {
+ IPhysicsObject? obj = attached.VPhysicsGetObject();
+
+ if (obj != null)
+ obj.Wake();
+ else
+ DetachEntity(false);
+ }
+ }
+
+ public float ComputeError() {
+ if (ErrorTime <= 0)
+ return 0;
+
+ BaseEntity? attached = GetAttached();
+ if (attached != null) {
+ IPhysicsObject? obj = attached.VPhysicsGetObject();
+
+ if (obj != null) {
+ obj.GetShadowPosition(out Vector3 pos, out _);
+
+ float error = (Shadow.TargetPosition - pos).Length();
+ if (ErrorTime > 0) {
+ if (ErrorTime > 1)
+ ErrorTime = 1;
+
+ float speed = error / ErrorTime;
+ if (speed > Shadow.MaxSpeed)
+ error *= 0.5f;
+
+ Error = (1 - ErrorTime) * Error + error * ErrorTime;
+ }
+ }
+ else {
+ DevMsg("Object attached to Physcannon has no physics object\n");
+ DetachEntity(false);
+ return 9999; // force detach
+ }
+
+ if (attached.IsEFlagSet(EFL.IsBeingLiftedByBarnacle))
+ Error *= 3.0f;
+ }
+
+ ErrorTime = 0;
+
+ return Error;
+ }
+
+ public float GetLoadWeight() => LoadWeight;
+ public void SetAngleAlignment(float alignAngleCosine) => AngleAlignment = alignAngleCosine;
+ public void SetIgnorePitch(bool ignore) => IgnoreRelativePitch = ignore;
+
+ public QAngle TransformAnglesToPlayerSpace(in QAngle anglesIn, BasePlayer player) {
+ if (IgnoreRelativePitch) {
+ QAngle angleTest = player.EyeAngles();
+ angleTest.X = 0;
+ MathLib.AngleMatrix(angleTest, out Matrix3x4 test);
+ return MathLib.TransformAnglesToLocalSpace(anglesIn, test);
+ }
+ return MathLib.TransformAnglesToLocalSpace(anglesIn, player.EntityToWorldTransform());
+ }
+
+ public QAngle TransformAnglesFromPlayerSpace(in QAngle anglesIn, BasePlayer player) {
+ if (IgnoreRelativePitch) {
+ QAngle angleTest = player.EyeAngles();
+ angleTest.X = 0;
+ MathLib.AngleMatrix(angleTest, out Matrix3x4 test);
+ return MathLib.TransformAnglesToWorldSpace(anglesIn, test);
+ }
+ return MathLib.TransformAnglesToWorldSpace(anglesIn, player.EntityToWorldTransform());
+ }
+
+ public BaseEntity? GetAttached() => AttachedEntity.Get();
+
+ public void AttachEntity(BasePlayer player, BaseEntity entity, IPhysicsObject phys, bool isMegaPhysCannon, in Vector3 grabPosition, bool useGrabPosition) {
+ // play the impact sound of the object hitting the player
+ // used as feedback to let the player know he picked up the object
+ int hitMaterial = phys.GetMaterialIndex();
+ int playerMaterial = player.VPhysicsGetObject() != null ? player.VPhysicsGetObject()!.GetMaterialIndex() : hitMaterial;
+ PhysicsImpactSound(player, phys, SoundEntityChannel.Static, hitMaterial, playerMaterial, 1.0f, 64);
+ phys.GetPosition(out Vector3 position, out QAngle angles);
+ // If it has a preferred orientation, use that instead.
+ Pickup.GetPreferredCarryAngles(entity, player, player.EntityToWorldTransform(), ref angles);
+
+ // ComputeMaxSpeed( pEntity, pPhys );
+
+ // Carried entities can never block LOS
+ CarriedEntityBlocksLOS = entity.BlocksLOS();
+ entity.SetBlocksLOS(false);
+ Controller = physenv.CreateMotionController(this);
+ Controller.AttachObject(phys, true);
+ // Don't do this, it's causing trouble with constraint solvers.
+ //m_controller->SetPriority( IPhysicsMotionController::HIGH_PRIORITY );
+
+ phys.Wake();
+ PhysSetGameFlags(phys, PhysicsFlags.PlayerHeld);
+ SetTargetPosition(position, angles);
+ AttachedEntity.Set(entity);
+ IPhysicsObject[] list = ArrayPool.Shared.Rent(VPHYSICS_MAX_OBJECT_LIST_COUNT);
+ int count = entity.VPhysicsGetObjectList(list.AsSpan(0, VPHYSICS_MAX_OBJECT_LIST_COUNT));
+ LoadWeight = 0;
+ float damping = 10;
+ float factor = count / 7.5f;
+ if (factor < 1.0f)
+ factor = 1.0f;
+
+ for (int i = 0; i < count; i++) {
+ float mass = list[i].GetMass();
+ list[i].GetDamping(out float speedDamping, out SavedRotDamping[i]);
+ LoadWeight += mass;
+ SavedMass[i] = mass;
+
+ // reduce the mass to prevent the player from adding crazy amounts of energy to the system
+ list[i].SetMass(REDUCED_CARRY_MASS / factor);
+ list[i].SetDamping(ref speedDamping, ref damping);
+ }
+ ArrayPool.Shared.Return(list, true);
+
+ // Give extra mass to the phys object we're actually picking up
+ phys.SetMass(REDUCED_CARRY_MASS);
+ phys.EnableDrag(false);
+
+ ErrorTime = isMegaPhysCannon ? -1.5f : -1.0f; // 1 seconds until error starts accumulating
+ Error = 0;
+ ContactAmount = 0;
+
+ AttachedAnglesPlayerSpace = TransformAnglesToPlayerSpace(angles, player);
+ if (AngleAlignment != 0)
+ AttachedAnglesPlayerSpace = AlignAngles(AttachedAnglesPlayerSpace, AngleAlignment);
+
+ // Ragdolls don't offset this way
+ if (entity is RagdollProp)
+ AttachedPositionObjectSpace = default;
+ else
+ MathLib.VectorITransform(entity.WorldSpaceCenter(), entity.EntityToWorldTransform(), out AttachedPositionObjectSpace);
+
+ // If it's a prop, see if it has desired carry angles
+ if (entity is PhysicsProp prop) {
+ // m_bHasPreferredCarryAngles = pProp->GetPropDataAngles( "preferred_carryangles", m_vecPreferredCarryAngles );
+ HasPreferredCarryAngles = false;
+ DistanceOffset = prop.GetCarryDistanceOffset();
+ }
+ else {
+ HasPreferredCarryAngles = false;
+ DistanceOffset = 0;
+ }
+
+ AllowObjectOverhead = IsObjectAllowedOverhead(entity);
+ }
+
+ static void ClampPhysicsVelocity(IPhysicsObject phys, float linearLimit, float angularLimit) {
+ phys.GetVelocity(out Vector3 vel, out Vector3 angVel);
+ float speed = MathLib.VectorNormalize(ref vel) - linearLimit;
+ float angSpeed = MathLib.VectorNormalize(ref angVel) - angularLimit;
+ speed = speed < 0 ? 0 : -speed;
+ angSpeed = angSpeed < 0 ? 0 : -angSpeed;
+ vel *= speed;
+ angVel *= angSpeed;
+ phys.AddVelocity(vel, angVel);
+ }
+
+ public void DetachEntity(bool clearVelocity) {
+ Assert(!PhysIsInCallback());
+ BaseEntity? entity = GetAttached();
+ if (entity != null) {
+ // Restore the LS blocking state
+ entity.SetBlocksLOS(CarriedEntityBlocksLOS);
+ IPhysicsObject[] list = ArrayPool.Shared.Rent(VPHYSICS_MAX_OBJECT_LIST_COUNT);
+ int count = entity.VPhysicsGetObjectList(list.AsSpan(0, VPHYSICS_MAX_OBJECT_LIST_COUNT));
+ for (int i = 0; i < count; i++) {
+ IPhysicsObject? phys = list[i];
+ if (phys == null)
+ continue;
+
+ // on the odd chance that it's gone to sleep while under anti-gravity
+ phys.EnableDrag(true);
+ phys.Wake();
+ phys.SetMass(SavedMass[i]);
+ phys.GetDamping(out float speedDamping, out _);
+ phys.SetDamping(ref speedDamping, ref SavedRotDamping[i]);
+ PhysClearGameFlags(phys, PhysicsFlags.PlayerHeld);
+ if (clearVelocity)
+ PhysForceClearVelocity(phys);
+ else
+ ClampPhysicsVelocity(phys, HL2_Player.HL2_NORM_SPEED * 1.5f, 2.0f * 360.0f);
+ }
+ ArrayPool.Shared.Return(list, true);
+ }
+
+ AttachedEntity.Set(null);
+ if (Controller != null)
+ physenv.DestroyMotionController(Controller);
+ Controller = null;
+ }
+
+ static bool InContactWithHeavyObject(IPhysicsObject obj, float heavyMass) {
+ bool contact = false;
+ IPhysicsFrictionSnapshot snapshot = obj.CreateFrictionSnapshot();
+ while (snapshot.IsValid()) {
+ IPhysicsObject other = snapshot.GetObject(1)!;
+ if (!other.IsMoveable() || other.GetMass() > heavyMass) {
+ contact = true;
+ break;
+ }
+ snapshot.NextFrictionData();
+ }
+ obj.DestroyFrictionSnapshot(snapshot);
+ return contact;
+ }
+
+ public SimResult Simulate(IPhysicsMotionController? controller, IPhysicsObject? obj, TimeUnit_t deltaTime, out Vector3 linear, out Vector3 angular) {
+ HLShadowControlParams shadowParams = Shadow;
+ if (InContactWithHeavyObject(obj!, GetLoadWeight()))
+ ContactAmount = MathLib.Approach(0.1f, ContactAmount, (float)deltaTime * 2.0f);
+ else
+ ContactAmount = MathLib.Approach(1.0f, ContactAmount, (float)deltaTime * 2.0f);
+
+ shadowParams.MaxAngular = Shadow.MaxAngular * ContactAmount * ContactAmount * ContactAmount;
+ TimeToArrive = obj!.ComputeShadowControl(shadowParams, TimeToArrive, deltaTime);
+
+ // Slide along the current contact points to fix bouncing problems
+ obj.GetVelocity(out Vector3 velocity, out Vector3 angVel);
+ PhysComputeSlideDirection(obj, velocity, angVel, out velocity, out _, true, GetLoadWeight());
+ obj.SetVelocityInstantaneous(velocity, angVel);
+
+ linear = default;
+ angular = default;
+ ErrorTime += (float)deltaTime;
+
+ return SimResult.LocalAcceleration;
+ }
+
+ public float GetSavedMass(IPhysicsObject obj) {
+ BaseEntity? held = AttachedEntity.Get();
+ if (held != null) {
+ if (obj.GetGameData() == held) {
+ IPhysicsObject[] list = ArrayPool.Shared.Rent(VPHYSICS_MAX_OBJECT_LIST_COUNT);
+ try {
+ int count = held.VPhysicsGetObjectList(list.AsSpan(0, VPHYSICS_MAX_OBJECT_LIST_COUNT));
+ for (int i = 0; i < count; i++) {
+ if (list[i] == obj)
+ return SavedMass[i];
+ }
+ }
+ finally {
+ ArrayPool.Shared.Return(list, true);
+ }
+ }
+ }
+ return 0.0f;
+ }
+
+ ///
+ /// Is this an object that the player is allowed to lift to a position
+ /// directly overhead? The default behavior prevents lifting objects directly
+ /// overhead, but there are exceptions for gameplay purposes.
+ ///
+ public bool IsObjectAllowedOverhead(BaseEntity entity) {
+ // Allow combine balls overhead
+ if (entity is PropCombineBall)
+ return true;
+
+ // Allow props that are specifically flagged as such
+ if (entity is PhysicsProp physProp && physProp.HasInteraction(PropDataInteractions.PhysgunAllowOverhead))
+ return true;
+
+ // String checks are fine here, we only run this code one time- when the object is picked up.
+ if (entity.ClassMatches("grenade_helicopter"))
+ return true;
+
+ if (entity.ClassMatches("weapon_striderbuster"))
+ return true;
+
+ return false;
+ }
+
+ public bool UpdateObject(BasePlayer player, float error) {
+ BaseEntity? entity = GetAttached();
+ if (entity == null || ComputeError() > error || player.GetGroundEntity() == entity || entity.VPhysicsGetObject() == null)
+ return false;
+
+ //Adrian: Oops, our object became motion disabled, let go!
+ IPhysicsObject? phys = entity.VPhysicsGetObject();
+ if (phys != null && phys.IsMoveable() == false)
+ return false;
+
+ QAngle playerAngles = player.EyeAngles();
+ MathLib.AngleVectors(playerAngles, out Vector3 forward, out _, out _);
+
+ float pitch = MathLib.AngleDistance(playerAngles.X, 0);
+
+ if (!AllowObjectOverhead)
+ playerAngles.X = Math.Clamp(pitch, -75, 75);
+ else
+ playerAngles.X = Math.Clamp(pitch, -90, 75);
+
+ // Now clamp a sphere of object radius at end to the player's bbox
+ Vector3 radial = physcollision.CollideGetExtent(phys!.GetCollide(), vec3_origin, entity.GetAbsAngles(), -forward);
+ Vector3 player2d = player.CollisionProp().OBBMaxs();
+ float playerRadius = player2d.Length2D();
+ float radius = playerRadius + MathF.Abs(Vector3.Dot(forward, radial));
+
+ float distance = 24 + (radius * 2.0f);
+
+ // Add the prop's distance offset
+ distance += DistanceOffset;
+
+ Vector3 start = player.Weapon_ShootPosition();
+ Vector3 end = start + (forward * distance);
+
+ TraceFilterSkipTwoEntities traceFilter = new(player, entity, CollisionGroup.None);
+ Ray ray = default;
+ ray.Init(start, end);
+ enginetrace.TraceRay(ray, Mask.SolidBrushOnly, ref traceFilter, out Trace tr);
+
+ if (tr.Fraction < 0.5)
+ end = start + forward * (radius * 0.5f);
+ else if (tr.Fraction <= 1.0f)
+ end = start + forward * (distance - radius);
+
+ player.CollisionProp().WorldSpaceAABB(out Vector3 playerMins, out Vector3 playerMaxs);
+ Vector3 playerLine = player.CollisionProp().WorldSpaceCenter();
+ MathLib.CalcClosestPointOnLine(end, playerLine + new Vector3(0, 0, playerMins.Z), playerLine + new Vector3(0, 0, playerMaxs.Z), out Vector3 nearest, out _);
+
+ if (!AllowObjectOverhead) {
+ Vector3 delta = end - nearest;
+ float len = MathLib.VectorNormalize(ref delta);
+ if (len < radius)
+ end = nearest + radius * delta;
+ }
+
+ QAngle angles = TransformAnglesFromPlayerSpace(AttachedAnglesPlayerSpace, player);
+
+ // If it has a preferred orientation, update to ensure we're still oriented correctly.
+ Pickup.GetPreferredCarryAngles(entity, player, player.EntityToWorldTransform(), ref angles);
+
+ // We may be holding a prop that has preferred carry angles
+ if (HasPreferredCarryAngles) {
+ ComputePlayerMatrix(player, out Matrix3x4 tmp);
+ angles = MathLib.TransformAnglesToWorldSpace(PreferredCarryAngles, tmp);
+ }
+
+ MathLib.AngleMatrix(angles, out Matrix3x4 attachedToWorld);
+ MathLib.VectorRotate(AttachedPositionObjectSpace, attachedToWorld, out Vector3 offset);
+
+ SetTargetPosition(end - offset, angles);
+
+ return true;
+ }
+
+ HLShadowControlParams Shadow;
+ TimeUnit_t TimeToArrive;
+ float ErrorTime;
+ float Error;
+ float ContactAmount;
+ float AngleAlignment;
+ bool CarriedEntityBlocksLOS;
+ bool IgnoreRelativePitch;
+
+ float LoadWeight;
+ readonly float[] SavedRotDamping = new float[VPHYSICS_MAX_OBJECT_LIST_COUNT];
+ readonly float[] SavedMass = new float[VPHYSICS_MAX_OBJECT_LIST_COUNT];
+ readonly EHANDLE AttachedEntity = new();
+ QAngle PreferredCarryAngles;
+ bool HasPreferredCarryAngles;
+ float DistanceOffset;
+
+ QAngle AttachedAnglesPlayerSpace;
+ Vector3 AttachedPositionObjectSpace;
+
+ IPhysicsMotionController? Controller;
+
+ // Can the player hold this object directly overhead? (Default is NO)
+ bool AllowObjectOverhead;
+}
+
+///
+/// Player pickup controller
+///
+[LinkEntityToClass("player_pickup")]
+public class PlayerPickupController : BaseEntity
+{
+ const float DOT_30DEGREE = 0.866025403784f;
+
+ public void Init(BasePlayer player, BaseEntity obj) {
+ // Holster player's weapon
+ if (player.GetActiveWeapon() != null) {
+ if (!player.GetActiveWeapon()!.CanHolster() || !player.GetActiveWeapon()!.Holster()) {
+ Shutdown();
+ return;
+ }
+ }
+
+ HL2_Player? owner = (HL2_Player?)ToBasePlayer(player);
+ owner?.EnableSprint(false);
+
+ // If the target is debris, convert it to non-debris
+ if (obj.GetCollisionGroup() == Source.CollisionGroup.Debris) {
+ // Interactive debris converts back to debris when it comes to rest
+ obj.SetCollisionGroup(Source.CollisionGroup.InteractiveDebris);
+ }
+
+ // done so I'll go across level transitions with the player
+ SetParent(player);
+ grabController.SetIgnorePitch(true);
+ grabController.SetAngleAlignment(DOT_30DEGREE);
+ Player = player;
+ IPhysicsObject? physics = obj.VPhysicsGetObject();
+
+ Pickup.OnPhysGunPickup(obj, Player, PhysGunPickup.PickedUpByPlayer);
+
+ grabController.AttachEntity(player, obj, physics!, false, vec3_origin, false);
+
+ // m_pPlayer->m_Local.m_iHideHUD |= HIDEHUD_WEAPONSELECTION;
+ Player.SetUseEntity(this);
+ }
+
+ public void Shutdown(bool thrown = false) {
+ BaseEntity? obj = grabController.GetAttached();
+
+ bool clearVelocity = false;
+ if (!thrown && obj != null && obj.VPhysicsGetObject() != null && obj.VPhysicsGetObject()!.GetContactPoint(out _, null!))
+ clearVelocity = true;
+
+ grabController.DetachEntity(clearVelocity);
+
+ if (obj != null)
+ Pickup.OnPhysGunDrop(obj, Player!, thrown ? PhysGunDrop.ThrownByPlayer : PhysGunDrop.DroppedByPlayer);
+
+ if (Player != null) {
+ HL2_Player? owner = (HL2_Player?)ToBasePlayer(Player);
+ owner?.EnableSprint(true);
+
+ Player.SetUseEntity(null);
+ if (Player.GetActiveWeapon() != null) {
+ if (!Player.GetActiveWeapon()!.Deploy()) {
+ // We tried to restore the player's weapon, but we couldn't.
+ // This usually happens when they're holding an empty weapon that doesn't
+ // autoswitch away when out of ammo. Switch to next best weapon.
+ Player.SwitchToNextBestWeapon(null);
+ }
+ }
+
+ // m_pPlayer->m_Local.m_iHideHUD &= ~HIDEHUD_WEAPONSELECTION;
+ }
+ Remove();
+ }
+
+ public override bool OnControls(BaseEntity controls) => true;
+
+ public override void Use(BaseEntity? activator, BaseEntity? caller, UseType useType, float value) {
+ if (ToBasePlayer(activator) == Player) {
+ BaseEntity? attached = grabController.GetAttached();
+
+ // UNDONE: Use vphysics stress to decide to drop objects
+ // UNDONE: Must fix case of forcing objects into the ground you're standing on (causes stress) before that will work
+ if (attached == null || useType == UseType.Off || (Player!.Buttons & InButtons.Attack2) != 0 || grabController.ComputeError() > 12) {
+ Shutdown();
+ return;
+ }
+
+ //Adrian: Oops, our object became motion disabled, let go!
+ IPhysicsObject? phys = attached.VPhysicsGetObject();
+ if (phys != null && phys.IsMoveable() == false) {
+ Shutdown();
+ return;
+ }
+
+ // +ATTACK will throw phys objects
+ if ((Player.Buttons & InButtons.Attack) != 0) {
+ Shutdown(true);
+ Player.EyeVectors(out Vector3 launch);
+ // JAY: Scale this with mass because some small objects really go flying
+ float massFactor = Math.Clamp(phys!.GetMass(), 0.5f, 15);
+ massFactor = MathLib.RemapVal(massFactor, 0.5f, 15, 0.5f, 4);
+ launch *= GrabController.player_throwforce.GetFloat() * massFactor;
+
+ phys.ApplyForceCenter(launch);
+ Vector3 aVel = RandomAngularImpulse(-10, 10) * massFactor;
+ phys.ApplyTorqueCenter(aVel);
+ return;
+ }
+
+ if (useType == UseType.Set) {
+ // update position
+ grabController.UpdateObject(Player, 12);
+ }
+ }
+ }
+
+ public bool IsHoldingEntity(BaseEntity? ent) => grabController.GetAttached() == ent;
+ public GrabController GetGrabController() => grabController;
+
+ readonly GrabController grabController = new();
+ BasePlayer? Player;
+
+ public static void PlayerPickupObject(BasePlayer player, BaseEntity obj) {
+ //Don't pick up if we don't have a phys object.
+ if (obj.VPhysicsGetObject() == null)
+ return;
+
+ PlayerPickupController? controller = (PlayerPickupController?)Create("player_pickup", obj.GetAbsOrigin(), vec3_angle, player);
+
+ if (controller == null)
+ return;
+
+ controller.Init(player, obj);
+ }
+
+ public static bool PlayerPickupControllerIsHoldingEntity(BaseEntity? pickupControllerEntity, BaseEntity? heldEntity) {
+ PlayerPickupController? controller = pickupControllerEntity as PlayerPickupController;
+
+ return controller != null ? controller.IsHoldingEntity(heldEntity) : false;
+ }
+
+ public static float PlayerPickupGetHeldObjectMass(BaseEntity? pickupControllerEntity, IPhysicsObject heldObject) {
+ float mass = 0.0f;
+ PlayerPickupController? controller = pickupControllerEntity as PlayerPickupController;
+ if (controller != null) {
+ GrabController grab = controller.GetGrabController();
+ mass = grab.GetSavedMass(heldObject);
+ }
+ return mass;
+ }
+}
diff --git a/Game.Server/Player.cs b/Game.Server/Player.cs
index f16091140..0901abeac 100644
--- a/Game.Server/Player.cs
+++ b/Game.Server/Player.cs
@@ -13,6 +13,7 @@
using Source.Common.Physics;
using Source.Engine;
+using System.Buffers;
using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;
@@ -1917,6 +1918,75 @@ public virtual void PlayUseDenySound() { }
public virtual void PickupObject(BaseEntity obj, bool limitMassAndSize = true) { }
+ public void SetUseEntity(BaseEntity? useEntity) => UseEntity.Set(useEntity);
+ public BaseEntity? GetUseEntity() => UseEntity.Get();
+
+ public static bool CanPickupObject(BaseEntity? obj, float massLimit, float sizeLimit) {
+ // UNDONE: Make this virtual and move to HL2 player
+ //Must be valid
+ if (obj == null)
+ return false;
+
+ //Must move with physics
+ if (obj.GetMoveType() != Source.MoveType.VPhysics)
+ return false;
+
+ IPhysicsObject[] list = ArrayPool.Shared.Rent(VPHYSICS_MAX_OBJECT_LIST_COUNT);
+ try {
+ int count = obj.VPhysicsGetObjectList(list);
+
+ //Must have a physics object
+ if (count == 0)
+ return false;
+
+ float objectMass = 0;
+ bool checkEnable = false;
+ for (int i = 0; i < count; i++) {
+ objectMass += list[i].GetMass();
+ if (!list[i].IsMoveable())
+ checkEnable = true;
+ if ((list[i].GetGameFlags() & Source.Common.Physics.PhysicsFlags.NoPlayerPickup) != 0)
+ return false;
+ if (list[i].IsHinged())
+ return false;
+ }
+
+ //Must be under our threshold weight
+ if (massLimit > 0 && objectMass > massLimit)
+ return false;
+
+ if (checkEnable) {
+ // Allowing picking up of bouncebombs.
+ // CBounceBomb *pBomb = dynamic_cast(pObject);
+ // if( pBomb )
+ // return true;
+
+ // Allow pickup of phys props that are motion enabled on player pickup
+ PhysicsProp? prop = obj as PhysicsProp;
+ PhysBox? box = obj as PhysBox;
+ if (prop == null && box == null)
+ return false;
+
+ if (prop != null && !(prop.HasSpawnFlags(SF_PHYSPROP_ENABLE_ON_PHYSCANNON)))
+ return false;
+
+ if (box != null && !(box.HasSpawnFlags(PhysBox.SF_PHYSBOX_ENABLE_ON_PHYSCANNON)))
+ return false;
+ }
+
+ if (sizeLimit > 0) {
+ ref readonly Vector3 size = ref obj.CollisionProp().OBBSize();
+ if (size.X > sizeLimit || size.Y > sizeLimit || size.Z > sizeLimit)
+ return false;
+ }
+
+ return true;
+ }
+ finally {
+ ArrayPool.Shared.Return(list, true);
+ }
+ }
+
///
/// Return true if this object can be +used by the player
///
diff --git a/Game.Server/PlayerPickup.cs b/Game.Server/PlayerPickup.cs
index d9beae73e..46afb506e 100644
--- a/Game.Server/PlayerPickup.cs
+++ b/Game.Server/PlayerPickup.cs
@@ -1,5 +1,7 @@
using Game.Server;
+using Source.Common;
+
using Source.Common.Mathematics;
using Source.Common.Physics;
@@ -34,7 +36,9 @@ public enum PhysGunForce
public static class Pickup
{
- public static void PlayerPickupObject(BasePlayer player, BaseEntity? obj) => throw new NotImplementedException();
+ public static void PlayerPickupObject(BasePlayer player, BaseEntity obj) => HL2.PlayerPickupController.PlayerPickupObject(player, obj);
+
+ // player pickup utility routine
public static void ForcePlayerToDropThisObject(BaseEntity? target) {
if (target == null)
return;
@@ -54,17 +58,89 @@ public static void ForcePlayerToDropThisObject(BaseEntity? target) {
}
}
- public static void OnPhysGunDrop(BaseEntity? obj, BasePlayer player, PhysGunDrop reason) => throw new NotImplementedException();
- public static void OnPhysGunPickup(BaseEntity? obj, BasePlayer player, PhysGunPickup reason = PhysGunPickup.PickedUpByCannon) => throw new NotImplementedException();
- public static bool OnAttemptPhysGunPickup(BaseEntity? obj, BasePlayer player, PhysGunPickup reason = PhysGunPickup.PickedUpByCannon) => throw new NotImplementedException();
- public static bool GetPreferredCarryAngles(BaseEntity? obj, BasePlayer player, ref Matrix3x4 localToWorld, out QAngle outputAnglesWorldSpace) => throw new NotImplementedException();
- public static bool ForcePhysGunOpen(BaseEntity? obj, BasePlayer player) => throw new NotImplementedException();
- public static bool ShouldPuntUseLaunchForces(BaseEntity? obj, PhysGunForce reason) => throw new NotImplementedException();
- public static Vector3 PhysGunLaunchAngularImpulse(BaseEntity? obj, PhysGunForce reason) => throw new NotImplementedException();
+ public static void OnPhysGunDrop(BaseEntity? droppedObject, BasePlayer player, PhysGunDrop reason) {
+ if (droppedObject is IPlayerPickupVPhysics pickup)
+ pickup.OnPhysGunDrop(player, reason);
+ }
+
+ public static void OnPhysGunPickup(BaseEntity? pickedUpObject, BasePlayer player, PhysGunPickup reason = PhysGunPickup.PickedUpByCannon) {
+ if (pickedUpObject is IPlayerPickupVPhysics pickup)
+ pickup.OnPhysGunPickup(player, reason);
+
+ // send phys gun pickup item event, but only in single player
+ if (!g_pGameRules.IsMultiplayer()) {
+ IGameEvent? ev = gameeventmanager.CreateEvent("physgun_pickup");
+ if (ev != null) {
+ ev.SetInt("entindex", pickedUpObject!.EntIndex());
+ gameeventmanager.FireEvent(ev);
+ }
+ }
+ }
+
+ public static bool OnAttemptPhysGunPickup(BaseEntity? pickedUpObject, BasePlayer player, PhysGunPickup reason = PhysGunPickup.PickedUpByCannon) {
+ if (pickedUpObject is IPlayerPickupVPhysics pickup)
+ return pickup.OnAttemptPhysGunPickup(player, reason);
+ return true;
+ }
+
+ public static BaseEntity? OnFailedPhysGunPickup(BaseEntity? pickedUpObject, Vector3 physgunPos) {
+ if (pickedUpObject is IPlayerPickupVPhysics pickup)
+ return pickup.OnFailedPhysGunPickup(physgunPos);
+
+ return null;
+ }
+
+ public static bool GetPreferredCarryAngles(BaseEntity? obj, BasePlayer player, in Matrix3x4 localToWorld, ref QAngle outputAnglesWorldSpace) {
+ if (obj is IPlayerPickupVPhysics pickup) {
+ if (pickup.HasPreferredCarryAnglesForPlayer(player)) {
+ outputAnglesWorldSpace = MathLib.TransformAnglesToWorldSpace(pickup.PreferredCarryAngles(), localToWorld);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static bool ForcePhysGunOpen(BaseEntity? obj, BasePlayer player) {
+ if (obj is IPlayerPickupVPhysics pickup)
+ return pickup.ForcePhysgunOpen(player);
+ return false;
+ }
+
+ public static Vector3 PhysGunLaunchAngularImpulse(BaseEntity? obj, PhysGunForce reason) {
+ if (obj is IPlayerPickupVPhysics pickup && pickup.ShouldPuntUseLaunchForces(reason))
+ return pickup.PhysGunLaunchAngularImpulse();
+ return RandomAngularImpulse(-600, 600);
+ }
+
public static Vector3 DefaultPhysGunLaunchVelocity(in Vector3 forward, float mass) => throw new NotImplementedException();
- public static Vector3 PhysGunLaunchVelocity(BaseEntity? obj, in Vector3 forward, PhysGunForce reason) => throw new NotImplementedException();
- public static BaseEntity? OnFailedPhysGunPickup(BaseEntity? pickedUpObject, Vector3 physgunPos) => throw new NotImplementedException();
+ public static Vector3 PhysGunLaunchVelocity(BaseEntity? obj, in Vector3 forward, PhysGunForce reason) {
+ // The object must be valid
+ if (obj == null) {
+ Assert(false);
+ return vec3_origin;
+ }
+
+ // Shouldn't ever get here with a non-vphysics object.
+ IPhysicsObject? physicsObject = obj.VPhysicsGetObject();
+ if (physicsObject == null) {
+ Assert(false);
+ return vec3_origin;
+ }
+
+ // Call the pickup entity's callback
+ if (obj is IPlayerPickupVPhysics pickup && pickup.ShouldPuntUseLaunchForces(reason))
+ return pickup.PhysGunLaunchVelocity(forward, physicsObject.GetMass());
+
+ // Do our default behavior
+ return DefaultPhysGunLaunchVelocity(forward, physicsObject.GetMass());
+ }
+
+ public static bool ShouldPuntUseLaunchForces(BaseEntity? obj, PhysGunForce reason) {
+ if (obj is IPlayerPickupVPhysics pickup)
+ return pickup.ShouldPuntUseLaunchForces(reason);
+ return false;
+ }
}
public interface IPlayerPickupVPhysics
From aae58b69c00196fb3cae68d3e29bdc7b1d427918 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:47:40 -0700
Subject: [PATCH 11/15] PhysicsProp ObjectCaps/Use, BreakableProp propdata
---
Game.Server/Props.cs | 86 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 85 insertions(+), 1 deletion(-)
diff --git a/Game.Server/Props.cs b/Game.Server/Props.cs
index ee0bbcb1d..9c8bb6ef4 100644
--- a/Game.Server/Props.cs
+++ b/Game.Server/Props.cs
@@ -57,10 +57,56 @@ public void ParsePropData() { }
}
[NetworkName("CBreakableProp")]
-public class BreakableProp : BaseProp
+public class BreakableProp : BaseProp, IBreakableWithPropData
{
public static readonly SendTable DT_BreakableProp = new(DT_BaseAnimating, []);
public static readonly new ServerClass ServerClass = new ServerClass(DT_BreakableProp);
+
+ public void SetDmgModBullet(float dmgMod) => DmgModBullet = dmgMod;
+ public void SetDmgModClub(float dmgMod) => DmgModClub = dmgMod;
+ public void SetDmgModExplosive(float dmgMod) => DmgModExplosive = dmgMod;
+ public float GetDmgModBullet() => DmgModBullet;
+ public float GetDmgModClub() => DmgModClub;
+ public float GetDmgModExplosive() => DmgModExplosive;
+ public void SetExplosiveRadius(float radius) => ExplodeRadius = radius;
+ public void SetExplosiveDamage(float damage) => ExplodeDamage = damage;
+ public float GetExplosiveRadius() => ExplodeRadius;
+ public float GetExplosiveDamage() => ExplodeDamage;
+ public void SetPhysicsDamageTable(ReadOnlySpan tableName) => PhysicsDamageTableName = tableName.IsEmpty ? null : new(tableName);
+ public ReadOnlySpan GetPhysicsDamageTable() => PhysicsDamageTableName;
+ public void SetBreakableModel(ReadOnlySpan model) => BreakableModel = model.IsEmpty ? null : new(model);
+ public ReadOnlySpan GetBreakableModel() => BreakableModel;
+ public void SetBreakableSkin(int skin) => BreakableSkin = skin;
+ public int GetBreakableSkin() => BreakableSkin;
+ public void SetBreakableCount(int count) => BreakableCount = count;
+ public int GetBreakableCount() => BreakableCount;
+ public void SetMaxBreakableSize(int size) => MaxBreakableSize = size;
+ public int GetMaxBreakableSize() => MaxBreakableSize;
+ public void SetPropDataBlocksLOS(bool blocksLOS) => SetBlocksLOS(blocksLOS);
+ public void SetPropDataIsAIWalkable(bool blocksLOS) => SetAIWalkable(blocksLOS);
+ public void SetBasePropData(ReadOnlySpan propdata) => BasePropData = propdata.IsEmpty ? null : new(propdata);
+ public ReadOnlySpan GetBasePropData() => BasePropData;
+ public void SetInteraction(PropDataInteractions interaction) => Interactions |= (1 << (int)interaction);
+ public bool HasInteraction(PropDataInteractions interaction) => (Interactions & (1 << (int)interaction)) != 0;
+ public void SetPhysicsMode(PhysicsMultiplayerMode mode) => m_iPhysicsMode = mode;
+ public PhysicsMultiplayerMode GetPhysicsMode() => m_iPhysicsMode;
+ public void SetMultiplayerBreakMode(MultiplayerBreak mode) => MpBreakMode = mode;
+ public MultiplayerBreak GetMultiplayerBreakMode() => MpBreakMode;
+
+ protected float DmgModBullet;
+ protected float DmgModClub;
+ protected float DmgModExplosive;
+ protected string? PhysicsDamageTableName;
+ protected string? BreakableModel;
+ protected int BreakableSkin;
+ protected int BreakableCount;
+ protected int MaxBreakableSize;
+ protected string? BasePropData;
+ protected int Interactions;
+ protected float ExplodeDamage;
+ protected float ExplodeRadius;
+ protected PhysicsMultiplayerMode m_iPhysicsMode;
+ protected MultiplayerBreak MpBreakMode;
}
[LinkEntityToClass("func_physbox_multiplayer")]
@@ -76,6 +122,10 @@ public class PhysBoxMultiplayer : PhysBox, IMultiplayerPhysics
public int PhysicsMode;
[NetworkName("m_fMass")]
public float Mass;
+
+ public PhysicsMultiplayerMode GetMultiplayerPhysicsMode() => (PhysicsMultiplayerMode)PhysicsMode;
+ public float GetMass() => Mass;
+ public bool IsAsleep() => VPhysicsGetObject()!.IsAsleep();
}
[LinkEntityToClass("physics_prop")]
@@ -139,6 +189,40 @@ public virtual bool CreateVPhysics() {
return true;
}
+
+ public override EntityCapabilities ObjectCaps() {
+ EntityCapabilities caps = base.ObjectCaps() | EntityCapabilities.WorldcraftEditPosition;
+
+ if (HasSpawnFlags(SF_PHYSPROP_ENABLE_PICKUP_OUTPUT))
+ caps |= EntityCapabilities.ImpulseUse;
+ else if (BasePlayer.CanPickupObject(this, 35, 128)) {
+ caps |= EntityCapabilities.ImpulseUse;
+
+ if (hl2_episodic.GetBool() && HasInteraction(PropDataInteractions.PhysgunCreateFlare)) {
+ caps |= EntityCapabilities.UseInRadius;
+ }
+ }
+
+ if (HasSpawnFlags(SF_PHYSPROP_RADIUS_PICKUP)) {
+ caps |= EntityCapabilities.UseInRadius;
+ }
+
+ return caps;
+ }
+
+ public override void Use(BaseEntity? activator, BaseEntity? caller, UseType useType, float value) {
+ BasePlayer? player = ToBasePlayer(activator);
+ if (player != null) {
+ // if (HasSpawnFlags(SF_PHYSPROP_ENABLE_PICKUP_OUTPUT))
+ // OnPlayerUse.FireOutput(this, this);
+
+ player.PickupObject(this);
+ }
+ }
+
+ public float GetCarryDistanceOffset() => CarryDistanceOffset;
+
+ float CarryDistanceOffset;
}
[LinkEntityToClass("dynamic_prop")]
From 989eff218d3aed9a6acf176fabe755b9966a43a6 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:47:40 -0700
Subject: [PATCH 12/15] Regenerate entities checklist
---
ENTITIES_COMPLETED.md | 194 +++++++++++++++++++++---------------------
1 file changed, 97 insertions(+), 97 deletions(-)
diff --git a/ENTITIES_COMPLETED.md b/ENTITIES_COMPLETED.md
index 57be838e5..dfa5969f4 100644
--- a/ENTITIES_COMPLETED.md
+++ b/ENTITIES_COMPLETED.md
@@ -14,21 +14,21 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
`█░░░░░░░░░░░░░░░░░░░` **51 / 788 classnames complete (6.5%)**
-`████░░░░░░░░░░░░░░░░` **2,744 / 15,450 boxes checked (17.8%)**
+`████░░░░░░░░░░░░░░░░` **2,823 / 15,450 boxes checked (18.3%)**
-- 259 / 691 GMod C++ classes have a C# class (37.5%)
+- 260 / 691 GMod C++ classes have a C# class (37.6%)
- 1 / 49 base classes complete
-- 469 classnames have no boxes checked
+- 468 classnames have no boxes checked
| Kind | Checked | Total | Done |
| ------------------------- | ------: | -----: | -----: |
-| Linked | 318 | 788 | 40.4% |
+| Linked | 319 | 788 | 40.5% |
| Networked | 244 | 244 | 100.0% |
| KeyValues | 227 | 1,590 | 14.3% |
-| Inputs | 176 | 1,382 | 12.7% |
+| Inputs | 177 | 1,382 | 12.8% |
| Outputs | 107 | 543 | 19.7% |
| Think/Touch/Use functions | 32 | 409 | 7.8% |
-| Methods | 1,640 | 10,494 | 15.6% |
+| Methods | 1,717 | 10,494 | 16.4% |
### Closest to done
@@ -50,8 +50,8 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
| Entry | Checked | Done | Left |
| -------------------- | ------: | ----: | ---: |
| CAI_BaseNPC | 209/578 | 36.2% | 369 |
-| CBaseEntity | 314/535 | 58.7% | 221 |
-| CBasePlayer | 145/324 | 44.8% | 179 |
+| CBaseEntity | 316/535 | 59.1% | 219 |
+| CBasePlayer | 146/324 | 45.1% | 178 |
| npc_strider | 2/157 | 1.3% | 155 |
| npc_hunter | 0/142 | 0.0% | 142 |
| npc_metropolice | 13/150 | 8.7% | 137 |
@@ -68,13 +68,13 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
| logic_* | 10/23 | 177/320 | 55.3% |
| trigger_* | 11/34 | 104/286 | 36.4% |
| cycler_* | 1/6 | 7/25 | 28.0% |
+| func_* | 4/69 | 232/942 | 24.6% |
| weapon_* | 0/37 | 162/737 | 22.0% |
-| func_* | 4/69 | 199/942 | 21.1% |
+| player_* | 0/6 | 19/91 | 20.9% |
| light_* | 0/6 | 7/36 | 19.4% |
| env_* | 6/82 | 179/956 | 18.7% |
| ai_* | 1/24 | 58/391 | 14.8% |
-| player_* | 0/6 | 12/91 | 13.2% |
-| prop_* | 0/50 | 86/793 | 10.8% |
+| prop_* | 0/50 | 89/793 | 11.2% |
| info_* | 0/40 | 26/245 | 10.6% |
| point_* | 0/29 | 29/432 | 6.7% |
| physics_* | 0/5 | 4/62 | 6.5% |
@@ -2798,20 +2798,20 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `DamageSound`
- [ ] `Die`
- [ ] `DrawDebugTextOverlays`
- - [ ] `GetBasePropData`
- - [ ] `GetBreakableCount`
- - [ ] `GetBreakableModel`
- - [ ] `GetBreakableSkin`
- - [ ] `GetDmgModBullet`
- - [ ] `GetDmgModClub`
- - [ ] `GetDmgModExplosive`
- - [ ] `GetExplosiveDamage`
- - [ ] `GetExplosiveRadius`
- - [ ] `GetMaxBreakableSize`
- - [ ] `GetMultiplayerBreakMode`
- - [ ] `GetPhysicsDamageTable`
- - [ ] `GetPhysicsMode`
- - [ ] `HasInteraction`
+ - [x] `GetBasePropData`
+ - [x] `GetBreakableCount`
+ - [x] `GetBreakableModel`
+ - [x] `GetBreakableSkin`
+ - [x] `GetDmgModBullet`
+ - [x] `GetDmgModClub`
+ - [x] `GetDmgModExplosive`
+ - [x] `GetExplosiveDamage`
+ - [x] `GetExplosiveRadius`
+ - [x] `GetMaxBreakableSize`
+ - [x] `GetMultiplayerBreakMode`
+ - [x] `GetPhysicsDamageTable`
+ - [x] `GetPhysicsMode`
+ - [x] `HasInteraction`
- [ ] `HasPhysicsAttacker`
- [ ] `IsBreakable`
- [ ] `KeyValue`
@@ -2823,23 +2823,23 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `ParsePropData`
- [ ] `Precache`
- [ ] `ResetOnGroundFlags`
- - [ ] `SetBasePropData`
- - [ ] `SetBreakableCount`
- - [ ] `SetBreakableModel`
- - [ ] `SetBreakableSkin`
- - [ ] `SetDmgModBullet`
- - [ ] `SetDmgModClub`
- - [ ] `SetDmgModExplosive`
- - [ ] `SetExplosiveDamage`
- - [ ] `SetExplosiveRadius`
- - [ ] `SetInteraction`
- - [ ] `SetMaxBreakableSize`
- - [ ] `SetMultiplayerBreakMode`
+ - [x] `SetBasePropData`
+ - [x] `SetBreakableCount`
+ - [x] `SetBreakableModel`
+ - [x] `SetBreakableSkin`
+ - [x] `SetDmgModBullet`
+ - [x] `SetDmgModClub`
+ - [x] `SetDmgModExplosive`
+ - [x] `SetExplosiveDamage`
+ - [x] `SetExplosiveRadius`
+ - [x] `SetInteraction`
+ - [x] `SetMaxBreakableSize`
+ - [x] `SetMultiplayerBreakMode`
- [ ] `SetPhysicsAttacker`
- - [ ] `SetPhysicsDamageTable`
- - [ ] `SetPhysicsMode`
- - [ ] `SetPropDataBlocksLOS`
- - [ ] `SetPropDataIsAIWalkable`
+ - [x] `SetPhysicsDamageTable`
+ - [x] `SetPhysicsMode`
+ - [x] `SetPropDataBlocksLOS`
+ - [x] `SetPropDataIsAIWalkable`
- [ ] `Spawn`
- [ ] `TraceAttack`
- [ ] `UpdateHealth`
@@ -3397,9 +3397,9 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] Networked (SendTable for `CPhysBoxMultiplayer`)
- Methods
- [ ] `Activate`
- - [ ] `GetMass`
- - [ ] `GetMultiplayerPhysicsMode`
- - [ ] `IsAsleep`
+ - [x] `GetMass`
+ - [x] `GetMultiplayerPhysicsMode`
+ - [x] `IsAsleep`
- [ ] **func_plat** · `CFuncPlat` · `game/server/trains.cpp` · C#: *none*
- [ ] Linked (`func_plat`)
- Inputs
@@ -10863,7 +10863,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `KillSilent`
- [ ] `OnDamagedByExplosion`
- [ ] `OnPlayerSay`
- - [ ] `PickupObject`
+ - [x] `PickupObject`
- [ ] `PlayGesture`
- [ ] `PlayerDeathThink`
- [x] `PlayerRunCommand`
@@ -10912,16 +10912,16 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] `Spawn`
- [x] `UpdatePlayerData`
- [x] `UpdateTransmitState`
-- [ ] **player_pickup** · `CPlayerPickupController` · `game/server/hl1/hl1_player.cpp` · C#: *none*
- - [ ] Linked (`player_pickup`)
+- [ ] **player_pickup** · `CPlayerPickupController` · `game/server/hl1/hl1_player.cpp` · C# `PlayerPickupController` ([Game.Server/HL2/PlayerPickupController.cs](Game.Server/HL2/PlayerPickupController.cs))
+ - [x] Linked (`player_pickup`)
- Methods
- - [ ] `Init`
- - [ ] `IsHoldingEntity`
- - [ ] `OnControls`
+ - [x] `Init`
+ - [x] `IsHoldingEntity`
+ - [x] `OnControls`
- [ ] `OnRestore`
- - [ ] `Shutdown`
+ - [x] `Shutdown`
- [ ] `UpdateOnRemove`
- - [ ] `Use`
+ - [x] `Use`
- [ ] `VPhysicsShadowUpdate`
- [ ] `VPhysicsUpdate`
- [ ] **player_speedmod** · `CMovementSpeedMod` · `game/server/player.cpp` · C#: *none*
@@ -11788,7 +11788,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [x] `CreateVPhysics`
- [ ] `DrawDebugTextOverlays`
- [ ] `EnableMotion`
- - [ ] `GetCarryDistanceOffset`
+ - [x] `GetCarryDistanceOffset`
- [ ] `GetMass`
- [ ] `GetMassCenter`
- [ ] `GetNavObstructionHeight`
@@ -11797,7 +11797,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `HandleAnyCollisionInteractions`
- [x] `IsGib`
- [ ] `IsPotentiallyAbleToObstructNavAreas`
- - [ ] `ObjectCaps`
+ - [x] `ObjectCaps`
- [ ] `OnNavMeshLoaded`
- [ ] `OnPhysGunDrop`
- [ ] `OnPhysGunPickup`
@@ -11806,7 +11806,7 @@ This is a list of every entity classname that Garry's Mod's server (`server_srv.
- [ ] `Precache`
- [x] `Spawn`
- [ ] `TestCollision`
- - [ ] `Use`
+ - [x] `Use`
- [ ] `VPhysicsCollision`
- [ ] `VPhysicsUpdate`
- Also linked as: `item_crate`, `physics_prop`, `prop_exploding_barrel`, `prop_flare`, `prop_physics_multiplayer`, `prop_physics_override`, `prop_weighted_cube`
@@ -16526,7 +16526,7 @@ Datadesc and methods that the entities above inherit.
- [x] `Instance`
- [x] `Intersects`
- [x] `InvalidatePhysicsRecursive`
- - [ ] `IsAIWalkable`
+ - [x] `IsAIWalkable`
- [ ] `IsARagdoll`
- [x] `IsAlive`
- [x] `IsBSPModel`
@@ -16672,7 +16672,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `SaveLua`
- [ ] `SendDebugPivotOverlay`
- [ ] `SendOnKilledGameEvent`
- - [ ] `SetAIWalkable`
+ - [x] `SetAIWalkable`
- [x] `SetAbsAngles`
- [x] `SetAbsOrigin`
- [x] `SetAbsVelocity`
@@ -17167,7 +17167,7 @@ Datadesc and methods that the entities above inherit.
- [x] `CanBreatheUnderwater`
- [ ] `CanEnterVehicle`
- [ ] `CanHearAndReadChatFrom`
- - [ ] `CanPickupObject`
+ - [x] `CanPickupObject`
- [x] `CanSpeak`
- [x] `ChangeTeam`
- [x] `CheatImpulseCommands`
@@ -17639,24 +17639,24 @@ Datadesc and methods that the entities above inherit.
- [ ] `FindEnableMotionFixup`
- [ ] `ForceFadeScaleToAlwaysVisible`
- [ ] `GetAutoAimRadius`
- - [ ] `GetBasePropData`
- - [ ] `GetBreakableCount`
- - [ ] `GetBreakableModel`
- - [ ] `GetBreakableSkin`
- - [ ] `GetDmgModBullet`
- - [ ] `GetDmgModClub`
- - [ ] `GetDmgModExplosive`
+ - [x] `GetBasePropData`
+ - [x] `GetBreakableCount`
+ - [x] `GetBreakableModel`
+ - [x] `GetBreakableSkin`
+ - [x] `GetDmgModBullet`
+ - [x] `GetDmgModClub`
+ - [x] `GetDmgModExplosive`
- [ ] `GetEnableMotionPosition`
- - [ ] `GetExplosiveDamage`
- - [ ] `GetExplosiveRadius`
- - [ ] `GetMaxBreakableSize`
- - [ ] `GetMultiplayerBreakMode`
- - [ ] `GetPhysicsDamageTable`
- - [ ] `GetPhysicsMode`
+ - [x] `GetExplosiveDamage`
+ - [x] `GetExplosiveRadius`
+ - [x] `GetMaxBreakableSize`
+ - [x] `GetMultiplayerBreakMode`
+ - [x] `GetPhysicsDamageTable`
+ - [x] `GetPhysicsMode`
- [ ] `GetRootPhysicsObjectForBreak`
- [ ] `HandleFirstCollisionInteractions`
- [ ] `HandleInteractionStick`
- - [ ] `HasInteraction`
+ - [x] `HasInteraction`
- [ ] `HasPhysicsAttacker`
- [ ] `HasPreferredCarryAnglesForPlayer`
- [ ] `Ignite`
@@ -17671,24 +17671,24 @@ Datadesc and methods that the entities above inherit.
- [ ] `Precache`
- [ ] `PreferredCarryAngles`
- [ ] `RampToDefaultFadeScale`
- - [ ] `SetBasePropData`
- - [ ] `SetBreakableCount`
- - [ ] `SetBreakableModel`
- - [ ] `SetBreakableSkin`
- - [ ] `SetDmgModBullet`
- - [ ] `SetDmgModClub`
- - [ ] `SetDmgModExplosive`
+ - [x] `SetBasePropData`
+ - [x] `SetBreakableCount`
+ - [x] `SetBreakableModel`
+ - [x] `SetBreakableSkin`
+ - [x] `SetDmgModBullet`
+ - [x] `SetDmgModClub`
+ - [x] `SetDmgModExplosive`
- [ ] `SetEnableMotionPosition`
- - [ ] `SetExplosiveDamage`
- - [ ] `SetExplosiveRadius`
- - [ ] `SetInteraction`
- - [ ] `SetMaxBreakableSize`
- - [ ] `SetMultiplayerBreakMode`
+ - [x] `SetExplosiveDamage`
+ - [x] `SetExplosiveRadius`
+ - [x] `SetInteraction`
+ - [x] `SetMaxBreakableSize`
+ - [x] `SetMultiplayerBreakMode`
- [ ] `SetPhysicsAttacker`
- - [ ] `SetPhysicsDamageTable`
- - [ ] `SetPhysicsMode`
- - [ ] `SetPropDataBlocksLOS`
- - [ ] `SetPropDataIsAIWalkable`
+ - [x] `SetPhysicsDamageTable`
+ - [x] `SetPhysicsMode`
+ - [x] `SetPropDataBlocksLOS`
+ - [x] `SetPropDataIsAIWalkable`
- [ ] `Spawn`
- [ ] `StickAtPosition`
- [ ] `UpdateHealth`
@@ -17928,7 +17928,7 @@ Datadesc and methods that the entities above inherit.
- [ ] `OnSquadMemberKilled`
- [ ] `DisableFlashlight`
- [ ] `EnableFlashlight`
- - [ ] `ForceDropPhysObjects`
+ - [x] `ForceDropPhysObjects`
- Methods
- [x] `Activate`
- [ ] `ApplyBattery`
@@ -17960,7 +17960,7 @@ Datadesc and methods that the entities above inherit.
- [x] `FlashlightTurnOff`
- [x] `FlashlightTurnOn`
- [x] `ForceDropOfCarriedPhysObjects`
- - [ ] `GetHeldObjectMass`
+ - [x] `GetHeldObjectMass`
- [ ] `GetIdleTime`
- [ ] `GetLadderSurface`
- [ ] `GetLastDamageTime`
@@ -17979,7 +17979,7 @@ Datadesc and methods that the entities above inherit.
- [x] `InitVCollision`
- [x] `IsDucking`
- [ ] `IsFollowingPhysics`
- - [ ] `IsHoldingEntity`
+ - [x] `IsHoldingEntity`
- [ ] `IsIlluminatedByFlashlight`
- [ ] `IsZooming`
- [x] `ItemPostFrame`
@@ -18740,6 +18740,7 @@ Datadesc and methods that the entities above inherit.
[ ] [L - K I O - _] EnvFade (aka env_fade)
[ ] [L N - - - T _] PlayerResource (aka player_manager)
[ ] [L - K I - - _] EnvZoom (aka env_zoom)
+[ ] [L N - - - - _] PhysBoxMultiplayer (aka func_physbox_multiplayer)
[ ] [L N - - - - _] TriggerPlayerMovement (aka trigger_playermovement)
[ ] [L - K I O _ _] TriggerImpact (aka trigger_impact)
[ ] [L N - - - - _] WeaponStunStick (aka weapon_stunstick)
@@ -18762,6 +18763,7 @@ Datadesc and methods that the entities above inherit.
[ ] [- N - - - - _] HL2MP_Player
[ ] [L - _ I - - _] LogicCollisionPair (aka logic_collision_pair)
[ ] [L N - - - - _] BaseViewModel (aka viewmodel)
+[ ] [L - - - - - _] PlayerPickupController (aka player_pickup)
[ ] [L - _ _ - - _] TriggerPush (aka trigger_push)
[ ] [L N _ _ O _ _] BaseEntity (aka func_proprrespawnzone)
[ ] [L N _ _ _ _ _] DynamicProp (aka asw_door, dod_control_point, dynamic_prop, env_portal_laser, npc_personality_core, npc_wheatley_boss, prop_button, prop_car_alarm, prop_car_glass, prop_dropper, prop_dynamic, prop_dynamic_glow, prop_dynamic_override, prop_floor_ball_button, prop_floor_button, prop_floor_cube_button, prop_health_cabinet, prop_indicator_panel, prop_laser_catcher, prop_laser_relay, prop_portal_stats_display, prop_testchamber_door, prop_tractor_beam, prop_under_button, prop_under_floor_button, prop_wall_projector, team_control_point)
@@ -18780,6 +18782,7 @@ Datadesc and methods that the entities above inherit.
[ ] [L - - - - - _] FuncNavPrefer (aka func_nav_prefer)
[ ] [L - _ _ - - _] FuncBrush (aka func_brush, func_simpleladder)
[ ] [L N _ _ _ - _] FuncLadder (aka func_useableladder)
+[ ] [L - _ _ _ _ _] Breakable (aka func_breakable)
[ ] [- N - _ - - _] BasePlayer
[ ] [L N - _ - - _] PropScalable (aka prop_coreball, prop_scalable)
[ ] [L N - - - - _] WeaponShotgun (aka weapon_shotgun)
@@ -18794,18 +18797,18 @@ Datadesc and methods that the entities above inherit.
[ ] [- N _ _ _ _ _] AI_BaseNPC
[ ] [L N - - - - _] WeaponHL2MPBase (aka weapon_hl2mp_base)
[ ] [L N - - - - _] WeaponSMG1 (aka weapon_smg1)
+[ ] [- N _ _ _ _ _] BreakableProp
+[ ] [L N _ _ _ _ _] PhysicsProp (aka item_crate, physics_prop, prop_exploding_barrel, prop_flare, prop_physics, prop_physics_multiplayer, prop_physics_override, prop_weighted_cube)
[ ] [L N - - - - _] BaseHL1MPCombatWeapon (aka basehl1mpcombatweapon)
[ ] [L N _ _ - - _] EnvAmbientLight (aka env_ambient_light)
[ ] [L N _ - - - _] InfoLightingRelative (aka info_lighting_relative)
[ ] [L N - - - - _] ParticleSmokeGrenade (aka env_particlesmokegrenade)
[ ] [L N - - - - _] PhysBeam (aka physgun_beam)
-[ ] [L N - - - - _] PhysBoxMultiplayer (aka func_physbox_multiplayer)
[ ] [L N - - - - _] RagdollPropAttached (aka prop_ragdoll_attached)
[ ] [L N - - - _ _] WaterBullet (aka waterbullet)
[ ] [L N - - - - _] WeaponCitizenPackage (aka weapon_citizenpackage)
[ ] [L - - - - - _] EnvLight (aka light_environment)
[ ] [_ - _ _ _ - M] Message (aka env_message)
-[ ] [L N _ _ _ _ _] PhysicsProp (aka item_crate, physics_prop, prop_exploding_barrel, prop_flare, prop_physics, prop_physics_multiplayer, prop_physics_override, prop_weighted_cube)
[ ] [- N _ _ _ - _] BaseAnimating
[ ] [L N - - - - _] FireSmoke (aka _firesmoke)
[ ] [L N - _ - - _] FuncMonitor (aka func_monitor)
@@ -18874,6 +18877,7 @@ Datadesc and methods that the entities above inherit.
[ ] [L N - - - - _] BoneManipulate (aka manipulate_bone)
[ ] [L N _ _ - - _] FuncSmokeVolume (aka func_smokevolume)
[ ] [L N - - - - _] WeaponEgon (aka weapon_egon)
+[ ] [L N - - - - _] GMOD_Player (aka player)
[ ] [L N _ _ - _ _] Tesla (aka point_tesla)
[ ] [L N - - - - _] WeaponAR2 (aka weapon_ar2)
[ ] [L N _ _ _ _ _] EnvWind (aka env_wind)
@@ -18886,7 +18890,6 @@ Datadesc and methods that the entities above inherit.
[ ] [L N - - - - _] WeaponFrag (aka weapon_frag)
[ ] [L N - - - - _] WeaponGlock (aka weapon_glock_hl1)
[ ] [L N - - - - _] WeaponMP5 (aka weapon_mp5_hl1)
-[ ] [L N - - - - _] GMOD_Player (aka player)
[ ] [L N - - - - _] WeaponAlyxGun (aka weapon_alyxgun)
[ ] [L - _ _ - - _] FuncNavPrerequisite (aka func_nav_prerequisite)
[ ] [L N - - _ _ _] NPC_Barney (aka npc_barney)
@@ -18947,11 +18950,9 @@ Datadesc and methods that the entities above inherit.
[ ] [L N _ _ _ _ _] NPC_Manhack (aka npc_manhack)
[ ] [L N _ _ _ - _] NPC_Vortigaunt (aka npc_vortigaunt)
[ ] [- N _ _ _ - _] BasePropDoor
-[ ] [L - _ _ _ _ _] Breakable (aka func_breakable)
[ ] [- N _ _ - _ _] BaseHelicopter
[ ] [- - _ _ - - _] AI_PlayerAlly
[ ] [L N _ _ - _ _] NPC_Strider (aka npc_strider)
-[ ] [- N _ _ _ _ _] BreakableProp
[ ] [_ - _ _ - _ _] NPC_Hunter (aka npc_hunter)
[ ] [_ - _ _ _ _ _] NPC_AttackHelicopter (aka npc_helicopter)
[ ] [- - _ _ _ - _] NPC_PlayerCompanion
@@ -19153,7 +19154,6 @@ Datadesc and methods that the entities above inherit.
[ ] [_ - _ _ _ - _] LogicEventListenerItemEquip (aka logic_eventlistener_itemequip)
[ ] [_ - _ _ _ _ _] MultiManager (aka multi_manager)
[ ] [_ - - - - - _] NewNPC (aka npc_newnpc)
-[ ] [_ - - - - - _] PlayerPickupController (aka player_pickup)
[ ] [_ - _ _ _ - _] PointEntityFinder (aka point_entity_finder)
[ ] [_ - _ _ _ _ _] PointPlayerMoveConstraint (aka point_playermoveconstraint)
[ ] [_ - _ _ _ - _] PointVelocitySensor (aka point_velocitysensor)
From ab9280ea66300b3efb60fcd40251e19fe0b161d2 Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:56:59 -0700
Subject: [PATCH 13/15] fix GrabController attached entity handle being
readonly
---
Game.Server/HL2/PlayerPickupController.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Game.Server/HL2/PlayerPickupController.cs b/Game.Server/HL2/PlayerPickupController.cs
index 050659536..e1e213f20 100644
--- a/Game.Server/HL2/PlayerPickupController.cs
+++ b/Game.Server/HL2/PlayerPickupController.cs
@@ -497,7 +497,7 @@ public bool UpdateObject(BasePlayer player, float error) {
float LoadWeight;
readonly float[] SavedRotDamping = new float[VPHYSICS_MAX_OBJECT_LIST_COUNT];
readonly float[] SavedMass = new float[VPHYSICS_MAX_OBJECT_LIST_COUNT];
- readonly EHANDLE AttachedEntity = new();
+ EHANDLE AttachedEntity = new();
QAngle PreferredCarryAngles;
bool HasPreferredCarryAngles;
float DistanceOffset;
From 72fef9a582ae7d73352e60f7abc202f7982ed2cd Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:56:59 -0700
Subject: [PATCH 14/15] Draw engine version text above the menu
---
Source.Engine/ConSys.cs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Source.Engine/ConSys.cs b/Source.Engine/ConSys.cs
index 949a45a6b..9821e1a56 100644
--- a/Source.Engine/ConSys.cs
+++ b/Source.Engine/ConSys.cs
@@ -103,6 +103,12 @@ public override void Paint() {
}
public override void PaintBackground() {
+#if !GMOD_DLL
+ DrawVersion();
+#endif
+ }
+
+ public void DrawVersion() {
if (!Con.IsVisible())
return;
@@ -474,7 +480,12 @@ public NotifyOverlayPanel() : base(null, "GModConsoleOverlayPanel") {
public override void OnThink() => Surface.MovePopupToFront(this);
public override void Paint() {
- if (ClientDLL.ShouldDrawDropdownConsole() && ConPanel.Instance != null)
+ if (ConPanel.Instance == null)
+ return;
+
+ ConPanel.Instance.DrawVersion();
+
+ if (ClientDLL.ShouldDrawDropdownConsole())
ConPanel.Instance.DrawNotify();
}
From 8d6a9c35a2530ba0edc804c057596451109af7ef Mon Sep 17 00:00:00 2001
From: march <106459595+marchc1@users.noreply.github.com>
Date: Sat, 10 Oct 2026 23:58:06 -0700
Subject: [PATCH 15/15] EHANDLE Locker was readonly
---
Game.Shared/BaseCombatWeaponShared.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Game.Shared/BaseCombatWeaponShared.cs b/Game.Shared/BaseCombatWeaponShared.cs
index c5e8a14d0..188fc34d6 100644
--- a/Game.Shared/BaseCombatWeaponShared.cs
+++ b/Game.Shared/BaseCombatWeaponShared.cs
@@ -255,7 +255,7 @@ private static void RecvProxy_WeaponState(ref readonly RecvProxyData data, objec
public virtual bool CanBePickedUpByNPCs() => true;
TimeUnit_t UnlockTime;
- readonly EHANDLE Locker = new();
+ EHANDLE Locker = new();
public void Lock(TimeUnit_t lockTime, BaseEntity? locker) {
UnlockTime = gpGlobals.CurTime + lockTime;