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:
DisableInput: 0
SyncInterval: 0.5
MovementUpdateInterval: 0.03
MovementUpdateInterval: 0.016
--- !u!114 &3537472584083277103
MonoBehaviour:
m_ObjectHideFlags: 0

View File

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

View File

@ -7,7 +7,7 @@ namespace NeonTea.Quakeball.Interface {
public class TerminalStdio : UnityEngine.MonoBehaviour {
public int SleepBeforeInputMillis;
public Terminal Terminal;
#if UNITY_SERVER
private Thread StdioThread;
private int MessageIndex = 0;
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;
[Header("Visuals")]
public float LerpedDesyncDistance;
public DesyncLerper[] Lerpables;
public float Lean;
public GameObject LaserPrefab;
@ -127,7 +128,7 @@ namespace NeonTea.Quakeball.Players {
}
if (ShouldApply) {
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.
foreach (DesyncLerper Lerper in Lerpables) {
Lerper.Offset(Delta);