Tweak anti-lag values

This commit is contained in:
Jens Pitkänen 2020-08-11 01:43:24 +03:00
parent 9af055f81f
commit c104ad8df7
4 changed files with 6 additions and 3 deletions

View File

@ -239,7 +239,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
DisableInput: 0 DisableInput: 0
SyncInterval: 0.5 SyncInterval: 0.5
MovementUpdateInterval: 0.03 MovementUpdateInterval: 0.016
--- !u!114 &3537472584083277103 --- !u!114 &3537472584083277103
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1840,6 +1840,7 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
m_Bits: 8192 m_Bits: 8192
Cooldown: 1 Cooldown: 1
LerpedDesyncDistance: 2
Lerpables: Lerpables:
- {fileID: 6585337033203946896} - {fileID: 6585337033203946896}
Lean: 0 Lean: 0

View File

@ -7,7 +7,7 @@ namespace NeonTea.Quakeball.Interface {
public class TerminalStdio : UnityEngine.MonoBehaviour { public class TerminalStdio : UnityEngine.MonoBehaviour {
public int SleepBeforeInputMillis; public int SleepBeforeInputMillis;
public Terminal Terminal; public Terminal Terminal;
#if UNITY_SERVER
private Thread StdioThread; private Thread StdioThread;
private int MessageIndex = 0; private int MessageIndex = 0;
private ConcurrentQueue<string> Commands = new ConcurrentQueue<string>(); private ConcurrentQueue<string> Commands = new ConcurrentQueue<string>();
@ -48,5 +48,6 @@ namespace NeonTea.Quakeball.Interface {
} }
} }
} }
#endif
} }
} }

View File

@ -36,6 +36,7 @@ namespace NeonTea.Quakeball.Players {
public float Cooldown; public float Cooldown;
[Header("Visuals")] [Header("Visuals")]
public float LerpedDesyncDistance;
public DesyncLerper[] Lerpables; public DesyncLerper[] Lerpables;
public float Lean; public float Lean;
public GameObject LaserPrefab; public GameObject LaserPrefab;
@ -127,7 +128,7 @@ namespace NeonTea.Quakeball.Players {
} }
if (ShouldApply) { if (ShouldApply) {
Vector3 Delta = transform.position - syncPckt.Location; Vector3 Delta = transform.position - syncPckt.Location;
if (Delta.magnitude < 1) { if (Delta.magnitude < LerpedDesyncDistance) {
// Player is close enough to the sync packet, lerp them over. // Player is close enough to the sync packet, lerp them over.
foreach (DesyncLerper Lerper in Lerpables) { foreach (DesyncLerper Lerper in Lerpables) {
Lerper.Offset(Delta); Lerper.Offset(Delta);