mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Update to current Mirror
This commit is contained in:
parent
8e60e28ca3
commit
f019ea1fd6
@ -9,8 +9,9 @@ public class NPCHandler : NetworkBehaviour
|
||||
{
|
||||
readonly static List<GameObject> NpcList = new List<GameObject>();
|
||||
|
||||
void OnValidate()
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
|
@ -14,10 +14,10 @@ public class NTRCustomSendInterval : NetworkTransformBase
|
||||
[Tooltip("If we only sync on change, then we need to correct old snapshots if more time than sendInterval * multiplier has elapsed.\n\nOtherwise the first move will always start interpolating from the last move sequence's time, which will make it stutter when starting every time.")]
|
||||
public float onlySyncOnChangeCorrectionMultiplier = 2;
|
||||
|
||||
[Header("Send Interval Multiplier")]
|
||||
[Tooltip("Check/Sync every multiple of Network Manager send interval (= 1 / NM Send Rate), instead of every send interval.")]
|
||||
[Range(1, 120)]
|
||||
public uint sendIntervalMultiplier = 3;
|
||||
//[Header("Send Interval Multiplier")]
|
||||
//[Tooltip("Check/Sync every multiple of Network Manager send interval (= 1 / NM Send Rate), instead of every send interval.")]
|
||||
//[Range(1, 120)]
|
||||
//public uint sendIntervalMultiplier = 3;
|
||||
|
||||
[Header("Rotation")]
|
||||
[Tooltip("Sensitivity of changes needed before an updated state is sent over the network")]
|
||||
@ -459,13 +459,13 @@ static void RewriteHistory(
|
||||
// insert a fake one at where we used to be,
|
||||
// 'sendInterval' behind the new one.
|
||||
|
||||
SnapshotInterpolation.InsertIfNotExists(snapshots, new TransformSnapshot(
|
||||
remoteTimeStamp - sendInterval, // arrival remote timestamp. NOT remote time.
|
||||
localTime - sendInterval, // Unity 2019 doesn't have timeAsDouble yet
|
||||
position,
|
||||
rotation,
|
||||
scale
|
||||
));
|
||||
//SnapshotInterpolation.InsertIfNotExists(snapshots, new TransformSnapshot(
|
||||
// remoteTimeStamp - sendInterval, // arrival remote timestamp. NOT remote time.
|
||||
// localTime - sendInterval, // Unity 2019 doesn't have timeAsDouble yet
|
||||
// position,
|
||||
// rotation,
|
||||
// scale
|
||||
//));
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
|
@ -23,8 +23,9 @@ public class PlayerBuffers : NetworkBehaviour
|
||||
public int serverSnapCount;
|
||||
public int clientSnapCount;
|
||||
|
||||
private void OnValidate()
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
NTRCustomSendInterval = GetComponent<NTRCustomSendInterval>();
|
||||
NetworkTransformReliable = GetComponent<NetworkTransformReliable>();
|
||||
|
||||
|
@ -5,8 +5,9 @@ namespace TestNT
|
||||
{
|
||||
public class PlayerMinions : NetworkBehaviour
|
||||
{
|
||||
void OnValidate()
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
|
@ -61,8 +61,9 @@ public enum MoveMode : byte { Walking, Sneaking, Running };
|
||||
public Vector3Int velocity;
|
||||
public Vector3 direction;
|
||||
|
||||
void OnValidate()
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
if (NTR == null)
|
||||
NTR = GetComponentInChildren<NTRCustomSendInterval>();
|
||||
|
||||
|
@ -25,8 +25,9 @@ void OnNameChanged(string _, string newValue)
|
||||
gameObject.name = newValue;
|
||||
}
|
||||
|
||||
void OnValidate()
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user