Skip to content

Commit 48df8c0

Browse files
Remove IsTouching set on physics prediction
Just because an entity sleeps doesn't mean it's not touching necessarily. This causes client to mispredict against server and continuously fire collision events if we try to move into an entity. Easiest way to reproduced is to walk into a locked airlock and watch it flicker constantly.
1 parent 46291af commit 48df8c0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Robust.Client/Physics/PhysicsSystem.Predict.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ internal void UpdateIsTouching(List<Contact> toUpdate)
156156

157157
if (activeA == false && activeB == false)
158158
{
159-
contact.IsTouching = false;
160159
continue;
161160
}
162161

Robust.Shared/Physics/Dynamics/Contacts/Contact.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
using Robust.Shared.Physics.Collision.Shapes;
3636
using Robust.Shared.Physics.Components;
3737
using Robust.Shared.Physics.Systems;
38+
using Robust.Shared.ViewVariables;
3839

3940
namespace Robust.Shared.Physics.Dynamics.Contacts
4041
{
@@ -94,11 +95,13 @@ internal Contact(IManifoldManager manifoldManager)
9495
/// <summary>
9596
/// Determines whether the contact is touching.
9697
/// </summary>
98+
[ViewVariables]
9799
public bool IsTouching { get; internal set; }
98100

99101
/// Enable/disable this contact. This can be used inside the pre-solve
100102
/// contact listener. The contact is only disabled for the current
101103
/// time step (or sub-step in continuous collisions).
104+
[ViewVariables]
102105
public bool Enabled { get; set; }
103106

104107
/// <summary>

0 commit comments

Comments
 (0)