Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Game.Client/C_BaseAnimating.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ public override void ResetLatched() {
}
public override bool IsRagdoll() => Ragdoll != null && RenderFX == (byte)RenderFx.Ragdoll;

public override CollideType GetCollideType() {
if (IsRagdoll())
return CollideType.ShouldRespond;

return base.GetCollideType();
}

public override ShadowType ShadowCastType() {
StudioHdr? studioHdr = GetModelPtr();
if (studioHdr == null || !studioHdr.SequencesAvailable())
Expand Down
10 changes: 10 additions & 0 deletions Game.Client/C_BaseEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2172,6 +2172,14 @@ public virtual void NotifyShouldTransmit(ShouldTransmiteState state) {
if (EntIndex() < 0)
return;

#if GMOD_DLL
if (g_Lua != null && gGM != null && gGM.CallWithArgs((int)LUA_POOLEDSTRING.NotifyShouldTransmit)) {
GarrysMod.LuaEntity.Push_Entity(this);
g_Lua.PushBool(state == ShouldTransmiteState.Start);
gGM.CallNoReturns(2);
}
#endif

switch (state) {
case ShouldTransmiteState.Start: {
SetDormant(false);
Expand Down Expand Up @@ -2200,6 +2208,8 @@ public virtual void NotifyShouldTransmit(ShouldTransmiteState state) {
case ShouldTransmiteState.End: {
UnlinkFromHierarchy();
SetDormant(true);

partition.Remove(PartitionListMask.ClientSolidEdicts | PartitionListMask.ClientResponsiveEdicts | PartitionListMask.ClientNonStaticEdicts, CollisionProp().GetPartitionHandle());
}
break;

Expand Down
2 changes: 2 additions & 0 deletions Game.Client/C_World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public C_World() : base() {

}

public override CollideType GetCollideType() => CollideType.ShouldNotCollide;

[NetworkTable]
public static readonly new NetworkProp[] Props = [
nameof(WorldMins),
Expand Down
Loading